Objective
Deploy the N8N platform to create automation workflows (API integration, data processing, notifications) with a visual no-code/low-code interface.
Prerequisites
- Linux Debian/Ubuntu server
- Docker installed
- 2 GB RAM minimum
- Internet access
What is N8N?
N8N (pronounced "n-eight-n") is an open-source workflow automation platform. An alternative to Zapier, Integromat (Make) or Microsoft Power Automate, it allows connecting services via "nodes" without writing code.
Use cases
- Data synchronisation between tools (GLPI → Nextcloud)
- Automatic notifications (Slack, Discord, Email)
- File processing (CSV, JSON, images)
- API and webhook monitoring
- IT task automation (backup, monitoring)
Installation via Docker
Step 1: Install Docker
sudo apt update sudo apt install docker.io docker-compose -y # Enable Docker at boot sudo systemctl enable docker sudo systemctl start docker # Verify docker --version
Step 2: Launch N8N in simple mode
docker run -it --rm \ --name n8n \ -p 5678:5678 \ -v ~/.n8n:/home/node/.n8n \ n8nio/n8n
Info: N8N will be accessible at http://server_ip:5678
Step 3: Installation with Docker Compose (production)
Create a working directory:
mkdir ~/n8n-docker cd ~/n8n-docker
Create the docker-compose.yml file:
nano docker-compose.yml
Content:
version: '3.8' services: n8n: image: n8nio/n8n:latest container_name: n8n restart: unless-stopped ports: - "5678:5678" environment: - N8N_BASIC_AUTH_ACTIVE=true - N8N_BASIC_AUTH_USER=admin - N8N_BASIC_AUTH_PASSWORD=SecurePassword123 - N8N_HOST=192.168.1.100 - N8N_PORT=5678 - N8N_PROTOCOL=http - WEBHOOK_URL=http://192.168.1.100:5678/ volumes: - ./n8n_data:/home/node/.n8n
Important: Replace 192.168.1.100 with your server's actual IP and SecurePassword123 with a strong password.
Step 4: Launch
# Start N8N docker-compose up -d # Check logs docker-compose logs -f n8n
Access the Web Interface
- Open a browser
- Go to http://192.168.1.100:5678
- Log in with:
- Username: admin
- Password: SecurePassword123
Simple Workflow Example
Scenario: Discord notification on new GLPI user
Step 1: Create a new workflow
- Click "New Workflow"
- Give it a name: "GLPI → Discord"
Step 2: Add a Webhook trigger
- Click "+"
- Search for "Webhook"
- Select "Webhook"
- HTTP method: POST
- Path: /glpi-user
- Copy the generated URL (e.g. http://192.168.1.100:5678/webhook/glpi-user)
Step 3: Add a Discord action
- Click "+" after Webhook
- Search for "Discord"
- Select "Discord"
- Authentication: create a Discord webhook:
- Discord → Channel settings → Integrations → Webhooks
- Create a webhook, copy the URL
- Webhook URL: paste the Discord URL
- Message: use variables from the GLPI webhook
New user created: {{ $json["name"] }} - Email: {{ $json["email"] }}
Step 4: Activate the workflow
- Click "Save"
- Toggle the "Active" switch in the top right
Step 5: Test
From a terminal:
curl -X POST http://192.168.1.100:5678/webhook/glpi-user \
-H "Content-Type: application/json" \
-d '{"name":"Jean Dupont","email":"[email protected]"}'
Verify the message is received on Discord.
Securing with HTTPS
With Nginx Reverse Proxy
sudo apt install nginx certbot python3-certbot-nginx -y
Create the file /etc/nginx/sites-available/n8n:
server {
listen 80;
server_name n8n.grp3.local;
location / {
proxy_pass http://localhost:5678;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
sudo ln -s /etc/nginx/sites-available/n8n /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
# SSL certificate Let's Encrypt
sudo certbot --nginx -d n8n.grp3.local
Modify docker-compose.yml:
environment: - N8N_PROTOCOL=https - N8N_HOST=n8n.grp3.local - WEBHOOK_URL=https://n8n.grp3.local/
docker-compose down docker-compose up -d
Useful Commands
Container management
# View real-time logs docker-compose logs -f n8n # Restart docker-compose restart n8n # Stop docker-compose down # Update N8N docker-compose pull docker-compose up -d
Workflow backup
# Workflows are stored in SQLite
sudo cp -r ~/n8n-docker/n8n_data ~/backup_n8n_$(date +%Y%m%d)
Popular Nodes
- HTTP Request: REST API calls
- Webhook: Trigger via URL
- Cron: Task scheduling
- Email (IMAP/SMTP): Send/receive emails
- MySQL / PostgreSQL: SQL queries
- Discord / Slack: Notifications
- File System: Read/write files
- SSH: Remote command execution
- Code (JavaScript): Custom logic
Key Points for the BTS Oral
- N8N: open-source automation platform (alternative to Zapier)
- Node-based: workflows created by assembling "nodes"
- Docker: simple and portable deployment
- Webhook: HTTP trigger to launch workflows
- Low-code: visual interfaces + JavaScript code if needed
- Self-hosted: full data control (vs SaaS)
- Integrations: 350+ supported services (APIs, databases, messaging)
- Cron: scheduled workflow execution
- Variables: data transfer between nodes via {{ $json["key"] }}
- Basic Auth: password protection (improve in production)
BTS Limitation:
N8N presented here is configured in HTTP with Basic Auth. In production, enforce HTTPS + OAuth2/SAML authentication + network isolation.
N8N presented here is configured in HTTP with Basic Auth. In production, enforce HTTPS + OAuth2/SAML authentication + network isolation.