Self-hosted n8n: Docker setup and maintenance
Self-hosted n8n differs from the cloud version in two ways: you pay for a server instead of executions, and your data never leaves your perimeter. The price is administration. Here is exactly what that involves.
Before you install
- A server. A VPS with 2 GB RAM handles dozens of workflows. From €5 per month.
- A domain or subdomain, for example
flow.yourdomain.com. - HTTPS. Mandatory — services only deliver webhooks to secure endpoints.
- Docker. One install command, then everything lives in containers.
Running it in Docker
A correct setup has three parts: n8n itself, a PostgreSQL database, and a reverse proxy with certificates (Caddy or Traefik issue them automatically).
Three things beginners skip:
- PostgreSQL instead of SQLite. n8n defaults to SQLite, which is fine for trying it out but slows down as execution history grows and is painful to migrate later.
- Named volumes. Without an external volume, recreating the container wipes workflows, credentials and history.
- Timezone variable. Otherwise schedules fire in UTC rather than your local time.
The encryption key
n8n encrypts stored credentials with a key generated on first run. Lose the key and you lose every connection: workflows survive, but each service has to be re-authorised. Pin it in your environment variables and store a copy in a password manager before you configure any integration.
Backups
Two things need copying: the PostgreSQL database and the n8n data volume. A daily database dump plus a weekly JSON export of workflows is enough for a small team — stored somewhere other than the same server.
Updates
Every one to two months is a healthy rhythm: take a backup, pull the new image, verify a couple of key workflows. Never update on a day when nobody can fix things.
Monitoring
The minimum is a failure alert. n8n supports a dedicated error workflow that catches failures from any other workflow and sends a message — wire it to Telegram. Without it, breakage surfaces a week later as missing leads.
Second layer: the server itself — disk space (execution history grows), memory, uptime.
First-month mistakes
- Execution history never pruned — the disk fills within months. Configure automatic cleanup.
- Webhooks work in test mode but not in production — the public URL was not set in the environment.
- A workflow runs in the editor but not on schedule — it was never activated.
- No concurrency limit — a heavy workflow spawns a hundred parallel runs and takes down the server.
Cloud or self-hosted
| n8n Cloud | Self-hosted | |
|---|---|---|
| Billing | per execution | server, €5–20 |
| Administration | none | yours |
| Data location | vendor | you |
| Custom npm packages | limited | yes |
The honest rule: with few workflows and no data-residency requirement, cloud is cheaper in total cost — administration is not free either.
FAQ
How much server does it need?
2 GB RAM and one or two cores is a comfortable start. Heavy file processing or AI nodes need more.
Can I move workflows from cloud to my own server?
Yes, via JSON export. Credentials must be re-entered — they are not exported.
How much maintenance is it?
Roughly an hour a month once it runs: updates and backup checks. If that hour does not exist, take a support plan.
We deploy and configure it for you — n8n setup. New to the platform? Start with what n8n is or the comparison with Zapier and Make.
Read next
How to choose an automation contractor
Seven questions to ask before signing, three signs of vendor lock-in, and what a serious proposal actually looks like.
Accounting system and CRM integration without losing data
What to sync and in which direction, three ways to connect, and the four failures that break exchanges in practice.
Warehouse and marketplace automation: where to start
Step by step: one source of truth for stock, orders from every channel, shipping and tracking numbers. What takes a week and what needs an accounting system.