# Docker compose example in docs no longer available

**URL:** <https://community.n8n.io/t/docker-compose-example-in-docs-no-longer-available/312879>\
**Category:** Questions\
**Tags:** docker-compose\
**Created:** [September 11, 2026, 1:50pm UTC](https://community.n8n.io/t/docker-compose-example-in-docs-no-longer-available/312879 "2026-09-11T13:50:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![newdimension](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@newdimension](https://community.n8n.io/u/newdimension)\
**Post date:** [September 11, 2026, 1:50pm UTC](https://community.n8n.io/t/docker-compose-example-in-docs-no-longer-available/312879/1 "2026-09-11T13:50:43Z")

</div>

## 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?

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [September 11, 2026, 1:51pm UTC](https://community.n8n.io/t/docker-compose-example-in-docs-no-longer-available/312879/2 "2026-09-11T13:51:13Z")

</div>

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

> **Suggested resources**
>
> _Automatically matched to your question._
> 
> **Docs:**
> 
> - [Install using Docker Compose](https://docs.n8n.io/deploy/host-n8n/install-options/install-using-docker-compose#step-4-create-compose.yml)
> - [Use a cloud provider](https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider)
> - [Use Docker Compose](https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/use-docker-compose#id-6-create-docker-compose-file)
> 
> **Forum:**
> 
> - [Everytime I restart the server I have to setup all of my credentials](https://community.n8n.io/t/247263)
> - [Any one help me how to create docker-compose.yaml file](https://community.n8n.io/t/142050)
> - [Docker n8n, selfhosted Ubuntu, webserver failed](https://community.n8n.io/t/172195)

@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](https://community.n8n.io/t/pilot-forum-helper-bot/304669)._

---

<div class="post-metadata">

**Author:** ![moosa](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/moosa/32/108437_2.png) [@moosa](https://community.n8n.io/u/moosa)\
**Post date:** [September 11, 2026, 2:07pm UTC](https://community.n8n.io/t/docker-compose-example-in-docs-no-longer-available/312879/3 "2026-09-11T14:07:57Z")

</div>

hi @newdimension welcome to n8n community.

here are docs for docker setup: [Install using Docker Compose | Deploy | n8n Docs](https://docs.n8n.io/deploy/host-n8n/install-options/install-using-docker-compose)

---

<div class="post-metadata">

**Author:** ![newdimension](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@newdimension](https://community.n8n.io/u/newdimension)\
**Post date:** [September 11, 2026, 2:19pm UTC](https://community.n8n.io/t/docker-compose-example-in-docs-no-longer-available/312879/4 "2026-09-11T14:19:50Z")

</div>

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

> **[Step 4: Create compose.yml - Install using Docker Compose | Deploy | n8n Docs](https://docs.n8n.io/deploy/host-n8n/install-options/install-using-docker-compose#step-4-create-compose.yml)**
>
> This guide walks through building your own Docker Compose setup by hand, including the sandbox stack that powers n8n Assistant. Use it if you want full control over your configuration, or need to fold n8n into an existing Compose project. | Build a...

---

<div class="post-metadata">

**Author:** ![kjooleng](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kjooleng/32/184045_2.png) [@kjooleng](https://community.n8n.io/u/kjooleng)\
**Post date:** [September 11, 2026, 2:23pm UTC](https://community.n8n.io/t/docker-compose-example-in-docs-no-longer-available/312879/5 "2026-09-11T14:23:06Z")

</div>

> [@newdimension](#):
>
> Can someone share the recommended setup?

Please read

> **[One-line setup | Deploy | n8n Docs](https://docs.n8n.io/deploy/host-n8n/install-options/one-line-setup)**
>
> Install n8n from the command line using a one-line setup.

One line setup is most beginner friendly

---

<div class="post-metadata">

**Author:** ![newdimension](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@newdimension](https://community.n8n.io/u/newdimension)\
**Post date:** [September 11, 2026, 2:40pm UTC](https://community.n8n.io/t/docker-compose-example-in-docs-no-longer-available/312879/6 "2026-09-11T14:40:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![moosa](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/moosa/32/108437_2.png) [@moosa](https://community.n8n.io/u/moosa)\
**Post date:** [September 11, 2026, 2:42pm UTC](https://community.n8n.io/t/docker-compose-example-in-docs-no-longer-available/312879/7 "2026-09-11T14:42:03Z")

</div>

If I am not wrong this is correct url: [n8n/docker/get-n8n-compose.yml at master · n8n-io/n8n · GitHub](https://github.com/n8n-io/n8n/blob/master/docker/get-n8n-compose.yml)

@n8n

---

<div class="post-metadata">

**Author:** ![Anshul\_Namdev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anshul_namdev/32/178229_2.png) [@Anshul\_Namdev](https://community.n8n.io/u/Anshul_Namdev)\
**Post date:** [September 11, 2026, 5:25pm UTC](https://community.n8n.io/t/docker-compose-example-in-docs-no-longer-available/312879/8 "2026-09-11T17:25:38Z")

</div>

@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:

> <https://github.com/n8n-io/n8n/blob/master/docker/get-n8n-compose.yml>

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:

> **[n8n-hosting/docker-compose/withPostgres at main · n8n-io/n8n-hosting](https://github.com/n8n-io/n8n-hosting/tree/main/docker-compose/withPostgres)**
>
> main/docker-compose/withPostgres

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

---

<div class="post-metadata">

**Author:** ![pirateprentice](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/pirateprentice/32/48360_2.png) [@pirateprentice](https://community.n8n.io/u/pirateprentice)\
**Post date:** [September 13, 2026, 3:59am UTC](https://community.n8n.io/t/docker-compose-example-in-docs-no-longer-available/312879/9 "2026-09-13T03:59:17Z")

</div>

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\n`yaml\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.
