N8N Docker giving the error "command /bin/sh not found"

When try running N8N on docker it`s giving me the error “command /bin/sh not found”

What is the error message (if any)? command /bin/sh not found

Information on your n8n setup

  • **n8n version: i tried the latest till 1.0.3 and all give me the same error
  • **Database (default: SQLite): PostgreSQL
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • **Operating system: I`m using Debian 12

I run a raspberry pi with Debian 11, i thought it was the Debian 12 that was giving me the error, but on 11 still gives me the same error, i tried running it on a x86 cpu and it gives the same thing, if i run the version " [0.236.2-debian" it works fine, but i need the latest version because some community nodes that i use, can anyone help me?

Hey @Pedro_Buffon,

Can you share what you are actually running? I suspect it might be an older docker run or docker compose file that just needs to be updated.

I’m using the following docker-compose

services:
  n8n:
    image: n8nio/n8n:latest
    restart: always
    container_name: n8n
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=10.0.0.2
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_PASSWORD=n8n
      - N8N_ENCRYPTION_KEY=*************************
      - N8N_EMAIL_MODE=smtp
      - N8N_SMTP_HOST=smtp.gmail.com
      - N8N_SMTP_USER=*************************
      - N8N_SMTP_PASS=*************************
      - N8N_SMTP_SENDER=*************************
    volumes:
      - /docker/n8n/data:/home/node/
    command: /bin/sh -c "n8n start --tunnel"
    network_mode: host

Docker version 20.10.5+dfsg1, build 55c4c88
docker-compose version 1.25.0, build unknown

Hey @Pedro_Buffon,

You will need to update the command to something like start --tunnel this is one of the changes made in v1.

1 Like

Your solution got it working, thanks!!! Now I only need to fix my community nodes

2 Likes

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