# jarld configuration (`/etc/jarl/jarl.yaml`) jarld reads `/etc/jarl/jarl.yaml` (or the file given with `-c/--config`, which every jarld subcommand accepts). Every setting is optional. The defaults suit Debian/Ubuntu with BIND 9.20. Unknown keys are an error, so typos don't go unnoticed. ```sh jarld config --example # a commented example file with every setting jarld config # the effective configuration (file + defaults) ``` The CLI has its own small configuration file, described in [cli.md](cli.md). ## Settings ### Web UI and API | Key | Default | Meaning | |-----|---------|---------| | `listen` | `["127.0.0.1:8053"]` | Addresses to listen on (`host:port`, several allowed). Keep these on localhost and management networks. | | `socket` | `/run/jarl/jarl.sock` | A local unix socket for the API. Requests on it from root or jarld's own user need no token and have administrator rights; anyone else must send a token ([permissions.md](permissions.md#the-local-socket)). The `jarl` CLI uses it when no server is configured. At most 107 bytes long; `""` turns it off. If it can't be created, jarld logs a warning and serves the network addresses only. | | `tls.cert_file`, `tls.key_file` | (empty: plain HTTP) | PEM certificate chain and key. Both or neither. The files are rechecked every 10 minutes and on SIGHUP (`systemctl reload jarl`), so renewed certificates are used without a restart. | | `trusted_proxies` | `[]` | Addresses or prefixes of reverse proxies whose `X-Forwarded-For` and `X-Forwarded-Proto` (or `Forwarded: proto=`) headers are believed. Needed for correct client IPs in the audit log and for rate limiting behind a proxy, and for knowing that a proxied request came over HTTPS (the session cookie's Secure flag, `acme.httpreq`). From other addresses these headers are ignored. | | `session.lifetime` | `12h` | A web session ends this long after login... | | `session.idle_timeout` | `2h` | ...or after this long without requests. | | `session.cookie_secure` | `auto` | `auto` sets the cookie's Secure flag when the request came over HTTPS (directly or via a trusted proxy); `always` / `never` force it. | Durations accept Go syntax (`90s`, `15m`, `12h`) and days (`30d`). ### Storage | Key | Default | Meaning | |-----|---------|---------| | `database` | `/var/lib/jarl/jarl.db` | SQLite database: configuration, users, tokens, history, audit log. | | `staging_dir` | `/var/lib/jarl/staging` | Scratch space where candidate configurations are rendered and checked with named-checkconf before they are installed. | | `audit.retention_days` | `0` | Delete audit events older than this many days (0 keeps them forever). Changeset history is kept regardless. | ### Backups `jarld backup` without a file name, which the `jarl-backup.timer` systemd timer runs daily, writes `jarl-.db` into `backup.dir` (with the DNSSEC keys of signed zones inside it) and then deletes old backups there. It reads these settings from this file each time it runs; when it runs is the timer's (`systemctl edit jarl-backup.timer`). See [operations.md](operations.md#backups), also for restoring. | Key | Default | Meaning | |-----|---------|---------| | `backup.dir` | `/var/backups/jarl` | Where backups go. The backup service's sandbox may only write here; to use another directory, allow it with `ReadWritePaths=` in `systemctl edit jarl-backup.service`. | | `backup.retention` | `30d` | Delete backups older than this, by the time in their name. At least `1d`; `0` keeps every backup. | | `backup.keep_at_least` | `7` | Always keep this many of the newest backups, however old, so a long gap in backups never deletes them all. At least 1. | | `backup.stats` | `false` | Also back up the query statistics database (`stats-.db`). | | `backup.warn_after` | `2d` | The dashboard and `jarl status` warn when the newest backup is older than this. Keep it above the timer's interval; `0` turns the warning off. | Only files named `jarl-