Congratulations! Your VPS with the n8n automation tool pre-installed is ready. Just follow these simple steps to start automating with n8n.
1. Access the n8n Web Interface
Open your browser and go to:
http://[your-server-ip]:5678
Example: http://45.98.222.127:5678
If you see an error like “Cannot GET /setup”, just remove /setup from the URL. n8n is accessible directly from the root path.
2. If You See a Secure Cookie Error
You may encounter this message:
"Your n8n server is configured to use a secure cookie..."
This means n8n is expecting you to use HTTPS.
To fix this, we have already disabled secure cookie enforcement by setting:
N8N_SECURE_COOKIE=false
Now you can access n8n via HTTP without problems.
3. Set Up Your Admin Account
When accessing n8n for the first time, you’ll be prompted to create your owner (admin) account.
Fill in the form:
-
Email: used for password recovery
-
First Name / Last Name: optional display name
-
Password: must be at least 8 characters, contain 1 number and 1 uppercase letter
Click Create Account, and you’ll be taken to the main n8n dashboard.
4. Common Troubleshooting
Page not loading?
Check if the firewall is enabled:
sudo ufw status
Check if Docker containers are running:
docker ps
Permission error in logs?
If you see:
EACCES: permission denied, open '/home/node/.n8n/config'
Then run:
sudo chown -R 1000:1000 ./n8n_data docker-compose restart
Optional: Basic Auth or HTTPS Access
We can help you configure the following upon request:
-
Basic Authentication (login prompt before n8n loads)
-
HTTPS support via Let’s Encrypt
-
Custom domain access (e.g., https://n8n.yourdomain.com)
-
Traefik reverse proxy with automatic SSL
Summary
-
n8n is installed and ready to use
-
Secure cookie is disabled to allow access via HTTP
-
Admin setup is available on the first login
-
Dockerized and restart-friendly
-
HTTPS and domain support are available on request
Advanced Configuration Guide for Your n8n VPS
These are optional but recommended enhancements to improve security and professional use of your n8n automation server.
1. Enable Basic Authentication (Login Prompt)
This adds a simple username/password protection before accessing n8n.
Step-by-step:
-
SSH into your server:
ssh root@your-server-ip
-
Generate .htpasswd credentials:
sudo apt install apache2-utils htpasswd -nb yourusername yourpassword
Example output:
yourusername:$apr1$8QsXYZ12$XrHq6YTb2BSpqP4LSHtZW0
-
Edit your docker-compose.yml or Traefik labels (example below).
2. Set up Traefik Reverse Proxy with HTTPS
Traefik is a modern reverse proxy that integrates easily with Docker and supports Let's Encrypt auto-SSL.
Project structure:
n8n-docker/
├── docker-compose.yml
├── traefik/
│ ├── traefik.yml
│ └── acme.json
Sample docker-compose.yml:
version: '3.8'
services:
traefik:
image: traefik:v2.11
command:
- --api.insecure=true
- --providers.docker=true
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --certificatesresolvers.myresolver.acme.httpchallenge=true
- --certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web
- --certificatesresolvers.myresolver.acme.email=you@example.com
- --certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik:/letsencrypt
n8n:
image: n8nio/n8n
environment:
- N8N_HOST=n8n.yourdomain.com
- N8N_PORT=5678
- N8N_PROTOCOL=https
- WEBHOOK_URL=https://n8n.yourdomain.com/
labels:
- "traefik.enable=true"
- "traefik.http.routers.n8n.rule=Host(`n8n.yourdomain.com`)"
- "traefik.http.routers.n8n.entrypoints=web,websecure"
- "traefik.http.routers.n8n.tls=true"
- "traefik.http.routers.n8n.tls.certresolver=myresolver"
- "traefik.http.middlewares.auth.basicauth.users=yourusername:$apr1$HASHED_PASSWORD"
- "traefik.http.routers.n8n.middlewares=auth"
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:
traefik.yml (inside traefik/ folder):
api:
dashboard: true
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
providers:
docker:
exposedByDefault: false
Make acme.json Writable:
mkdir traefik
touch traefik/acme.json
chmod 600 traefik/acme.json
3. Point Your Domain
Make sure your domain (e.g., n8n.yourdomain.com) points to the VPS IP using A record in your DNS settings.
Final Step: Start Everything
From your project folder, run:
docker compose up -d
Wait ~30–60 seconds, then visit:
https://n8n.yourdomain.com
You should see:
-
A browser login prompt (Basic Auth)
-
Then n8n interface, now under HTTPS with a valid SSL cert
Summary
Feature | Description |
---|---|
Basic Auth | Adds a login prompt before n8n loads |
Let’s Encrypt HTTPS | Free SSL with automatic renewal |
Custom Domain | Use your domain for clean URL access |
Traefik Reverse Proxy | Handles routing, SSL, and security easily |