Coolify - task runner not working

Describe the problem/error/question

I deployed an n8n instance using Coolify “n8n-with-postgres-and-worker” pattern.
It appears the task-runner container becomes unhealthy after 1min. It’s then impossible to run any code node.

I have to mention I didn’t edit the docker-compose.yaml.

What is the error message (if any)?

I added the env variable N8N_RUNNERS_LAUNCHER_LOG_LEVEL=debug to the task runner container:

2026/02/08 02:55:04 INFO  Starting launcher's health check server at port 5680
2026/02/08 02:55:04 INFO  [launcher:js] Starting launcher goroutine...
2026/02/08 02:55:04 DEBUG [launcher:js] Changed into working directory: /home/runner
2026/02/08 02:55:04 INFO  [launcher:py] Starting launcher goroutine...
2026/02/08 02:55:04 DEBUG [launcher:py] Changed into working directory: /home/runner
2026/02/08 02:55:04 DEBUG [launcher:py] Env vars to pass to runner: [N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT N8N_RUNNERS_LAUNCHER_LOG_LEVEL N8N_RUNNERS_MAX_CONCURRENCY PATH TZ N8N_RUNNERS_TASK_BROKER_URI N8N_RUNNERS_HEALTH_CHECK_SERVER_ENABLED N8N_RUNNERS_HEALTH_CHECK_SERVER_PORT N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT N8N_RUNNERS_TASK_TIMEOUT N8N_RUNNERS_EXTERNAL_ALLOW PYTHONPATH N8N_RUNNERS_STDLIB_ALLOW]
2026/02/08 02:55:04 INFO  [launcher:py] Waiting for task broker to be ready...
2026/02/08 02:55:04 DEBUG [launcher:js] Env vars to pass to runner: [GENERIC_TIMEZONE HOME N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT N8N_RUNNERS_MAX_CONCURRENCY PATH TZ N8N_RUNNERS_TASK_BROKER_URI N8N_RUNNERS_HEALTH_CHECK_SERVER_ENABLED N8N_RUNNERS_HEALTH_CHECK_SERVER_PORT N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT N8N_RUNNERS_TASK_TIMEOUT NODE_FUNCTION_ALLOW_BUILTIN NODE_FUNCTION_ALLOW_EXTERNAL N8N_RUNNERS_HEALTH_CHECK_SERVER_HOST]
2026/02/08 02:55:04 INFO  [launcher:js] Waiting for task broker to be ready...
2026/02/08 02:55:10 DEBUG [launcher:js] Task broker is ready
2026/02/08 02:55:10 DEBUG [launcher:py] Task broker is ready
2026/02/08 02:55:10 DEBUG [launcher:py] Fetched grant token for launcher
2026/02/08 02:55:10 DEBUG [launcher:py] Launcher ID: e858df46004316c2
2026/02/08 02:55:10 DEBUG [launcher:js] Fetched grant token for launcher
2026/02/08 02:55:10 DEBUG [launcher:js] Launcher ID: b11c8b31addbfbf7
2026/02/08 02:55:10 DEBUG [launcher:py] Connected: ws://n8n:5679/runners/_ws?id=e858df46004316c2
2026/02/08 02:55:10 DEBUG [launcher:js] Connected: ws://n8n:5679/runners/_ws?id=b11c8b31addbfbf7
2026/02/08 02:55:10 DEBUG [launcher:py] <- Received message `broker:inforequest`
2026/02/08 02:55:10 DEBUG [launcher:py] -> Sent message `runner:info`
2026/02/08 02:55:10 DEBUG [launcher:js] <- Received message `broker:inforequest`
2026/02/08 02:55:10 DEBUG [launcher:js] -> Sent message `runner:info`
2026/02/08 02:55:10 DEBUG [launcher:py] <- Received message `broker:runnerregistered`
2026/02/08 02:55:10 DEBUG [launcher:py] -> Sent message `runner:taskoffer` for offer ID `ce0ff0dcdbedaef4`
2026/02/08 02:55:10 INFO  [launcher:py] Waiting for launcher's task offer to be accepted...
2026/02/08 02:55:10 DEBUG [launcher:js] <- Received message `broker:runnerregistered`
2026/02/08 02:55:10 DEBUG [launcher:js] -> Sent message `runner:taskoffer` for offer ID `4fbe4b5a23f2904f`
2026/02/08 02:55:10 INFO  [launcher:js] Waiting for launcher's task offer to be accepted...

The logs stuck there and the container becomes then “unhealthy”.

Please share your workflow

Share the output returned by the last node

Any

Information on your n8n setup

  • n8n version: 2.6.3
  • Database (default: SQLite): Postgres
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker via Coolify
  • Operating system: Redhat

Hi @ElBaud, welcome to the n8n community :tada: ! From my experience, this is expected behavior and not an error in your setup. I would fix it by adjusting or disabling the health check for the task runner container in Coolify, since runners can stay idle while waiting for tasks and still be fully functional. Once you run a workflow with a Code or Python node, the runner will pick up the task and work normally, hopefully this helps.

Hi @ElBaud, welcome!

This appears to be a bug in the Coolify n8n template, The Task Runner is incorrectly trying to connect to the main instance instead of the worker:

The Fix: You just need to update the N8N_RUNNERS_TASK_BROKER_URI environment variable in your compose file to point to the n8n-worker container:

N8N_RUNNERS_TASK_BROKER_URI=${N8N_RUNNERS_TASK_BROKER_URI:-http://n8n-worker:5679}

Also, make sure the value is correctly configured in Coolify environment variables:

2 Likes

Thanks, you’re right!
I checked the official repo and it was already correct… I do not understand how I retrieve myself with a wrong value!

1 Like

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