Help me with setup yml for using RUNNERS

Describe the problem/error/question

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?

What is the error message (if any)?

n8n log tail 100 - no error

Please share your workflow

services:
  n8n:
    image: docker.n8n.io/n8nio/n8n:latest
    container_name: n8n
    restart: always
    ports:
      - "5678:5678"
    volumes:
      - n8n_data:/home/node/.n8n
    environment:
      - N8N_BASIC_AUTH_ACTIVE=false
      - N8N_PROTOCOL=https
      - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
      - GENERIC_TIMEZONE=Europe/Kiev
      - N8N_HOST=dev.myhost.com
      - N8N_PORT=5678
      - VUE_APP_URL=https://dev.myhost.com/
      - WEBHOOK_URL=https://dev.myhost.com/


volumes:
  n8n_data:

Information on your n8n setup

  • **n8n version: ** 1.83.2
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker-compose
  • Operating system: Ubuntu 24.10

Hi @Vlad_Sou

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

version: "3.8"

services:
  postgres:
    image: postgres:15
    restart: always
    environment:
      POSTGRES_USER: n8n
      POSTGRES_PASSWORD: password
      POSTGRES_DB: n8n
    volumes:
      - postgres_data:/var/lib/postgresql/data

  n8n:
    image: docker.n8n.io/n8nio/n8n:1.83.2
    restart: always
    ports:
      - "5678:5678"
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_PASSWORD=password
      - N8N_RUNNERS_ENABLED=true
      - N8N_RUNNERS_MODE=internal
      - N8N_RUNNERS_MAX_CONCURRENCY=5
      - N8N_RUNNERS_TASK_TIMEOUT=60
      - N8N_RUNNERS_HEARTBEAT_INTERVAL=30
      - N8N_HOST=dev.myhost.com
      - WEBHOOK_URL=https://dev.myhost.com/
      - GENERIC_TIMEZONE=Europe/Kiev
    volumes:
      - n8n_data:/home/node/.n8n
    depends_on:
      - postgres

volumes:
  n8n_data:
  postgres_data:

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.

I hope this helps.

1 Like

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

Hi @Vlad_Sou

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

  1. 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.

  1. Add Swap (Quick Fix, Not Ideal)

You can add swap memory to fake more RAM. SSH into your droplet and run:

sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo ‘/swapfile none swap sw 0 0’ | sudo tee -a /etc/fstab

This adds 1GB of swap, giving your system breathing room.

  1. Disable Unused Features

If you’re using n8n with EXECUTIONS_MODE=own or queue, consider switching to:

EXECUTIONS_MODE=main
QUEUE_MODE=off

This reduces background processes and memory use.

  1. Log with more verbosity

If needed, set export LOG_LEVEL=verbose before starting to catch more info.

2 Likes

Thank you.
Everything works fine (AI Assistent can run :wink:

1Gb droplet + your config + swap

1 Like

Great to know it :slight_smile:!

Could you mark the case as solved please?

Thank you!

Yep. Of course )

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.