1Start n8n with Docker and Postgres
n8n runs fine from a single container with SQLite, but if this is going to matter, start on Postgres — migrating later is more work than starting right. A small compose file with n8n plus postgres and two named volumes is the standard shape.
Set N8N_ENCRYPTION_KEY explicitly to a value you store in your password manager. n8n encrypts every saved credential with it; lose the key and every stored connection must be re-entered by hand.
n8n:
image: n8nio/n8n
environment:
- N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=db
- WEBHOOK_URL=https://n8n.example.com/
volumes: ["n8ndata:/home/node/.n8n"] 2Put it on a subdomain with TLS
Front n8n with your reverse proxy (Traefik, Caddy, nginx) on a subdomain like n8n.example.com with a real certificate, and set WEBHOOK_URL to that public URL — inbound webhooks and OAuth callbacks are generated from it, and they silently break if it still says localhost.
Turn on n8n's user management (owner account + members) rather than running it wide open behind basic auth; workflow-level sharing needs real users.
3Build a webhook-to-action workflow
The canonical first workflow: a Webhook trigger node, a transform (Set or Code node), and an action (Slack message, email, HTTP request). Build it in the editor, execute once with test data to see values flow between nodes, then activate.
Active workflows get a production webhook URL distinct from the test one — point the sending service at the production path, and remember n8n only listens while the workflow is active.
4Store credentials once, reference everywhere
Add each external service (Slack, SendGrid, your DB) under Credentials once; every node references it by name. OAuth-based credentials walk you through consent using the callback URL derived from WEBHOOK_URL — which is why step two came first.
Scope API keys to what the workflow needs. An automation platform is a credential store with superpowers, and it deserves the same care as a secrets vault.
5Executions, retries, and backups
Turn on saved executions for failures (at minimum) so you can replay a failed run with its original data after fixing the workflow. Add an error workflow — a special workflow that fires when any other fails — to get a Slack ping instead of silent breakage.
Back up the Postgres database and the encryption key; together they are the full instance. Version-control critical workflows by exporting their JSON — n8n also has built-in git-backed source control on paid tiers.