When running n8n with Docker Compose, it keeps restarting and reporting errors

When running n8n with Docker Compose, it keeps restarting and reporting errors.
This is logs

Error: Command “start” not found
However, in my YML file, there is no “start” keyword; only “n8n” is present.
help me look
thanks

Hey :waving_hand:

I also ran into this when I first tried n8n with Docker Compose. The error Command "start" not found usually doesn’t mean your YAML has start — it comes from how the container is launched.

Couple of things to check:

  1. Docker Compose command section
    In your docker-compose.yml, the command: line should simply be n8n
    Example:

    services:
      n8n:
        image: n8nio/n8n
        restart: always
        ports:
          - "5678:5678"
        volumes:
          - ./n8n_data:/home/node/.n8n
        command: n8n
    
    

    If it accidentally says start (or if Docker is picking it up from an old config), you’ll see that error.

  2. Image version
    Make sure you are pulling the latest stable image:

    docker pull n8nio/n8n:latest
    
    

    Then docker-compose down && docker-compose up -d to restart clean.

  3. Clear old containers
    Sometimes an old container keeps trying to run the wrong entrypoint. Run:

    docker ps -a
    docker rm -f <container_id>
    
    

    Then bring it back up fresh.


In short:
Keep command: n8n (not start)
Use the latest image
Recreate the container

That usually fixes this issue.

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