n8n Workflow Automation

Automation you own, with the operational details the quickstart skips.

1guide Feed

n8n is a workflow automation tool you can run yourself. Nodes connect to APIs, data flows between them, and the whole thing is inspectable — every execution keeps the payload at each step, which makes debugging far easier than in a hosted alternative that shows you a status icon.

Reach for it when a process touches several systems that have APIs and no single one of them is the natural home for the logic. Reach for code instead when the logic is genuinely complex; a workflow with forty nodes and nested branching is a program written in the wrong editor.

The self-hosting story has four settings that decide whether the instance is production-ready. N8N_ENCRYPTION_KEY, which protects stored credentials and is not in your database backup. WEBHOOK_URL, without which production webhook URLs point at localhost. DB_TYPE=postgresdb, because SQLite write contention becomes the bottleneck sooner than people expect. And TLS, because n8n holds API keys for everything it integrates with.

On the workflow side, the recurring failure is silent loss. A transient API error fails an execution, the data exists only in the execution log, and nobody notices for a week. Two settings fix it: retry on the nodes that call external systems, and a workflow-level error workflow that writes the raw payload somewhere durable before it alerts.

Everything published here is verified against a self-hosted instance with PostgreSQL storage, and states the n8n version it was run on — the environment variable surface has changed enough between minors to matter.

Start here

How to Deploy n8n on an Ubuntu VPS with Docker

A production n8n install on Ubuntu 24.04 using Docker Compose, PostgreSQL and Caddy for automatic TLS — with the encryption key, webhook URL and backup steps most quickstarts leave out.

Intermediate · 5 min read

Beginner to advanced

A reading order that builds n8n knowledge in the sequence it is actually needed.

  1. Start How to Deploy n8n on an Ubuntu VPS with Docker 5 min
  2. Build How to Back Up Docker Volumes Automatically 4 min
  • intermediate

    How to Deploy n8n on an Ubuntu VPS with Docker

    A production n8n install on Ubuntu 24.04 using Docker Compose, PostgreSQL and Caddy for automatic TLS — with the encryption key, webhook URL and backup steps most quickstarts leave out.

    5 min

Common problems

Failure modes that come up repeatedly with n8n, and where each one is solved.

Credentials stop decrypting after a redeploy
N8N_ENCRYPTION_KEY changed. n8n also persists a copy in its data directory, and if the two disagree it refuses to start.
Webhook URLs contain localhost or an IP address
WEBHOOK_URL is unset. n8n builds production webhook URLs from that variable, not from the incoming request host.
Executions get slow or stick on SQLite
Write contention. Move to PostgreSQL before you have concurrent executions or more than a few thousand execution records.
The database grows until queries crawl
Execution data is retained indefinitely by default. Turn on pruning with EXECUTIONS_DATA_PRUNE and set a maximum age.

Latest n8n guides

Browse the archive
  • intermediate

    How to Deploy n8n on an Ubuntu VPS with Docker

    A production n8n install on Ubuntu 24.04 using Docker Compose, PostgreSQL and Caddy for automatic TLS — with the encryption key, webhook URL and backup steps most quickstarts leave out.

    5 min

Recently updated

  • intermediate

    How to Deploy n8n on an Ubuntu VPS with Docker

    A production n8n install on Ubuntu 24.04 using Docker Compose, PostgreSQL and Caddy for automatic TLS — with the encryption key, webhook URL and backup steps most quickstarts leave out.

    5 min

Frequently asked questions

SQLite or PostgreSQL for self-hosted n8n?

SQLite is fine for a personal instance with a handful of workflows. PostgreSQL from the start if anything else depends on it — migrating later means exporting and reimporting, and the failure that forces the move is usually mid-incident.

What does N8N_ENCRYPTION_KEY protect?

Every stored credential — API keys, OAuth tokens, database passwords. It is not included in a database dump, and losing it means re-entering every integration by hand. Store it separately from the backups.

When do I need queue mode?

When a single n8n process can no longer keep up with concurrent executions, which shows up as executions queuing rather than starting. Queue mode adds Redis and separate worker containers.

Sources

  1. n8n hosting documentation n8n Primary source
  2. n8n environment variables n8n Primary source
  3. n8n error handling n8n Primary source