CLI reference
Sablier is configured through the sablier command. This page is generated from the command definitions, so it always matches the running binary. See Configuration for the configuration file search order.
Commands
Sablier exposes the following commands.
sablier health
Calls the health endpoint of a Sablier instance
--url
Sablier health endpoint
# Command-line flag
--url=http://localhost:10000/healthsablier start
Start the Sablier server
Every option in the sections below configures this command.
sablier version
Print the version Sablier
Setting an option
Every configuration option can be set three ways, in increasing precedence: configuration file, then environment variable, then command-line flag.
Option keys are dotted (for example strategy.dynamic.default-theme). In the configuration file, nest each segment. For the environment variable, upper-case the key, replace . and - with _, and add the SABLIER_ prefix. As a flag, pass the key verbatim with a -- prefix. Each option below shows all three forms.
Value types
- string: any text value.
- integer: a whole number.
- number: a decimal number.
- boolean:
trueorfalse. - duration: a Go duration string, e.g.
5m,1m30s,20s,500ms.
General
| Option | Description |
|---|---|
--configFile | Config file path. |
--configFile
Config file path. If not defined, looks for sablier.(yml|yaml|toml) in /etc/sablier/ > $XDG_CONFIG_HOME > $HOME/.config/ and current directory
# Command-line flag
--configFile=<string>Logging
| Option | Description |
|---|---|
--logging.level | The logging level. |
--logging.level
The logging level. Can be one of [error, warn, info, debug]
Accepted values:
errorwarninfodebug
# sablier.yaml
logging:
level: info# Environment variable
SABLIER_LOGGING_LEVEL=info
# Command-line flag
--logging.level=infoProvider
| Option | Description |
|---|---|
--provider.auto-stop-externally-started | Continuously stop instances with sablier.enable=true that are running but were not started by Sablier |
--provider.auto-stop-on-startup | Stop all sablier.enable=true instances running at startup that were not started by Sablier |
--provider.auto-warm-externally-started | Continuously create a default-duration session for instances with sablier.enable=true that are running but were not started by Sablier, instead of stopping them |
--provider.docker.honor-restart-policy | Honor the container restart policy on successful exit: report “no”/“on-failure” containers as completed and exited “always”/“unless-stopped” containers as stopped. |
--provider.docker.strategy | Strategy to use to stop docker containers (stop or pause) |
--provider.kubernetes.burst | Maximum burst for K8S API access client-side throttling |
--provider.kubernetes.delimiter | Delimiter used for namespace/resource type/name resolution. |
--provider.kubernetes.qps | QPS limit for K8S API access client-side throttling |
--provider.name | Provider to use to manage containers [docker docker_swarm swarm kubernetes podman proxmox_lxc] |
--provider.podman.uri | Uri is the URI to connect to the Podman service. |
--provider.proxmox-lxc.tls-insecure | Skip TLS certificate verification for Proxmox VE API |
--provider.proxmox-lxc.token-id | Proxmox VE API token ID (e.g. root@pam!sablier) |
--provider.proxmox-lxc.token-secret | Proxmox VE API token secret |
--provider.proxmox-lxc.url | Proxmox VE API URL (e.g. https://proxmox:8006/api2/json) |
--provider.reject-unlabeled-requests | Reject direct named requests for instances without sablier.enable=true |
--provider.verify-enabled-on-expiration | Verify sablier.enable=true before stopping expired instances |
--provider.auto-stop-externally-started
Continuously stop instances with sablier.enable=true that are running but were not started by Sablier
# sablier.yaml
provider:
auto-stop-externally-started: false# Environment variable
SABLIER_PROVIDER_AUTO_STOP_EXTERNALLY_STARTED=false
# Command-line flag
--provider.auto-stop-externally-started=false--provider.auto-stop-on-startup
Stop all sablier.enable=true instances running at startup that were not started by Sablier
# sablier.yaml
provider:
auto-stop-on-startup: true# Environment variable
SABLIER_PROVIDER_AUTO_STOP_ON_STARTUP=true
# Command-line flag
--provider.auto-stop-on-startup=true--provider.auto-warm-externally-started
Continuously create a default-duration session for instances with sablier.enable=true that are running but were not started by Sablier, instead of stopping them
# sablier.yaml
provider:
auto-warm-externally-started: false# Environment variable
SABLIER_PROVIDER_AUTO_WARM_EXTERNALLY_STARTED=false
# Command-line flag
--provider.auto-warm-externally-started=false--provider.docker.honor-restart-policy
Honor the container restart policy on successful exit: report “no”/“on-failure” containers as completed and exited “always”/“unless-stopped” containers as stopped. Deprecated: will become the default in v2.
# sablier.yaml
provider:
docker:
honor-restart-policy: false# Environment variable
SABLIER_PROVIDER_DOCKER_HONOR_RESTART_POLICY=false
# Command-line flag
--provider.docker.honor-restart-policy=false--provider.docker.strategy
Strategy to use to stop docker containers (stop or pause)
Accepted values:
stoppause
# sablier.yaml
provider:
docker:
strategy: stop# Environment variable
SABLIER_PROVIDER_DOCKER_STRATEGY=stop
# Command-line flag
--provider.docker.strategy=stop--provider.kubernetes.burst
Maximum burst for K8S API access client-side throttling
# sablier.yaml
provider:
kubernetes:
burst: 10# Environment variable
SABLIER_PROVIDER_KUBERNETES_BURST=10
# Command-line flag
--provider.kubernetes.burst=10--provider.kubernetes.delimiter
Delimiter used for namespace/resource type/name resolution. Defaults to “_” for backward compatibility. But you should use “/” or “.”
# sablier.yaml
provider:
kubernetes:
delimiter: _# Environment variable
SABLIER_PROVIDER_KUBERNETES_DELIMITER=_
# Command-line flag
--provider.kubernetes.delimiter=_--provider.kubernetes.qps
QPS limit for K8S API access client-side throttling
# sablier.yaml
provider:
kubernetes:
qps: 5# Environment variable
SABLIER_PROVIDER_KUBERNETES_QPS=5
# Command-line flag
--provider.kubernetes.qps=5--provider.name
Provider to use to manage containers [docker docker_swarm swarm kubernetes podman proxmox_lxc]
Accepted values:
dockerdocker_swarmswarmkubernetespodmanproxmox_lxc
# sablier.yaml
provider:
name: docker# Environment variable
SABLIER_PROVIDER_NAME=docker
# Command-line flag
--provider.name=docker--provider.podman.uri
Uri is the URI to connect to the Podman service.
# sablier.yaml
provider:
podman:
uri: unix:///run/podman/podman.sock# Environment variable
SABLIER_PROVIDER_PODMAN_URI=unix:///run/podman/podman.sock
# Command-line flag
--provider.podman.uri=unix:///run/podman/podman.sock--provider.proxmox-lxc.tls-insecure
Skip TLS certificate verification for Proxmox VE API
# sablier.yaml
provider:
proxmox-lxc:
tls-insecure: false# Environment variable
SABLIER_PROVIDER_PROXMOX_LXC_TLS_INSECURE=false
# Command-line flag
--provider.proxmox-lxc.tls-insecure=false--provider.proxmox-lxc.token-id
Proxmox VE API token ID (e.g. root@pam!sablier)
# sablier.yaml
provider:
proxmox-lxc:
token-id: <string># Environment variable
SABLIER_PROVIDER_PROXMOX_LXC_TOKEN_ID=<string>
# Command-line flag
--provider.proxmox-lxc.token-id=<string>--provider.proxmox-lxc.token-secret
Proxmox VE API token secret
# sablier.yaml
provider:
proxmox-lxc:
token-secret: <string># Environment variable
SABLIER_PROVIDER_PROXMOX_LXC_TOKEN_SECRET=<string>
# Command-line flag
--provider.proxmox-lxc.token-secret=<string>--provider.proxmox-lxc.url
Proxmox VE API URL (e.g. https://proxmox:8006/api2/json)
# sablier.yaml
provider:
proxmox-lxc:
url: <string># Environment variable
SABLIER_PROVIDER_PROXMOX_LXC_URL=<string>
# Command-line flag
--provider.proxmox-lxc.url=<string>--provider.reject-unlabeled-requests
Reject direct named requests for instances without sablier.enable=true
# sablier.yaml
provider:
reject-unlabeled-requests: false# Environment variable
SABLIER_PROVIDER_REJECT_UNLABELED_REQUESTS=false
# Command-line flag
--provider.reject-unlabeled-requests=false--provider.verify-enabled-on-expiration
Verify sablier.enable=true before stopping expired instances
# sablier.yaml
provider:
verify-enabled-on-expiration: false# Environment variable
SABLIER_PROVIDER_VERIFY_ENABLED_ON_EXPIRATION=false
# Command-line flag
--provider.verify-enabled-on-expiration=falseServer
| Option | Description |
|---|---|
--server.base-path | The base path for the API |
--server.metrics.enabled | Enable the Prometheus /metrics endpoint |
--server.port | The server port to use |
--server.base-path
The base path for the API
# sablier.yaml
server:
base-path: /# Environment variable
SABLIER_SERVER_BASE_PATH=/
# Command-line flag
--server.base-path=/--server.metrics.enabled
Enable the Prometheus /metrics endpoint
# sablier.yaml
server:
metrics:
enabled: false# Environment variable
SABLIER_SERVER_METRICS_ENABLED=false
# Command-line flag
--server.metrics.enabled=false--server.port
The server port to use
# sablier.yaml
server:
port: 10000# Environment variable
SABLIER_SERVER_PORT=10000
# Command-line flag
--server.port=10000Sessions
| Option | Description |
|---|---|
--sessions.default-duration | The default session duration |
--sessions.expiration-interval | The expiration checking interval. |
--sessions.default-duration
The default session duration
# sablier.yaml
sessions:
default-duration: 5m0s# Environment variable
SABLIER_SESSIONS_DEFAULT_DURATION=5m0s
# Command-line flag
--sessions.default-duration=5m0s--sessions.expiration-interval
The expiration checking interval. Higher duration gives less stress on CPU. If you only use sessions of 1h, setting this to 5m is a good trade-off.
# sablier.yaml
sessions:
expiration-interval: 20s# Environment variable
SABLIER_SESSIONS_EXPIRATION_INTERVAL=20s
# Command-line flag
--sessions.expiration-interval=20sStorage
| Option | Description |
|---|---|
--storage.file | File path to save the state |
--storage.file
File path to save the state
# sablier.yaml
storage:
file: <string># Environment variable
SABLIER_STORAGE_FILE=<string>
# Command-line flag
--storage.file=<string>Strategy
| Option | Description |
|---|---|
--strategy.blocking.default-refresh-frequency | Default refresh frequency at which the instances status are checked for blocking strategy |
--strategy.blocking.default-timeout | Default timeout used for blocking strategy |
--strategy.dynamic.custom-themes-path | Custom themes folder, will load all .html files recursively |
--strategy.dynamic.default-refresh-frequency | Default refresh frequency in the HTML page for dynamic strategy |
--strategy.dynamic.default-theme | Default theme used for dynamic strategy |
--strategy.dynamic.show-details-by-default | Show the loading instances details by default |
--strategy.blocking.default-refresh-frequency
Default refresh frequency at which the instances status are checked for blocking strategy
# sablier.yaml
strategy:
blocking:
default-refresh-frequency: 5s# Environment variable
SABLIER_STRATEGY_BLOCKING_DEFAULT_REFRESH_FREQUENCY=5s
# Command-line flag
--strategy.blocking.default-refresh-frequency=5s--strategy.blocking.default-timeout
Default timeout used for blocking strategy
# sablier.yaml
strategy:
blocking:
default-timeout: 1m0s# Environment variable
SABLIER_STRATEGY_BLOCKING_DEFAULT_TIMEOUT=1m0s
# Command-line flag
--strategy.blocking.default-timeout=1m0s--strategy.dynamic.custom-themes-path
Custom themes folder, will load all .html files recursively
# sablier.yaml
strategy:
dynamic:
custom-themes-path: <string># Environment variable
SABLIER_STRATEGY_DYNAMIC_CUSTOM_THEMES_PATH=<string>
# Command-line flag
--strategy.dynamic.custom-themes-path=<string>--strategy.dynamic.default-refresh-frequency
Default refresh frequency in the HTML page for dynamic strategy
# sablier.yaml
strategy:
dynamic:
default-refresh-frequency: 5s# Environment variable
SABLIER_STRATEGY_DYNAMIC_DEFAULT_REFRESH_FREQUENCY=5s
# Command-line flag
--strategy.dynamic.default-refresh-frequency=5s--strategy.dynamic.default-theme
Default theme used for dynamic strategy
# sablier.yaml
strategy:
dynamic:
default-theme: hacker-terminal# Environment variable
SABLIER_STRATEGY_DYNAMIC_DEFAULT_THEME=hacker-terminal
# Command-line flag
--strategy.dynamic.default-theme=hacker-terminal--strategy.dynamic.show-details-by-default
Show the loading instances details by default
# sablier.yaml
strategy:
dynamic:
show-details-by-default: true# Environment variable
SABLIER_STRATEGY_DYNAMIC_SHOW_DETAILS_BY_DEFAULT=true
# Command-line flag
--strategy.dynamic.show-details-by-default=trueTracing
| Option | Description |
|---|---|
--tracing.enabled | Enable OpenTelemetry distributed tracing |
--tracing.endpoint | OTLP collector base URL (used when tracing.exporter-type=otlphttp) |
--tracing.exporter-type | Trace exporter backend: otlphttp or stdout |
--tracing.sampling-rate | Fraction of traces to sample (0.0-1.0) |
--tracing.service-name | Service name reported to the tracing backend |
--tracing.enabled
Enable OpenTelemetry distributed tracing
# sablier.yaml
tracing:
enabled: false# Environment variable
SABLIER_TRACING_ENABLED=false
# Command-line flag
--tracing.enabled=false--tracing.endpoint
OTLP collector base URL (used when tracing.exporter-type=otlphttp)
# sablier.yaml
tracing:
endpoint: http://localhost:4318# Environment variable
SABLIER_TRACING_ENDPOINT=http://localhost:4318
# Command-line flag
--tracing.endpoint=http://localhost:4318--tracing.exporter-type
Trace exporter backend: otlphttp or stdout
Accepted values:
otlphttpstdout
# sablier.yaml
tracing:
exporter-type: otlphttp# Environment variable
SABLIER_TRACING_EXPORTER_TYPE=otlphttp
# Command-line flag
--tracing.exporter-type=otlphttp--tracing.sampling-rate
Fraction of traces to sample (0.0-1.0)
# sablier.yaml
tracing:
sampling-rate: 1# Environment variable
SABLIER_TRACING_SAMPLING_RATE=1
# Command-line flag
--tracing.sampling-rate=1--tracing.service-name
Service name reported to the tracing backend
# sablier.yaml
tracing:
service-name: sablier# Environment variable
SABLIER_TRACING_SERVICE_NAME=sablier
# Command-line flag
--tracing.service-name=sablier