Skip to main content
To self-host n8n, install Docker on an Ubuntu or Debian Linux VPS, start n8n, PostgreSQL and Caddy with one Docker Compose file, and point a domain at the server so webhooks work over HTTPS. n8n is a workflow automation tool; self-hosting keeps your workflows, credentials and execution data on a server you control.
Want a server sized for it? n8n VPS hosting ships Ubuntu with full root, from $11.99/mo.

What you need

  • A FlashRDP Linux VPS running Ubuntu 24.04 LTS or Debian 12/13, with SSH access as root.
  • A domain or subdomain, such as n8n.example.com, with an A record pointing to your server’s IPv4 address.
  • Ports 80 and 443 free. Don’t run this next to another web server that already uses them.

Size the server

n8n’s own docs note that it isn’t CPU intensive and that memory usually matters more than CPU.
  • One n8n instance: BRONZE (2 vCPU, 4 GB RAM) runs n8n, PostgreSQL and Caddy with room to spare.
  • Queue mode or heavy workflows: SILVER (4 vCPU, 8 GB RAM) or above, for Redis plus n8n workers, or workflows that move large files.
vCPUs are shared, so choose a larger plan for sustained heavy CPU use.

Install Docker

Install Docker Engine with Docker’s convenience script:
This pipes Docker’s script into a root shell. To review it first, run curl -fsSL https://get.docker.com -o get-docker.sh, read it, then run sh get-docker.sh. Docker documents other install methods in its install guide.

Create the Compose project

Make a project folder and a .env file with your settings:
Generate random values with openssl rand -hex 32 and paste them in. Keep a copy of N8N_ENCRYPTION_KEY somewhere safe: n8n uses it to encrypt saved credentials, and without it a restored database can’t decrypt them. Create compose.yaml:
On n8n versions before 2.30.0, the webhook variable is WEBHOOK_URL instead of N8N_WEBHOOK_URL. Only Caddy publishes ports; n8n and PostgreSQL are reachable only inside the Compose network.

Start n8n

When the log shows the editor is ready, open https://n8n.example.com. Caddy requests a free TLS certificate on first start, which can take a minute. Create the owner account straight away: until you do, anyone who reaches the page can claim it.

Back up n8n

  • Database: dump PostgreSQL regularly and copy the file off the server:
  • Encryption key and settings: keep your .env file and the n8n_data volume. The key in .env is what decrypts credentials after a restore.
  • Server-level backups: turn on backups from your server’s Backups tab in the Billing Portal as a second layer. See Back up and restore your server.

Update n8n

Read n8n’s release notes before major version updates and back up first.
n8n is fair-code under the Sustainable Use License: you may self-host it for your own internal business or personal use, but not offer it to others as a hosted automation service. FlashRDP’s Acceptable Use Policy also restricts reselling servers without written agreement.

Scale with queue mode

For many concurrent executions, n8n’s queue mode runs a main process plus workers that take jobs from Redis. Every worker needs the same N8N_ENCRYPTION_KEY. Worker concurrency defaults to 10; n8n recommends 5 or higher. Follow n8n’s queue mode docs to add Redis and workers to the Compose file.

Connect via SSH

Persistent Docker Deployments

Host Your Own PaaS with Coolify

Back Up and Restore Your Server

Last modified on October 12, 2026