data/skills/n8n-self-hosting/SINGLE_MODE.md
One n8n process handles everything: the editor UI, the REST API, triggers/timers, and it
executes workflows in-process. Simplest to run and reason about. Template:
assets/docker-compose.single.yml.
caddy — public reverse proxy, automatic HTTPS (80/443).n8n — the single process; data in the n8n_data volume (/home/node/.n8n).n8n_data). No separate database container.Good fit: one user or a small team, light-to-moderate execution volume, you value simple ops and simple backups. The whole instance is one volume to back up.
Outgrow it when: executions queue up behind each other, long/heavy runs block the UI, or you
need to scale across CPU cores or machines. That's queue mode (QUEUE_MODE.md).
n8n_data volume. Great for most single-instance installs.postgres:16 service (see the queue
template for the service + init-data.sh + healthcheck) and set on n8n:
DB_TYPE=postgresdb, DB_POSTGRESDB_HOST=postgres, DB_POSTGRESDB_DATABASE,
DB_POSTGRESDB_USER, DB_POSTGRESDB_PASSWORD. Everything else stays the same.There's no in-place switch. The supported path is: export your workflows & credentials from the
running instance (or use the CLI n8n export:workflow --all / export:credentials --all),
stand up Postgres, point n8n at it (fresh DB), and re-import. Plan a short maintenance window.
Because credentials are re-imported under the same N8N_ENCRYPTION_KEY, keep that key
unchanged across the migration.
A single instance runs comfortably on a small box (≈1–2 GB RAM for light use). Heavy Code-node
or binary work wants more headroom. Set N8N_DEFAULT_BINARY_DATA_MODE=filesystem (template
default) so big files don't sit in memory/DB.
docker compose ps # caddy + n8n Up
docker compose exec n8n wget -qO- http://localhost:5678/healthz # n8n itself up (internal)
docker compose logs caddy | grep -i 'certificate obtained' # cert issued (first boot: ~1–2 min)
curl -fsS --retry 5 --retry-delay 10 https://<fqdn>/healthz # public; retry covers ACME delay
A first-boot TLS failure usually means the cert hasn't issued yet, not that n8n is down. Then open
https://<fqdn> and create the owner account immediately (first visitor becomes the owner).