Self-hosting n8n with Docker Compose in 2026: 5 things the quick-start guides skip

Most self-hosting tutorials end at docker compose up -d. These are the five things that bite people later, based on n8n’s official Docker Compose guide:

1. N8N_WEBHOOK_URL vs WEBHOOK_URL
The official compose file now uses N8N_WEBHOOK_URL, which is available from n8n 2.30.0. On older versions it’s WEBHOOK_URL. If the variable doesn’t match your version, webhook and form URLs come out as http://localhost:5678/``....

2. Pin the image version
image: n8nio/n8n with no tag means any docker compose pull can move you to a new release. That’s how a lot of people met the 2.0 breaking changes by surprise. Pin an exact tag (e.g. n8nio/n8n:2.43.5) and change it on purpose.

3. Back up n8n_data, not just your workflow JSON
That volume holds the SQLite database and the encryption key. Restore workflows onto a server with a different key and every saved credential is unusable.

docker compose stop n8n
docker run --rm -v n8n-compose_n8n_data:/data -v $(pwd):/backup alpine \
  tar czf /backup/n8n-backup-$(date +%F).tar.gz -C /data .
docker compose start n8n

(Check your volume name with docker volume ls. Compose prefixes it with the folder name.)

4. File nodes only see /files
The official setup mounts ./local-files to /files and sets N8N_RESTRICT_FILE_ACCESS_TO=/files. If Read/Write Files can’t find something, it’s probably outside that folder.

5. Restart ≠ recreate
After editing .env or compose.yaml, docker compose restart keeps the old environment. Use docker compose up -d so the container is recreated.

I wrote the full walkthrough (official compose file, VPS sizing, UFW, updates and a troubleshooting table) here, in case it helps someone setting up a new server: Self-Host n8n on a VPS: The Easy 8-Step Docker Guide (2026)

What’s the self-hosting gotcha that cost you the most time?

1 Like

Great sharing…especially the version pinning part.
It’s one of the hidden gotchas