Storage Backends¶
router-hosts supports three storage backends. SQLite is the default and recommended for most deployments.
Comparison¶
| Feature | SQLite | PostgreSQL | DuckDB |
|---|---|---|---|
| Setup complexity | Low | Medium | Low |
| Concurrent connections | Limited | High | Limited |
| Embedded | Yes | No | Yes |
| Production ready | Yes | Yes | Experimental |
SQLite (Default)¶
Best for single-server deployments. Zero configuration required.
Default location (if no URL specified): ~/.local/share/router-hosts/hosts.db
PostgreSQL¶
Best for high-availability deployments with multiple server instances.
Requires PostgreSQL 14+.
DuckDB¶
Experimental backend. Requires the router-hosts-duckdb binary variant.
Warning
DuckDB support is experimental. Use SQLite or PostgreSQL for production.