Docker compose example in docs no longer available

Describe the problem/error/question

I’m looking for an example docker compose to self-host the community version of n8n.
I initially went through the documentation and the compose example seemed to be outdated as I got a few errors. However now, the docs seems to be updated and there is no longer a compose example.
Can someone share the recommended setup?

Hey @newdimension, while you wait for a response, here are some things that might help:

Suggested resources

Automatically matched to your question.

Docs:

Forum:

@Wouter_Nigrini, @Dinesh, @markup - you’ve helped with similar issues before, can you take a look?

Automatically suggested by n8n’s community bot. It’s a pilot - please share feedback here.

hi @newdimension welcome to n8n community.

here are docs for docker setup: Install using Docker Compose | Deploy | n8n Docs

Hello moosa! Thank you for the warm welcome.
The docker compose example of those docs are pointing to a Github page that was removed

Please read

One line setup is most beginner friendly

Hello! I prefer docker compose as I’ll eventually edit the setup

If I am not wrong this is correct url: n8n/docker/get-n8n-compose.yml at master · n8n-io/n8n · GitHub

@n8n

@newdimension Yes, the link @moosa posted is the correct file. The docs replaced the inline YAML with a GitHub-file embed on September 3, but that embed is currently not rendering in Step 4, so it looks like the example was removed.

For the editable default stack, use:

That includes persistent n8n storage and the Assistant sandbox, with SQLite as the default database.

If this will be a production setup and you want PostgreSQL plus an external task runner, start with this official example instead:

Both run as Community edition unless you add a licence key. You would still add your own domain and reverse proxy in front.

Here’s a minimal but production-ready docker-compose.yml for n8n self-hosting (community edition, with SQLite for simplicity — swap to Postgres if you need scale):\n\nyaml\nversion: '3.8'\nservices:\n n8n:\n image: docker.n8n.io/n8nio/n8n\n restart: always\n ports:\n - '5678:5678'\n environment:\n - N8N_HOST=your-domain.com\n - N8N_PORT=5678\n - N8N_PROTOCOL=https\n - WEBHOOK_URL=https://your-domain.com/\n - GENERIC_TIMEZONE=America/New_York\n - N8N_ENCRYPTION_KEY=your-random-32-char-key\n volumes:\n - n8n_data:/home/node/.n8n\nvolumes:\n n8n_data:\n\n\nKey things that trip people up:\n- N8N_HOST must match the domain you’re accessing it from\n- WEBHOOK_URL must end with a trailing slash\n- N8N_ENCRYPTION_KEY is required in newer versions — generate one with openssl rand -hex 16\n\nIf you need Postgres instead of SQLite, add DB_TYPE=postgresdb and the Postgres connection vars. Happy to share a full Postgres + Traefik example if you need it.