Skip to content
Configure the server

Configure the server

There are three ways to define configuration options for the Sablier server:

  1. In a configuration file
  2. As environment variables
  3. As command-line arguments

These methods are evaluated in the order listed above, with later methods overriding earlier ones. If no value is provided for a given option, a default value is used.

This page covers server options. To configure the workloads Sablier manages, see Labels & annotations and the Label reference.

Configuration file

At startup, Sablier searches for a configuration file named sablier.yml (or sablier.yaml) in the following locations:

  • /etc/sablier/
  • $XDG_CONFIG_HOME/
  • $HOME/.config/
  • . (the working directory)

You can override this with the configFile argument:

sablier --configFile=path/to/myconfigfile.yml

A minimal file looks like this:

provider:
  name: docker
server:
  port: 10000
sessions:
  default-duration: 5m

Every option is listed in the CLI reference, with its type, default, and the environment variable or flag it maps to. The reference is generated from the code and never drifts. A full annotated sample is available at sablier.sample.yaml.

Environment variables

All configuration options can be set as environment variables. The variable name follows the structure of the configuration file: upper-case the dotted key, replace . and - with _, and add the SABLIER_ prefix.

For example, this configuration:

strategy:
  dynamic:
    custom-themes-path: /my/path

Becomes:

SABLIER_STRATEGY_DYNAMIC_CUSTOM_THEMES_PATH=/my/path

Arguments

To get the list of all available arguments:

sablier --help

# or

docker run sablierapp/sablier:next --help

All configuration options can be used as command-line arguments. The argument name follows the structure of the configuration file.

For example, the configuration above becomes:

sablier start --strategy.dynamic.custom-themes-path /my/path

Reference

The complete, auto-generated list of options lives in the CLI reference. Each option lists its environment variable, type, default, “since” version, and description.