Docs / Reference
Configuration
yasp reads a small startup configuration: where it's reachable, which database to use, the encryption key, how people sign in, and how it serves HTTP. Everything else (monitors, components, pages, email delivery, retention, static copies) lives in the database and is edited in the dashboard.
# The file and environment variables
Settings come from two places, and you can use either or both:
-
A TOML file. yasp reads
./yasp.tomlif it exists. To use another file, pass--config /etc/yasp/yasp.toml(or-c) or setYASP_CONFIG=/etc/yasp/yasp.toml. A file named this way must exist, or yasp stops with an error. -
Environment variables starting with
YASP_. They override the file. Use__(two underscores) between nested names:File Environment variable base_url = "…"YASP_BASE_URL=…[database] url = "…"YASP_DATABASE__URL=…[oidc] client_secret = "…"YASP_OIDC__CLIENT_SECRET=…[tls] acme_email = "…"YASP_TLS__ACME_EMAIL=…Values are parsed TOML-style, so lists and tables fit in one variable:
YASP_SERVER__TRUSTED_PROXIES='["10.0.0.0/8"]' YASP_BOOTSTRAP__ADMIN_EMAILS='["you@example.com"]' YASP_ENCRYPTION__KEYS='[{id="k1",key="base64:…"}]'Only variables that start with a known section are read:
YASP_BASE_URL,YASP_LISTEN, andYASP_DATABASE__,YASP_ENCRYPTION__,YASP_OIDC__,YASP_SAML__,YASP_EMAIL_LOGIN__,YASP_DEMO__,YASP_BOOTSTRAP__,YASP_SERVER__,YASP_TLS__andYASP_SELF_MONITOR__. OtherYASP_variables are ignored. (Before 0.1.2,YASP_EMAIL_LOGIN__andYASP_DEMO__were ignored too; set those in the file there.)
A misspelled key in the file is an error, not silently ignored, so typos show up at startup. Check a configuration without starting the server:
yasp --config /etc/yasp/yasp.toml check-config
It validates everything and prints a summary without secrets.
Every setting is read once, at startup. After you change the file or the environment, restart yasp. The same goes for files the configuration points at: TLS certificate files and SAML metadata are read (or fetched) when yasp starts.
# Top level
| Setting | Default | What it does |
|---|---|---|
base_url | http://localhost:8080 | The public address, e.g. https://status.example.com. Used in links, emails, feeds, probe commands and sign-in redirects. It must be an absolute http or https URL without a query or fragment; a trailing slash is ignored. With [tls] it must use https. |
listen | 127.0.0.1:8080 | The address and port to listen on. The Docker images set 0.0.0.0:8080. With [tls], this is the HTTPS address, usually 0.0.0.0:443. |
#
[database]
One URL chooses the backend. SQLite needs nothing else and creates the file if it's missing; Postgres (15 or newer) is for running several instances (see high availability). yasp applies migrations at startup.
| Setting | Default | What it does |
|---|---|---|
url | required | sqlite:///var/lib/yasp/yasp.db (anything starting with sqlite:), or postgres://user:pass@host/yasp (postgresql:// works too). Other schemes are refused. Treated as a secret: never printed or logged. |
The Docker images set sqlite:///data/yasp.db.
#
[[encryption.keys]]
Secrets you enter in the dashboard (the SMTP password, webhook secrets, certificate keys) are
encrypted with this key before they are stored. Generate one with yasp keys generate
(--id names it; the default is k1).
On first start yasp stores a check value made with the key. Afterwards it refuses to start with a key that doesn't match, so a wrong key fails loudly instead of corrupting data. Every instance sharing a database needs the same keys.
Backups don't contain the key. Keep it somewhere else, such as a password manager or secrets store: without it, the secrets in a restored database can't be read.
With SQLite you can leave the keys out. yasp then makes a key on first start and keeps
it in yasp.key next to the database file (for sqlite:///data/yasp.db, that's
/data/yasp.key), readable only by yasp, and uses it on every start after. It's the quick
way to try yasp, but the key then sits next to the data it protects, so a copy of that
directory has both. For anything that matters, configure the key explicitly instead. Postgres
always needs a configured key, because every instance must share it.
| Setting | Default | What it does |
|---|---|---|
id | required | A name for the key. Stored next to everything it encrypts. |
key | required | base64:…, as printed by yasp keys generate. |
With keys configured, the list needs at least one entry. The first is the primary key, used for everything new.
Rotating the key. Generate a new key with a new id, put it first in the list and keep
the old one after it, restart, then run yasp keys rotate. It re-encrypts every stored
secret with the new key and updates the startup check, and is safe while yasp runs. After
that the old key can go. Manage and unsubscribe links in emails sent before the rotation stop
working once their key is removed, so you may want to keep it a while.
[[encryption.keys]]
id = "k1"
key = "base64:…"#
[oidc]
Dashboard sign-in with OpenID Connect. Register yasp at your identity provider with the
redirect URI {base_url}/admin/auth/callback. yasp asks for the openid, email and
profile scopes and reads the role from the ID token. When a person matches several roles,
they get the highest.
| Setting | Default | What it does |
|---|---|---|
issuer | required | The issuer URL; yasp discovers the rest at /.well-known/openid-configuration. Must use https, except for localhost, 127.0.0.1 and [::1]. |
client_id | required | The client id. |
client_secret | required | The client secret. |
role_claim | groups | The ID-token claim holding groups or roles. A string or a list of strings. |
role_map | empty | Which claim values grant which role. The roles are admin, editor and viewer. |
[oidc]
issuer = "https://idp.example.com/realms/main"
client_id = "yasp"
client_secret = "…"
role_claim = "groups"
[oidc.role_map]
admin = ["yasp-admins"]
editor = ["ops"]
viewer = ["staff"]#
[saml]
Dashboard sign-in with SAML 2.0, alongside or instead of OIDC. It needs a build with SAML
(the yasp-saml image); other builds refuse to start when [saml] is set. See
SAML sign-in for what to register at the identity provider.
| Setting | Default | What it does |
|---|---|---|
idp_metadata_url | none | Where the identity provider publishes its metadata. Fetched at startup. |
idp_metadata_file | none | A local copy of the metadata instead. Set exactly one of the two. |
role_attribute | groups | The attribute holding groups or roles. |
role_map | empty | Which attribute values grant which role: admin, editor or viewer. |
email_attribute | the usual ones | The attribute holding the email address. By default yasp looks for email, mail and the common claim URIs, then an email-format Name ID. |
name_attribute | the usual ones | The attribute holding the display name. |
#
[email_login]
Sign-in with one-time links sent by email, for people without an account at your identity
provider, or instead of one. Admins invite people from Users in the dashboard. Invited
people and bootstrap admins can then ask for a link on the sign-in page. Sending links needs
email delivery, set up in the dashboard under Notifications → Email delivery. Before that,
yasp admin invite --email you@example.com --role admin invites someone and prints a link.
| Setting | Default | What it does |
|---|---|---|
enabled | false | Turns email sign-in on. |
As a variable: YASP_EMAIL_LOGIN__ENABLED=true.
#
[demo]
For a public, read-only demo: the sign-in page offers a shared demo account that sees every screen but can't change anything. Only for installs meant to be public. See running a public demo.
| Setting | Default | What it does |
|---|---|---|
enabled | false | Turns demo mode on. |
As a variable: YASP_DEMO__ENABLED=true.
#
[bootstrap]
The first admin has to come from somewhere. These people are always admin, whatever the role map or the Users screen says, which also makes them a way back in if you lock yourself out.
| Setting | Default | What it does |
|---|---|---|
admin_emails | empty | Email addresses that are always admin. Compared without regard to case. With OIDC or SAML, the identity provider must report the address as verified. These addresses may also use email sign-in when it's on. |
admin_claim | none | A value of the role claim (oidc.role_claim, or saml.role_attribute) that is always admin. |
If you can't sign in at all, yasp admin grant --email … --role admin gives a role to
someone who has signed in before.
#
[server]
| Setting | Default | What it does |
|---|---|---|
trusted_proxies | empty | Reverse proxies and load balancers whose X-Forwarded-For and Forwarded headers yasp believes, as CIDRs (10.0.0.0/8, 203.0.113.7/32). Set it when yasp is behind a proxy, so rate limits, the audit log and private pages limited to certain networks see visitors' addresses rather than the proxy's. |
metrics_token | none | Require Authorization: Bearer <token> on /metrics. See observability. |
outbound_allow | empty | Private networks or hosts that yasp itself may call: notification webhooks and static-copy uploads. Private addresses are refused by default, like probe checks. Each entry is a CIDR, an IP address or a host name. |
[server]
trusted_proxies = ["10.0.0.0/8"]
metrics_token = "…"
outbound_allow = ["192.168.1.0/24", "hooks.internal"]#
[tls]
Built-in HTTPS, with certificate files, automatic certificates (ACME), or both. Leave the
section out when a reverse proxy terminates TLS. With [tls], listen serves HTTPS and
http_listen answers ACME challenges and redirects everything else to HTTPS. See
HTTPS and custom domains.
| Setting | Default | What it does |
|---|---|---|
cert | none | PEM certificate chain, used for the base host and any host without its own certificate. |
key | none | PEM private key for cert. Set both or neither. |
acme_email | none | Contact address for the ACME account. Setting it turns automatic certificates on. |
acme_directory | letsencrypt | letsencrypt, letsencrypt-staging, or the URL of another ACME directory (ZeroSSL, step-ca, Pebble). |
acme_ca_file | none | PEM root certificate for a private directory's own HTTPS (step-ca, Pebble). |
acme_base_host | on when no cert | Also get an ACME certificate for the base URL's host. |
http_listen | 0.0.0.0:80 | Plain-HTTP address for ACME HTTP-01 challenges and redirects. |
Set cert and key, or acme_email, or all three.
#
[self_monitor]
yasp can't report its own death. Point this at an external dead-man's switch (healthchecks.io, Cronitor, an Uptime Kuma push monitor) and it alerts when the pings stop.
| Setting | Default | What it does |
|---|---|---|
heartbeat_url | none | Fetched every 60 seconds while this instance leads and the database answers. With several instances only the leader pings, so the pings stop when no instance can lead. Private addresses are allowed here. |
#
[vapid]
Browser push notifications to subscribers identify this server to the push services with a contact address.
| Setting | Default | What it does |
|---|---|---|
subject | the base URL | A mailto: address or an https:// URL push services can contact you at. |
# Outside the configuration
A few things are set on the command line or with standard variables, not in yasp.toml:
| Setting | Default | What it does |
|---|---|---|
--config, -c / YASP_CONFIG | ./yasp.toml if present | The configuration file. |
--log-format / YASP_LOG_FORMAT | json | json or pretty. |
RUST_LOG | info | The log level. |
OTEL_EXPORTER_OTLP_ENDPOINT and friends | off | Trace export; see observability. |
# A complete example
# Where people reach yasp. Used in every link it sends.
base_url = "https://status.example.com"
# HTTPS on 443, since [tls] is set below. Without [tls], e.g. "127.0.0.1:8080".
listen = "0.0.0.0:443"
[database]
# SQLite file, created if missing. Or postgres://yasp:…@db.internal/yasp
url = "sqlite:///var/lib/yasp/yasp.db"
# From `yasp keys generate`. Back it up separately from the database.
[[encryption.keys]]
id = "k1"
key = "base64:…"
# Dashboard sign-in through your identity provider.
# Redirect URI: https://status.example.com/admin/auth/callback
[oidc]
issuer = "https://idp.example.com/realms/main"
client_id = "yasp"
client_secret = "…"
role_claim = "groups"
[oidc.role_map]
admin = ["yasp-admins"]
editor = ["ops"]
viewer = ["staff"]
# Also let invited people without an IdP account sign in with emailed links.
[email_login]
enabled = true
# Always admin, even before the groups above exist.
[bootstrap]
admin_emails = ["you@example.com"]
[server]
# The load balancer in front of yasp.
trusted_proxies = ["10.0.0.0/8"]
# Prometheus sends this as a bearer token.
metrics_token = "…"
# Let webhooks reach this internal host.
outbound_allow = ["hooks.internal"]
# Automatic certificates for the base host and every custom domain.
# Port 80 must be reachable for challenges.
[tls]
acme_email = "ops@example.com"
# Pinged every minute while yasp is healthy.
[self_monitor]
heartbeat_url = "https://hc-ping.com/…"