homelab
← The journey

01 · October 2026

Lanthorn

A database console for the homelab.

Problem

Every app I ran kept a database inside a container: Postgres in one, a SQLite file in another, credentials spread across a dozen .env files. Looking inside one meant exec-ing into a container and hoping I didn't break anything.

Fix

Lanthorn finds the databases itself, in Docker, .env, compose and Terraform files, and Arcane projects. It keeps their credentials encrypted and opens every one of them read-only.

What it is

A database console for the homelab

Lanthorn is one console for Postgres, MySQL, MariaDB and the SQLite files behind apps like Jellyfin, the *arrs, Vaultwarden and Home Assistant. It imports what it discovers in one click, then lets you browse tables, run queries, read plans and watch server health. Writes are opt-in per connection or unlocked for a few minutes at a time, and every query lands in an audit log. It's built for a homelab where many apps each bring their own database and nobody wants to remember where they all are.

Discovery

Finds database containers on your Docker hosts, connection strings in app containers, credentials in .env, compose.yaml and Terraform files, and every project Arcane manages. Import them in one click.

Read-only by default

Every query runs in a READ ONLY transaction that is always rolled back. Writes need a read/write connection or a temporary unlock, and destructive statements still ask first.

Four engines

Postgres, MySQL and MariaDB over the network, and SQLite files found in scan folders and container mounts, opened read-only.

Query and EXPLAIN

A SQL editor with schema-aware autocomplete, per-connection history and CSV or JSON export. On Postgres, a visual plan tree that highlights the slowest node and misestimated row counts.

Browse and edit

Filter, sort and page tables, inspect JSON cells, and see columns, indexes, constraints and triggers. With write access, edits are staged and shown as the exact SQL before they apply in one transaction.

Health checks and alerts

Unused and duplicate indexes, bloat, wraparound, long transactions and connection use, each with a suggested fix. Background alerts go to Slack, Discord, ntfy, email and more.

Schema history

Snapshot a schema before an app upgrade, then diff any two snapshots, the live schema or another connection, with a draft migration.

Backups

Scheduled pg_dump and mariadb-dump runs to a folder, NFS or SMB share, SFTP or S3-compatible storage, with retention and restores from the UI.

Screens

A closer look

Demo data throughout. Click any screen to see it full size.

The SQL editor running a query, with results below and a read-only transaction badge
Databases discovered through Arcane, grouped by compose project
Database containers found on the Docker host, with reachability and found passwords
A table's rows with a JSON cell open in the side panel
A table's columns, types, defaults and indexes
The overview in the light theme

How it fits

What it talks to

  • Postgres, MySQL and MariaDBthe databases you browse and query
  • Docker hostsfind database containers and connection strings, and read SQLite files in containers
  • Arcane APIfind databases in the compose projects Arcane manages
  • Backup destinationsscheduled dumps to a folder, NFS/SMB, SFTP or S3
  • Notification servicesalerts for unreachable databases, long queries, growth and replication lag
  • Your OIDC providersingle sign-on, if you set it up

See it on the network diagram →

Security

How it keeps things safe

  • Read-only mode is enforced in layers: a read-only session, every request inside BEGIN TRANSACTION READ ONLY … ROLLBACK, one statement per call, and transaction-control statements refused before they reach the server.
  • Connection passwords are sealed with AES-256-GCM, bound to their connection id. Discovered secrets never reach the browser.
  • DROP, TRUNCATE, and DELETE or UPDATE without a WHERE must be confirmed, and the server enforces it, not just the UI.
  • Viewers are forced read-only on the server, and connections they weren't given don't exist as far as they can tell. Every query and change is in the audit log.
  • Status API tokens are hashed at rest and only work on the read-only status endpoints.

Run it

One container

Port
3030
Image
ghcr.io/vitafortis/lanthorn

One container and one volume. Back up the master key, or set it yourself; without it, stored passwords can't be recovered.

Gaps

What it doesn't do yet

  • Discovery reaches Docker through its socket, which is root on that host. Keep Lanthorn behind sign-in.
  • Some features are Postgres-only, such as the visual EXPLAIN tree and vacuum statistics. MySQL and MariaDB get the server's own plan output.
  • Superuser connections are still read-only in Lanthorn, but a dedicated read-only role is the stronger guarantee. Lanthorn generates the SQL for one.