Appearance
Environment Variables
API Service (Nitro)
| Variable | Required | Default | Purpose |
|---|---|---|---|
NITRO_DATABASE_URL | Yes (prod) | postgresql://localhost/libris | PostgreSQL connection string |
NITRO_REDIS_URL | Yes (prod) | — | Redis connection for BullMQ + cache |
NITRO_INBOX_PATH | Yes (prod) | — | Directory watched for new book files |
NITRO_LIBRARY_PATH | Yes (prod) | — | Directory for organized book storage |
NITRO_API_SECRET_KEY | Yes | — | Secret for token encryption (min 32 chars) |
NITRO_KOSYNC_USERNAME | No | — | KoSync credentials (env var fallback) |
NITRO_KOSYNC_PASSWORD_HASH | No | — | bcrypt hash of KoSync password |
In development, Redis and cache use in-memory storage drivers.
Metadata Sources
API keys for metadata enrichment are stored in the database via Settings > Connections, not as env vars. Both are optional — sources without a configured key are skipped during ingestion.
| Source | Key type | Where to get it |
|---|---|---|
| Hardcover | Bearer token | hardcover.app/account/api |
| Google Books | API key | Google Cloud Console (enable Books API) |
Frontend (Nuxt)
| Variable | Required | Default | Purpose |
|---|---|---|---|
NUXT_SESSION_PASSWORD | Yes | — | Session cookie encryption (min 32 chars) |
NUXT_API_BASE_URL | No | http://localhost:3000 | Internal BFF-to-API URL |
NUXT_PUBLIC_API_PUBLIC_URL | No | — | Client-side API URL (for OPDS/KoSync display) |
Test Environment
| Variable | Value | Purpose |
|---|---|---|
NITRO_DATABASE_URL | postgresql://libris_test:libris_test@localhost:5433/libris_test | Isolated test DB |
NITRO_REDIS_URL | redis://localhost:6380 | Isolated test Redis |
NITRO_INBOX_PATH | /tmp/test-inbox | Ephemeral inbox |
NITRO_LIBRARY_PATH | /tmp/test-library | Ephemeral library |
E2E_TEST | 1 | Disables rate limiting |
E2E_API_KEY | (generated) | Seeded by global-setup.ts |
See .env.test.example for a complete template.