Docker-compose throwing "command not found" error

Hey, all. I’m new to the community.

Running a self-hosted VPS instance of n8n via docker-compose + sqlite.

I’m attempting to update n8n to the latest version. I’ve backed up my database, workflows, and credentials.

However, when I run docker-compose pull (or docker-compose ), I get the following error:

/usr/local/bin/docker-compose: line 1: Not: command not found

When I edit /usr/local/bin/docker-compose, it contains the string “Not found”

I’ve tried reinstalling docker-compose and chmod’ing to +x but nothing works…

Running docker-compose (including --version) gives me the “command not found” error I’ve quoted above.

In the meantime, n8n appears to be running just fine.

Can you offer any advice here?

Thanks.

1 Like

Hi @power

Welcome to n8n community forum!

Can you try running the below command and check whether the docker-compose is installed properly.

docker-compose --version

Sure thing, @mcnaveen

Running:

docker-compose --version

Generates the error:

/usr/local/bin/docker-compose: line 1: Not: command not found

And for the record… it WAS installed (and running) correctly as I have an active n8n container right now running per the specs of the docker-compose.yml file in my root directory.

Thoughts?

1 Like

This is more of a docker issue than n8n. I assume you’re running an older version of Docker.

Can you try running docker compose without a dash?

Ah… Progress.

Running docker compose version gives me:

Docker Compose version v2.12.2

Which I believe is “kind of” recent, right? A few weeks old.

In light of this, is my solution simply to run

docker compose pull

Without the dash?

Looks like you might have version 1 of standalone docker-compose installed, which breaks with new docker. docker compose (without the -) is the version 2. please only use that.

Reporting the issue is now resolved.

The version of compose I’m using doesn’t require (or permit!?) the dash.

So I was able to run the following commands without issue to upgrade n8n:

docker compose pull
docker compose down
docker compose up -d

All is good.

Thank you for your help, @netroy and @mcnaveen!

1 Like

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