Running in Production¶
Installation gets Ferrous DNS answering queries. This section covers what comes after: keeping it running for months on a network that depends on it, getting your data back when a disk dies, and noticing trouble before your users do.
Every command and configuration file in these pages was run against a real server before it was written down. Where a page quotes a version, it writes X.Y.Z. Replace it with the release you run, from the releases page.
Before you go live¶
- Pin a release. Run a fixed version,
ferrousnetworking/ferrous-dns:X.Y.Zor the release tarball, neverlatest. Then an upgrade is a decision you make, not one that happens on a pull. See Upgrading. - Run it unprivileged. The Docker image runs as uid 1000. On bare metal, use the systemd unit, which runs as its own user and keeps only the capability to bind port 53.
- Size the host. Blocklists and the cache are held in memory. The query log grows on disk with traffic and retention. See Sizing.
- Back up the database.
--backup-databasecopies it without stopping the server. Schedule it, keep the config file and the TLS files beside it, and try a restore once. See Backups & upgrades. - Cap the logs. journald rotates on its own. Docker keeps every line unless the log driver is capped. See Logs.
- Watch it. Turn on
/metricsand load the ready-made alert rules, which fire on a DNS listener that stopped serving, upstreams down, SERVFAIL and REFUSED spikes, shed queries, a TLS certificate close to expiry and a filling disk. - Serve the dashboard over HTTPS. Put it behind a reverse proxy, keep the dashboard port off the network, and plan for certificate renewals. See TLS & reverse proxy.
- Have a second resolver. Hand out two independent instances over DHCP, so a restart or a dead host does not take name resolution with it. See Redundancy.
- Go through the security checklist. DNS cookies, rate limiting, DNSSEC mode and
trusted_proxiesare covered in Security Hardening.
In this section¶
| Page | Covers |
|---|---|
| Bare metal (systemd) | Installing the release binary as a sandboxed systemd service |
| Backups & upgrades | Online database backups, restores, upgrades and rolling back |
| Sizing | Memory for blocklists and the cache, disk for the query log, measured |
| Logs & monitoring | Where logs go, the health check, Prometheus scraping and alert rules |
| TLS & reverse proxy | The dashboard behind nginx, Caddy or Traefik, and renewing DoT/DoQ certificates |
| Redundancy | Running two resolvers, and what they do not share |