Skip to content

Config file

Rooster reads its settings from one YAML file, rooster.yaml. This page shows where Rooster looks for that file and how to create it.

Run:

rooster init

It writes a starter rooster.yaml, prints it, and says where it wrote it. By default that is ~/.config/rooster/rooster.yaml.

The starter file has comments that explain each part:

  • Targets: where Runs go. The file starts with one dev target. Each target names a target in your dbt profiles.yml. Credentials never go in this file. They stay in profiles.yml and the environment.
  • Projects: the dbt projects Rooster runs. Add yours here, then restart rooster serve.
  • Update check: how to turn off the daily check for a new release.

If the file is already there, rooster init asks whether to keep it or reset it to the starter. Without a terminal, it keeps the file and stops with an error. rooster init --force resets it without asking. Before a reset, Rooster saves the old file next to it with .bak added to the name.

To write the file somewhere else, name the path. It must end in .yaml or .yml:

rooster init --config /srv/rooster/rooster.yaml

Rooster does not look there by itself. Name the same file when you start it, as the next section shows.

Rooster uses the first config file it finds, in this order:

  1. The file named with --config.
  2. The file named in the ROOSTER_CONFIG environment variable.
  3. rooster.yaml in $XDG_CONFIG_HOME/rooster. When XDG_CONFIG_HOME is not set, that is ~/.config/rooster, on macOS too.
  4. rooster.yaml in ~/.rooster.

In steps 3 and 4, a file named rooster.yml works too.

Rooster never looks in the current directory. A rooster.yaml there is read only when you name it, for example with --config ./rooster.yaml. So rooster serve uses the same file whichever directory you start it from.

If you name a file with --config or ROOSTER_CONFIG and it does not exist, Rooster stops with an error. It does not fall back to another file.

Pass --config every time:

rooster serve --config /srv/rooster/rooster.yaml

Or set ROOSTER_CONFIG once, for example in a systemd unit or your shell profile:

export ROOSTER_CONFIG=/srv/rooster/rooster.yaml
rooster serve

rooster serve does not start without a config file. It stops, lists the places it looked, and suggests rooster init.

The other commands, such as rooster status and rooster runs list, read the same file to find the running rooster serve. If you start rooster serve with --config or ROOSTER_CONFIG, give the other commands the same file.

Run:

rooster status

The config line shows the file the running rooster serve read.

Rooster reads the file when rooster serve starts. After you edit it, restart rooster serve.