Skip to content
Serverküche
Search

Loading search …

Compose checker: your docker-compose.yml, reviewed

Paste your compose.yaml and get the weak spots named: unpinned images, databases on the proxy network, secrets in plain text, open ports.

Paste your compose.yaml below. The checker reads it as you type and points out where the file differs from what has proven itself in our recipes. Load example shows you what that looks like.

The check runs entirely in your browser – nothing is uploaded.

What the checker looks at

Findings come in three levels. An error means something won’t work. A warning stands for a real risk, usually to security or an update that catches you off guard. A note is a question for you: often it’s right as it is, sometimes not.

WhatLevelWhy
No services: blockErrorWithout it this isn’t a Compose file; almost always the indentation has slipped.
Traefik labels, but the service isn’t on the proxy networkErrorTraefik only sees containers on its own network. The labels do nothing and you get a 404.
Image without a version tag or with :latestWarningThe next pull brings a version you didn’t choose. For services with build:, :latest is common and isn’t reported.
Database or cache on the proxy networkWarningIt only needs to be reachable by its own application. This is detected by the service name (db, postgres, redis, mariadb …).
docker.sock without :roWarningWrite access to the Docker socket is practically root on the host.
privileged: trueWarningRemoves almost all of the container’s isolation. A targeted cap_add is usually enough.
version: fieldNoteCompose ignores it and warns on start; it can go.
No restart policyNoteAfter a server reboot the service stays down.
Published ports on a service behind TraefikNoteUnnecessary for HTTP; the service would then be reachable around Traefik. Ports for DNS, SSH, mail, VPN and WebRTC (such as 53, 22, 993, 51820, 10000) aren’t reported, because an HTTP proxy can’t forward them.
Password, token or key in plain text under environment:NoteThe file ends up in backups and maybe a Git repository. A variable like ${DB_PASSWORD} with the value in a .env is better. Variables, placeholders like YOUR_PASSWORD and values that are already hashed, such as an argon2 hash, aren’t reported.

Where the rules come from

Every rule comes from the recipes on this site. Together they contain 67 Compose files with 102 services (as of Nov 13, 2026), and each of them ran on a real server before it was published. That’s why many findings tell you what our own catalogue does: 98 % of the images are pinned to a version, 85 of 102 services restart with restart: unless-stopped, and only 12 % publish a port at all.

That’s a yardstick, not a law. The checker doesn’t know your use case. If a note doesn’t fit your setup, ignore it.

What it doesn’t check

The checker reads the file as it stands and knows exactly the ten rules above. So there are things it doesn’t see:

  • Whether Compose accepts the file. It checks the YAML and the services: block, but not every key. That’s what docker compose config -q in the project folder on the server is for: it finds typos in key names, invalid ports and networks that aren’t defined anywhere, and warns about missing variables. Even Compose doesn’t check every value, though.
  • What’s in .env and env_file. Variables stay unresolved. A password in command: or in a label doesn’t catch its eye either.
  • Other reverse proxies. The rules about the proxy network and published ports only apply to Traefik labels. Caddy and Nginx Proxy Manager have no labels it could go by.
  • Databases with unusual names. If your Postgres service is called storage, it won’t recognise it as a database.
  • The long syntax. docker.sock mounted as a volume with type: bind goes unnoticed.
  • Hardening and the images themselves. cap_drop, read_only, a dedicated user, health checks and resource limits are covered in Hardening Docker containers. Whether an image has known vulnerabilities, or whether the tag exists at all, isn’t checked.

Your file stays with you

Everything runs in your browser. The script evaluates the text in the field and sends nothing to any server, ours included. Once the page has loaded you can even use it offline.

Frequently asked questions

Is my compose.yaml stored or sent anywhere?
No. The checker runs entirely in your browser: the script reads the text from the field, evaluates it and shows the result. There is no request to any server. The old rule still applies, though: real passwords don’t belong in a Compose file, wherever you paste it.
The checker reports nothing. Does that mean my file is fine?
It means none of the ten pitfalls it knows about are there. Whether the file starts is something only docker compose config -q on the server can tell you, and how well the container is locked down is covered in Hardening Docker containers. The checker replaces neither.
Do I have to fix every finding?
Errors yes, because then something won’t work. Warnings almost always, they stand for a real risk. Notes are questions for you: a service that deliberately runs only once needs no restart policy, and a value named like a password can be harmless.
Why not just use :latest if I want the newest version anyway?
Because then you don’t decide when the update happens. With :latest the next docker compose pull fetches whatever new version there is, including one with breaking changes, and afterwards you don’t know which one ran before. With a fixed version you update on purpose and can go back. How to do that without much effort is covered in Keeping a Docker stack up to date.
Does it matter whether the file is called compose.yaml or docker-compose.yml?
Not for the checker, it only looks at the content. Docker Compose finds both names by itself and prefers compose.yaml if both are in the folder.