Can't run Task Runner at docker

Hello, I am trying to create a container for Task Runner but every time I get unhealthy container.

Describe the problem/error/question

Unhealthy container Task Runner

What is the error message (if any)?

image

Please share your workflow

services:
  n8n:
    image: docker.n8n.io/n8nio/n8n
    environment:
      - SERVICE_URL_N8N_5678
      - 'N8N_EDITOR_BASE_URL=${SERVICE_URL_N8N}'
      - 'WEBHOOK_URL=${SERVICE_URL_N8N}'
      - 'N8N_HOST=${SERVICE_URL_N8N}'
      - 'GENERIC_TIMEZONE=${GENERIC_TIMEZONE:-Europe/Berlin}'
      - 'TZ=${TZ:-Europe/Berlin}'
      - N8N_RUNNERS_ENABLED=true
      - N8N_RUNNERS_MODE=external
      - N8N_RUNNERS_BROKER_LISTEN_ADDRESS=0.0.0.0
      - 'N8N_RUNNERS_AUTH_TOKEN=${RUNNER_SECRET}'
      - N8N_NATIVE_PYTHON_RUNNER=true
    volumes:
      - 'n8n-data:/home/node/.n8n'
    healthcheck:
      test:
        - CMD-SHELL
        - 'wget -qO- http://127.0.0.1:5678/'
      interval: 5s
      timeout: 20s
      retries: 10
  task-runners:
    image: 'n8nio/runners:2.0.3'
    container_name: n8n-runners
    environment:
      - 'N8N_RUNNERS_TASK_BROKER_URI=http://n8n-main:5679'
      - 'N8N_RUNNERS_AUTH_TOKEN=${RUNNER_SECRET}'
    depends_on:
      - n8n

Share the output returned by the last node

logs: 025-12-18T22:42:59.942654489Z 2025/12/18 22:42:59 INFO  Starting launcher's health check server at port 5680
2025-12-18T22:42:59.942941567Z 2025/12/18 22:42:59 INFO  [launcher:py] Starting launcher goroutine...
2025-12-18T22:42:59.942950293Z 2025/12/18 22:42:59 INFO  [launcher:py] Waiting for task broker to be ready...
2025-12-18T22:42:59.942954080Z 2025/12/18 22:42:59 INFO  [launcher:js] Starting launcher goroutine...
2025-12-18T22:42:59.942957076Z 2025/12/18 22:42:59 INFO  [launcher:js] Waiting for task broker to be ready...

Information on your n8n setup

  • n8n version: 2.0.3
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):**Docker
  • Operating system: Linux

Your task runner is trying to connect to n8n-main:5679 but your service is named n8n.

Change this:

N8N_RUNNERS_TASK_BROKER_URI=http://n8n-main:5679

To this:

N8N_RUNNERS_TASK_BROKER_URI=http://n8n:5679

The logs say “Waiting for task broker to be ready” - it’s just waiting forever because it can’t resolve the hostname.

2 Likes