Self-hosting / Configuration
Configuration
Environment variables of the Uptime Kotlin image, and how to use your own JWT keys.
Uptime Kotlin is configured with environment variables, set in the environment block of your compose.yaml.
Environment variables
| Variable | Default | Description |
|---|---|---|
ENCRYPTION_MASTER_KEY |
required | At least 32 bytes. Encrypts the stored secrets and the JWT signing key. To change it, see Rotate the master key. |
QUARKUS_DATASOURCE_USERNAME |
PostgreSQL user. | |
QUARKUS_DATASOURCE_PASSWORD |
PostgreSQL password. | |
QUARKUS_DATASOURCE_JDBC_URL |
PostgreSQL JDBC URL, for example jdbc:postgresql://postgres:5432/uptime-kotlin. |
|
MP_JWT_VERIFY_ISSUER |
Issuer of the JWT tokens. | |
SCHEDULER_STRATEGY |
database |
none when workers run the checks (see Cluster mode). |
SCHEDULER_WORKER_CONCURRENCY |
4 |
Checks run in parallel. |
MAINTENANCE_HORIZON_DAYS |
90 |
Maintenance windows. Same value on the application and the workers. |
MAINTENANCE_MAX_DURATION_HOURS |
24 |
Maintenance windows. Same value on the application and the workers. |
NOTIFICATIONS_DISPLAY_TIMEZONE |
UTC |
Zone of the dates in Slack, Teams, Telegram, Matrix, ntfy, Gotify, browser and e-mail notifications (IANA name, for example Europe/Paris). Same value on the application and the workers. Webhook payloads stay in UTC (ISO-8601). |
NOTIFICATIONS_DATE_FORMAT |
dd/MM/yyyy HH:mm:ss VV |
Format of those dates, as a Java DateTimeFormatter pattern, with English day and month names. An invalid pattern falls back to the default. Examples in Dates in the messages. Same value on the application and the workers. |
NOTIFICATIONS_WEB_PUSH_SUBJECT |
project URL | Contact given to the browser push services with each browser notification: mailto:[email protected] or an https:// URL. Same value on the application and the workers. |
RESET_ADMIN_PASSWORD |
E-mail of a locked-out admin. On startup, its password is replaced by a temporary one printed in the logs, and its two-factor authentication is turned off. Remove it once the new password is chosen. See Recover a locked-out admin. | |
TWO_FACTOR_ISSUER |
Uptime Kotlin |
Name of the entry created in the authenticator app when a user turns on two-factor authentication. Set it per instance to tell several instances apart. |
QUARKUS_HTTP_PROXY_PROXY_ADDRESS_FORWARDING |
false |
true reads X-Forwarded-Host and X-Forwarded-For, only from the addresses in QUARKUS_HTTP_PROXY_TRUSTED_PROXIES. Only needed behind a proxy that changes the Host header. See Behind a reverse proxy. |
QUARKUS_HTTP_PROXY_TRUSTED_PROXIES |
127.0.0.1,::1 |
Addresses of the proxies allowed to send forwarded headers, IPs or CIDR, comma-separated. Never list addresses that clients can use. |
NOTIFICATIONS_PAGERDUTY_EVENTS_URL |
PagerDuty | Events API v2 endpoint of PagerDuty, https://events.pagerduty.com/v2/enqueue. Accounts in the EU service region use https://events.eu.pagerduty.com/v2/enqueue. Same value on the application and the workers. |
Behind a reverse proxy
Forward every path to port 8080, allow a 300 s read timeout for exports, and keep the Host header: Caddy, Traefik, the Coolify and Dokploy proxies and a default nginx proxy_set_header Host $host; all do.
The host of a request chooses which status page a custom domain serves, so Uptime Kotlin ignores X-Forwarded-Host by default: a client could send any value. If your proxy sends its own Host and puts the original one in X-Forwarded-Host, trust that proxy only:
QUARKUS_HTTP_PROXY_PROXY_ADDRESS_FORWARDING: 'true'
QUARKUS_HTTP_PROXY_TRUSTED_PROXIES: 172.18.0.0/16Forwarded headers from any other address are ignored.
Use your own JWT keys
The JWT signing key is stored in the database, encrypted with ENCRYPTION_MASTER_KEY. To use your own keys instead, set both variables and mount the files:
| Variable | Description |
|---|---|
MP_JWT_VERIFY_PUBLICKEY_LOCATION |
Path to the public key. |
SMALLRYE_JWT_SIGN_KEY_LOCATION |
Path to the private key, in PKCS#8 format. |
