no configuration file provided: not found — docker compose found no compose file in the folder you ran it from. Change to the folder that holds compose.yaml (or docker-compose.yml), or point at the file with -f.

If the project has no compose file yet, create one; the minimal file below starts a PostgreSQL 18 container and is enough to confirm that Compose itself works.

The error

docker compose up -d
no configuration file provided: not found

Why it happens

Compose needs a project file and, unless you pass -f, it looks for one by its default names in the current working directory and its parent folders. When none of them exists it stops before contacting the engine, which is why the message is short and has no Error response from daemon in front of it. The usual causes: the terminal is open in the wrong folder (one level above the project, or inside src), the file has a non-default name such as docker-compose.dev.yml, or a file saved as compose.yaml.txt by an editor that hides extensions.

The fix

A minimal compose.yaml:

name: fix4-compose
services:
  db:
    image: postgres:18
    container_name: fix4-compose-db
    environment:
      POSTGRES_PASSWORD: fix4test
    ports:
      - "15451:5432"

The project, container, password and port 15451 are the test's own values; use your own. From the folder that holds the file, docker compose config parses it and prints the resolved project, which is the quickest check that Compose now finds it:

docker compose config
name: fix4-compose
services:
  db:
    container_name: fix4-compose-db

Then the original command works:

docker compose up -d
 Container fix4-compose-db Started
docker compose down
 Container fix4-compose-db Removed

The output above is trimmed to the last line of each step. A subfolder of the project works as well, because Compose walks up through the parent folders: in this test docker compose config --services run one level below the file still printed the service name db. From any folder outside the project, name the file explicitly instead:

docker compose -f ../withconf/compose.yaml config --services
db

How it was reproduced

On Windows 11 with Docker Desktop 4.91 (engine 29.8.2) and Docker Compose v5.5.1, from Git Bash. docker compose up -d in an empty folder failed with exit code 1. In a folder holding the compose.yaml above, docker compose config printed the resolved file, up -d started the container on port 15451 and down removed it and its network. The -f form was then run from the empty folder.

Frequently asked

What does no configuration file provided not found mean?
docker compose found no compose file where it looked. Run it from the folder that holds compose.yaml or docker-compose.yml, or pass the file with -f.
What file names does docker compose look for?
compose.yaml is the preferred name; compose.yml, docker-compose.yaml and docker-compose.yml are also found. Any other name needs the -f option.
How do I check that docker compose can read my file?
Run docker compose config in the same folder. It prints the resolved configuration, or the same not found error if no file is found.

More decoded errors in the Fixes category. New to containers? See Docker explained for beginners.