Package Information
Documentation
n8n-nodes-pers
A custom n8n community node for the PERS (Phygital Experience Rewards System) API, with Docker deployment support.
š Table of Contents
- Quick Start
- Installation
- Project Structure
- Configuration
- Security
- Development
- Troubleshooting
- Resources
š Quick Start
Prerequisites
- Docker (20.10+)
- Docker Compose (2.0+)
Docker Deployment
Clone the repository
git clone https://github.com/guest-pizel/n8n-nodes-pers.git cd n8n-nodes-persCreate your environment file
cp .env.example .envEdit
.envwith your configuration (see Configuration)Build and start the container
docker compose up -d --buildAccess n8n at http://localhost:5678
š¦ Installation
As a Community Node (npm)
Follow the n8n community nodes installation guide:
- Go to Settings > Community Nodes
- Select Install
- Enter
n8n-nodes-pers - Select Install
Manual Installation
npm install n8n-nodes-pers
š Project Structure
n8n-nodes-pers/
āāā .github/workflows/ # CI/CD configuration
āāā credentials/ # Credential definitions
ā āāā PersApi.credentials.ts
ā āāā pers.svg
ā āāā pers.dark.svg
āāā nodes/ # Node implementations
ā āāā Pers/
āāā local-files/ # Mounted volume for file operations (Docker)
āāā docker-compose.yaml # Docker Compose configuration
āāā Dockerfile # Custom n8n image with PERS nodes
āāā docker-entrypoint.sh # Entrypoint script for custom node installation
āāā .env.example # Example environment variables
āāā .dockerignore # Docker build exclusions
āāā package.json # Node package configuration
āāā tsconfig.json # TypeScript configuration
āāā LICENSE # MIT License
āļø Configuration
Environment Variables
Copy .env.example to .env and configure:
| Variable | Description | Default |
|---|---|---|
N8N_VERSION |
n8n Docker image version | 2.0.2 |
N8N_HOST |
Host address | localhost |
N8N_PORT |
Port number | 5678 |
N8N_PROTOCOL |
Protocol (http/https) | http |
WEBHOOK_URL |
External webhook URL | http://localhost:5678/ |
GENERIC_TIMEZONE |
Timezone | Europe/Madrid |
N8N_LOG_LEVEL |
Logging level | info |
PERS API Credentials
When using the PERS node in n8n, you'll need to configure:
- Project Key: Your PERS project key
- Tenant API Key: Your PERS tenant API key
These are configured within n8n's credential system, not in environment variables.
Optional Settings
See .env.example for additional configurations:
- Basic authentication
- Database settings (PostgreSQL for production)
- SMTP for email notifications
- Encryption key for credentials
š Security
Important Security Practices
Never commit
.envfiles - The.gitignoreexcludes these automatically.Use environment variables for all sensitive data:
- Passwords
- Database credentials
- Encryption keys
Set an encryption key in production:
# Generate a random encryption key openssl rand -hex 32Add to your
.env:N8N_ENCRYPTION_KEY=your_generated_keyEnable basic auth for exposed instances:
N8N_BASIC_AUTH_ACTIVE=true N8N_BASIC_AUTH_USER=your_username N8N_BASIC_AUTH_PASSWORD=your_secure_passwordUse HTTPS in production with a reverse proxy (nginx, Traefik, etc.)
Files That Should Never Be Committed
.env(contains secrets)local-files/contents (may contain user data)- Any files with API keys or passwords
š ļø Development
Building the Custom Node
npm install
npm run build
Linting
npm run lint
npm run lint:fix
Rebuilding the Docker Image
After making changes:
docker compose down
docker compose up -d --build
Viewing Logs
docker compose logs -f n8n
Accessing the Container
docker compose exec n8n sh
š§ Troubleshooting
Custom nodes not appearing
Check the container logs:
docker compose logs n8n | grep -i customVerify nodes are installed:
docker compose exec n8n ls -la /home/node/.n8n/custom/
Permission issues
The entrypoint script handles permissions automatically. If issues persist:
docker compose down -v # Warning: This removes data volumes
docker compose up -d --build
Port conflicts
If port 5678 is in use, change N8N_PORT in your .env file.
Build failures
Ensure you have the latest base image:
docker compose build --no-cache
š Resources
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š¤ Author
Luis Jimenez - guest@explorins.com