[launcher:py] Failed to execute `launch` command: failed to chdir into configured dir (): chdir : no such file or directory

Describe the problem/error/question

The external task launcher failed

What is the error message (if any)?

2025/12/08 15:23:28 INFO Starting launcher’s health check server at port 5680
2025/12/08 15:23:28 INFO [launcher:py] Starting launcher goroutine…
2025/12/08 15:23:28 ERROR [launcher:py] Failed to execute launch command: failed to chdir into configured dir (): chdir : no such file or directory
2025/12/08 15:23:28 ERROR [launcher:js] Failed to execute launch command: failed to chdir into configured dir (): chdir : no such file or directory
2025/12/08 15:23:28 INFO [launcher:js] Starting launcher goroutine…

Information on your n8n setup

  • n8n version: 1.121.3
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Dokploy Docker

My docker file is

services:

n8n:
build: ../files/
# image: n8nio/n8n:latest
restart: unless-stopped
container_name: n8n-main
environment:
# Configuration PostgreSQL
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
- DB_POSTGRESDB_USER=${POSTGRES_USER}
- DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}

  #--- task runners (broker) ---
  - N8N_RUNNERS_ENABLED=true
  - N8N_RUNNERS_MODE=external
  - N8N_RUNNERS_BROKER_LISTEN_ADDRESS=0.0.0.0
  - N8N_RUNNERS_AUTH_TOKEN=${N8N_RUNNERS_AUTH_TOKEN}
  - N8N_NATIVE_PYTHON_RUNNER=true
  
  # SÉCURITÉ - Encryption (IMPORTANT)
  - N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
  
  # Configuration réseau
  - N8N_HOST=${N8N_HOST}
  - N8N_PORT=${N8N_PORT}
  - N8N_PROTOCOL=http
  - NODE_ENV=production
  - WEBHOOK_URL=https://${N8N_HOST}/
  - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
  - N8N_SECURE_COOKIE=false
  
volumes:
  - n8n_data:/home/node/.n8n
depends_on:
  postgres:
    condition: service_healthy

task-runners:
build:
context: ../files/
dockerfile: Runner-Dockerfile
image: n8nio/runners:1.121.3
restart: unless-stopped
environment:
- N8N_RUNNERS_TASK_BROKER_URI=http://n8n-main:5679
- N8N_RUNNERS_AUTH_TOKEN=${N8N_RUNNERS_AUTH_TOKEN}
- N8N_RUNNERS_LAUNCHER_LOG_LEVEL=debug
# - N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT=15
# - N8N_RUNNERS_MAX_CONCURRENCY=5
depends_on:
- n8n

volumes:
n8n_data:
postgres_data:

Hi @tauist, welcome!

Could you clarify a bit more? Are you having an issue with setting up the task runner,
or was it working before and the problem is in a code node?

Hi,

I just add the task runner code in the docker according to the documentation, when I deploy it. The main n8n docker works fine but task runner code shows above error.

There is no log showing where the launcher is trying to change the directory too. Am I missing creating folders or something?

Can you try change this to

N8N_RUNNERS_TASK_BROKER_URI=http://n8n:5679

Hello everyone,

I have encountered the same issue.

In my case, I host on Kubernetes, but I build two Docker images from the base images to add custom nodes and Node.js modules. In the task runner image, I copied a n8n-task-runners.json file. The problem lies precisely here. The documentation (Task runners | n8n Docs) provides a JSON file.

Without thinking, I took this content and replaced only what I needed. The problem is that this empties the content of the “workdir” variable, which prevents the task runner from launching from the start.

It is essential to retrieve the complete configuration file (n8n/docker/images/runners/n8n-task-runners.json at master · n8n-io/n8n · GitHub).

3 Likes

I tried that, it didn’t work. So I add the main container name like the document shows. But it still doesn’t work. The thing is the error shows health check pass then start launch goroutine, then failed to switich directory. What directory should I set for the runner?

Thanks for the sharing, this is the real problem. Must add the working dir in the json.

“workdir”: “/home/runner”,

it’s not mentioned in the doc.

thanks, so much time lost with this issue :skull:

Thanks! It’s working!)