How to setup docker-compose.yml for using runners (advanced AI) in n8n? I try use documentation, but my n8n node restart and no error.
What I need to yml and .env - for working with RUNNERS?
Thanks for the extra details — that clears things up. Based on the current setup and the new N8N_RUNNERS_* variables, here’s how to properly set up a Docker Compose config to run n8n with internal task runners (the simpler option, no external orchestrator needed).
You’ll also need to switch away from SQLite — runners require a more robust setup, like PostgreSQL.
Here’s a clean and updated example of docker-compose.yml with runners enabled (internal mode):
No need to define N8N_RUNNERS_AUTH_TOKEN for internal mode — it’s only used in external mode when you run runners separately. Also, make sure you’re using the official Docker image with the correct tag that includes runner support (v1.83.2 is fine for internal mode).
If you start the stack and it still silently restarts or does nothing, try this:
docker-compose logs n8n --tail=100
Or launch the container manually to debug:
docker-compose run --entrypoint bash n8n
Let me know if you’d rather use external runners — the setup’s a bit more involved but I can walk you through that too.
Thanks!
Try to use it - but n8n crashed, and logs are empty:
LOG_LEVEL=debug
Last session crashed
Initializing n8n process
n8n ready on 0.0.0.0, port 5678
n8n Task Broker ready on 127.0.0.1, port 5679
User settings loaded from: /home/node/.n8n/config
Last session crashed
Initializing n8n process
And n8n node restart every minute. Is it possible to low resources?
(digital Ocean - 512Mb RAM?)
Yup — that’s almost probably due to low memory (512MB RAM).
n8n is pretty lightweight, but with the newer versions, background processes like the task broker can easily tip it over the edge on small droplets.
What’s Happening
The message:
Last session crashed
Initializing n8n process
in a loop means n8n is crashing and being restarted by PM2 or Docker, likely due to running out of memory or hitting a fatal error too fast for logs to catch.
What You Can Do
Upgrade to at least 1GB RAM (Recommended)
Even 1GB is the bare minimum for n8n production use.
You can resize your DigitalOcean droplet (1GB RAM) and you’ll be much more stable.
Add Swap (Quick Fix, Not Ideal)
You can add swap memory to fake more RAM. SSH into your droplet and run: