SextantDocs
v2.4latest
v2.4latestv1.9legacy

Switching keeps you on the same page when it exists in the other version.

On this page

Configuration file

Every key in sextant.toml with its type and default, from the server and store to queues, handlers and retention.

Updated Configuration Version v2.4

Sextant reads sextant.toml from the current folder, or the path in --config or SEXTANT_CONFIG. Run sextant config check after every edit; it validates the file and prints the line of the first error.

A complete example, with the values you are most likely to change:

sextant.tomlTOML
[server]
listen = "0.0.0.0:7420"
public_url = "https://sextant.internal.example"
mode = "production"

[store]
driver = "postgres"
dsn = "postgres://sextant@db:5432/sextant?sslmode=require"
max_connections = 20

[metrics]
listen = "0.0.0.0:9464"

[logging]
level = "info"
format = "json"

[retention]
succeeded = "7d"
failed = "30d"

[queues.default]
concurrency = 10

[queues.emails]
concurrency = 20
timeout = "30s"
max_attempts = 8

[handlers.build-report]
exec = ["/opt/reports/build.sh"]
timeout = "20m"

server

listenaddress optional default 127.0.0.1:7420
Where the API listens. Use 0.0.0.0 only behind a firewall or a TLS-terminating proxy.
public_urlurl optional
The URL clients use. Used in webhook payloads and links in logs.
modestring optional default production
production or development. Development servers issue sxt_test_ tokens and allow plain-text bootstrap output.
tickduration optional default 1s
Scheduler tick. Lower values make delayed jobs start more precisely at the cost of store reads.
shutdown_timeoutduration optional default 15s
How long to let in-flight requests finish on SIGTERM.

store

driverstring optional default sqlite
sqlite or postgres.
dsnstring required default file:sextant.db
SQLite path (file: prefix) or Postgres connection URL. Prefer the SEXTANT_STORE_DSN variable for passwords.
read_dsnstring optional
Optional read replica for GET endpoints. Workers and the scheduler always use the primary.
max_connectionsinteger optional default 10
Postgres pool size per process. Remember that every worker and server holds a pool.
auto_migrateboolean optional default false
Apply migrations on start. Convenient in development; run sextant migrate up explicitly in production.

queues

One table per queue: [queues.<name>]. Every job must name an existing queue.

concurrencyinteger optional default 10
Maximum running jobs in this queue, summed across all workers.
max_attemptsinteger optional default 5
Attempts per job, including the first.
timeoutduration optional default 5m
Per-attempt time limit.
leaseduration optional default 30s
Default lease for workers on this queue.
priority_levelsboolean optional default true
Let priority reorder jobs within the queue. Disable for strict first-in, first-out.

Backoff lives in [queues.<name>.backoff]:

strategystring optional default exponential
exponential, linear or fixed.
baseduration optional default 5s
Wait before attempt two.
factorfloat optional default 2
Multiplier for exponential; step for linear.
maxduration optional default 1h
Upper bound for any wait.
jitterfloat optional default 0.2
Random spread, 0 to 1.

handlers

Handlers run by sextant worker. One table per handler: [handlers.<name>].

execlist of strings required
Command and arguments. Never passed through a shell.
timeoutduration optional
Overrides the queue timeout.
cwdpath optional
Working directory.
envtable optional
Extra environment variables. The worker’s own environment is passed through otherwise.
cancel_graceduration optional default 10s
Time between SIGTERM and SIGKILL on cancel or timeout.

metrics

listenaddress optional
Address for /metrics. Metrics are off when unset.
pathstring optional default /metrics
URL path.

logging

levelstring optional default info
debug, info, warn or error.
formatstring optional default json
json or text.

retention

How long finished jobs and their attempt records stay in the store. A nightly sweep deletes older ones.

succeededduration optional default 7d
Succeeded and cancelled jobs.
failedduration optional default 30d
Failed and dead jobs.
output_bytesinteger optional default 65536
Captured output kept per attempt.

compat

v1_apiboolean optional default false
Serve the v1 REST routes on top of the v2 store. For migrations only; see Migrating from v1.

limits

reads_per_minuteinteger optional default 1000
Per token. 0 disables the limit.
writes_per_minuteinteger optional default 300
Per token. 0 disables the limit.