Skip to content

Quick start

You need a Linux host running Docker with Compose v2, and an API key for a model - Anthropic’s, or any OpenAI-compatible one, local models included.

  1. Get the reference compose file. It runs the doctor, its socket proxy and an optional SMART sidecar for drive health, which starts only with --profile smart.

    Terminal window
    mkdir container-doctor && cd container-doctor
    curl -O https://raw.githubusercontent.com/sebastianbuechler/container-doctor/main/compose.example.yaml
  2. Create the data directory, owned by the user the doctor runs as (1000:1000 unless you set DOCTOR_UID and DOCTOR_GID):

    Terminal window
    mkdir -p data && sudo chown 1000:1000 data
  3. Set the minimum. Put a model and a dashboard password in a .env file next to the compose file. The password is required - without it (or OIDC) the dashboard refuses every request - and placeholders such as change-me are refused; generate one with openssl rand -base64 24:

    .env
    ANTHROPIC_API_KEY=sk-ant-...
    DOCTOR_WEB_PASSWORD=<openssl rand -base64 24>
  4. Start it.

    Terminal window
    docker compose -f compose.example.yaml up -d

    Add --profile smart to start the SMART sidecar as well.

  5. Open the dashboard at http://<host>:8080 and sign in with the password.

Any OpenAI-compatible endpoint works the same way; see Models and cost for free, cheap and local options.

It starts in observe mode: it detects incidents and diagnoses them, and changes nothing. Read a week of its diagnoses before you let it act - see Your first week.

Two commands, run inside the doctor’s container, tell you whether the Docker endpoint and the model are wired up correctly:

Terminal window
# What the Docker endpoint permits - restart yes, create no
docker compose -f compose.example.yaml exec container-doctor python -m app.preflight
# One synthetic incident through the model, without touching a container
docker compose -f compose.example.yaml exec container-doctor python -m app.selftest
  • Installation - hosts, Docker managers and what the compose file sets up.
  • Settings - everything but secrets can be changed on the dashboard.
  • Environment variables - every setting, generated from the code.