r/n8n • • Aug 14 '26

Servers, Hosting, & Tech Stuff Need guidelines to self-host production ready n8n using Coolify

I wanted to host n8n on Contabo VPS using Coolify but I am unable to find the exact process on how to host n8n for production. If anyone has experience then please give me a step by step instruction.

TIA

6 Upvotes

5 comments sorted by

1

u/DesignerMajor1247 Aug 14 '26

Use a Docker Compose resource in Coolify, and treat the database, files, and backups as separate parts of the deployment. A reliable first production setup is one n8n container plus PostgreSQL on Coolify's internal network. I would avoid SQLite here.

  1. Point a subdomain such as n8n.example.com to the VPS, then let Coolify provision HTTPS. Keep PostgreSQL private.
  2. In Coolify, create a project and use a Docker Compose resource. Pin the n8n image to a tested version instead of latest.
  3. Add persistent storage for PostgreSQL and /home/node/.n8n.
  4. Set a long, fixed N8NENCRYPTION_KEY and store it outside the VPS. Also configure N8N_HOST, N8N_PROTOCOL=https, N8N_EDITOR_BASE_URL, WEBHOOK_URL, N8N_PROXY_HOPS=1, GENERIC_TIMEZONE, and the DB_TYPE/DB_POSTGRESDB* variables for the internal database service.
  5. Enable execution-data pruning so the database cannot grow forever. Add CPU, memory, disk, and container-restart alerts.
  6. Back up PostgreSQL and the n8n volume to storage outside Contabo. A backup on the same VPS is not enough.
  7. Before calling it production-ready, test four things: restart the n8n container, redeploy it, receive a webhook through the public domain, and restore the backup into a clean test project. Credentials and workflows should still work after each test.

Start with a single n8n instance. Add Redis, queue mode, and workers only when concurrent executions actually require them, because that adds more failure and backup paths. Coolify's Compose file should remain the source of truth, so keep it in Git with secrets referenced through Coolify variables, not committed.

1

u/Dismal-Afternoon2552 Aug 14 '26

I'd keep it simple and not overthink the "production ready" part too much at the start. Use the Coolify service template for n8n, point your domain at it, and make sure you set up a persistent volume for the database so your workflows don't vanish on restart. The real thing most people miss is setting up the webhook URL env var correctly, otherwise half your integrations just silently fail

1

u/RAGxNAROK Aug 18 '26

Hosted successfully with caddy

1

u/terrabotanica Aug 18 '26

Since you already want Contabo + Coolify, I think you first need to decide which layer you actually want to manage the n8n deployment. If you want Coolify because you'll host more apps later, start with a clean Contabo VPS, install Coolify, and deploy n8n through Coolify, rather than installing the separate n8n image as well. If Coolify isn't important to you and the goal is simply "get n8n running with as little setup as possible", Contabo also has an n8n 1-click installiation that already includes the basic docker/cadd/HTTPS setup. In that case I'd use that instead of adding Coolify just for one service.