Configuration
Labitat is designed to be zero-config, but we offer powerful environment variables to tune it for your specific homelab environment.
See Compact operator dashboard for arranging services, selecting metrics, and history collection.
Key Environment Variables
| Variable | Default | Description |
|---|---|---|
SECRET_KEY | (Auto) | Used for encryption of service credentials. Must be 32+ characters. |
DATABASE_URL | file:./data/labitat.db | Connection URL for the SQLite database. |
AUTH_ENABLED | true | Set to false to allow public dashboard editing. |
NODE_ENV | development | Set to production when deploying for optimized performance. |
PORT | 3000 | The port Labitat listens on. |
Security & Encryption
One of Labitat's core principles is secure credential storage.
The Secret Key
Labitat uses AES-256-GCM to encrypt your API keys and passwords. The encryption key is derived from your SECRET_KEY using HKDF-SHA256.
Public editing
Setting AUTH_ENABLED=false lets anyone who can reach Labitat add, edit, reorder, and delete dashboard content, including service configuration. Only use it on a trusted network.
Keep it safe
If you lose your SECRET_KEY, you lose access to all stored service credentials.
- Docker: A
SECRET_KEYis automatically generated on the first run and stored in/app/data/.secret_key. - Native: You should generate a strong random key manually:bash
openssl rand -base64 32
Database Management
Labitat uses SQLite via Drizzle ORM for its simplicity and robustness.
Custom Database Path
To move your database to a different location:
DATABASE_URL=file:/mnt/storage/homelab/labitat.dbManagement Commands
For advanced users managing their own instance manually:
| Command | Purpose |
|---|---|
pnpm db:push | Push schema changes directly to the database |
pnpm db:migrate | Run production migrations |
pnpm db:studio | Open a GUI to browse your database content |
First Run Setup
On your first visit, Labitat will guide you through the Setup Wizard. This process handles:
- Creating the initial database schema.
- Setting up the primary Admin Account.
- Generating an encryption key (if one isn't provided).
Account Security
All users created in Labitat are stored locally in your SQLite database. Labitat does not call home or use external authentication providers.
Dashboard appearance and metrics
Choose Light or Dark from Theme. Earlier palette preferences map to the corresponding light or dark theme.
Widgets show up to four metrics by default. In Edit, open an item and use Stat Card Layout to show metrics from Unused, hide them, or change their order. Dragging and the labeled buttons both work. Explicit selections may contain more than four metrics; new metrics stay unused. Reset to defaults restores the widget's default selection.
Moves save immediately. Item and group dialogs save with Update or Create; Cancel discards their draft. Appearance and refresh settings are collapsed in the item dialog. Download and stream details expand on demand in view mode.
The card's status details show the last successful update separately from the last attempt. Failed updates retain useful saved values and label them as cached. Saved records from earlier versions have an unknown successful-update time until a live fetch succeeds.