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

NO_COLOR

Sablier writes its logs to standard error with ANSI color. Setting NO_COLOR to any non-empty value turns the color off, which keeps the escape sequences out of log files and log collectors:

services:
  sablier:
    image: sablierapp/sablier:next
    environment:
      - NO_COLOR=1
10:29AM INF docker/docker.go:48 connection established with docker provider=docker strategy=stop

NO_COLOR is a cross-tool convention rather than a Sablier option, so it carries no SABLIER_ prefix and has no configuration-file or command-line equivalent. Leaving it unset, or setting it to the empty string, keeps the color.

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.