Operations
Lease store
By default leases live in a crash-safe memfile — an append-only file with atomic compaction
that survives an abrupt kill. For redundancy and shared state, switch the store to PostgreSQL
([lease] store = "postgres"); Lighthouse auto-creates its tables and, once Postgres is
configured, refuses to start if the database is unreachable rather than silently running stateless.
High availability
Lighthouse HA is shared-database active-active:
- Run two or more
lighthousedengines on separate hosts, each pointing[lease] store = "postgres"at the same database. - Both engines answer every request. The database arbitrates each allocation with an atomic claim, so no address is ever handed out twice — pools are not split between servers.
- Each engine keeps its own
server_id; clients naturally deduplicate by server-id, so there's no virtual IP to manage. If one engine goes down, the survivor keeps serving. - On a routed network, point the relay at both engines (two
ip helper-addressentries). On a flat L2 segment, both simply listen on the subnet.
Engines heartbeat their peer status, visible via the API and the System page.
Active-active removes the DHCP-server single point of failure, but the shared database becomes the new one. Run a redundant/replicated PostgreSQL (e.g. Patroni or a managed HA Postgres) for true resilience.
Backup
There's no dedicated backup tool — back up the files directly:
- the lease store (
leases.db) andreservations.json, - the management database (
mgmt.db), - the config (
lighthouse.toml).
When running on PostgreSQL, rely on your database's backups for lease and reservation state.
Logging & monitoring
The engine logs structured lines to stderr and, when [logging] file is set, to a file (required
on Windows). The management API surfaces recent lines and a durable lease-event audit history, and
the metrics endpoint feeds Prometheus.
Recovery & reset
- Admin password reset (host-local only):
lighthouse-mgmtd --reset-admin --email <email>. - Factory reset (System → Danger zone) clears leases, reservations, audit history, device notes, and all users. Use with care.