Skip to main content

Configuration

Flags override environment variables. Shell exports override values loaded from .env. Optional alternate dotenv path: ATHENAEUM_ENV_FILE.

FlagEnvDefaultDescription
--addrATHENAEUM_ADDR:8080HTTP listen address
--libraryATHENAEUM_LIBRARY./libraryRoot directory scanned for books
--dataATHENAEUM_DATA./dataDatabase and cover cache location
--database-driverATHENAEUM_DATABASE_DRIVERsqliteDatabase backend: sqlite or postgres
--database-urlATHENAEUM_DATABASE_URLPostgreSQL connection URL (required for postgres)
--web-dirATHENAEUM_WEB_DIRServe frontend from this directory instead of embedded assets
--admin-userATHENAEUM_ADMIN_USERBootstrap admin username
--admin-passATHENAEUM_ADMIN_PASSBootstrap admin password (min 8)
--upload-max-bytesATHENAEUM_UPLOAD_MAX_BYTES2147483648Max upload size in bytes (2 GB)
--scan-workersATHENAEUM_SCAN_WORKERS2Parallel library index workers
--log-levelATHENAEUM_LOG_LEVELinfoLog level: debug, info, warn, error
--log-fileATHENAEUM_LOG_FILEAlso append logs to this file
--debugATHENAEUM_DEBUGfalseShortcut for --log-level=debug
--pprofATHENAEUM_PPROFLoopback pprof listen address (e.g. 127.0.0.1:6060)
--colorATHENAEUM_COLORautoCLI color: auto, always, never
--no-colorATHENAEUM_NO_COLORfalseDisable ANSI color (NO_COLOR also works)
--sandboxATHENAEUM_SANDBOXtryLinux Landlock/seccomp: off, try, strict
--sandbox-landlockATHENAEUM_SANDBOX_LANDLOCKtrueToggle Landlock when sandbox is on
--sandbox-seccompATHENAEUM_SANDBOX_SECCOMPtrueToggle seccomp-bpf when sandbox is on
--demoATHENAEUM_DEMOfalseSeed generated demo books, audiobooks, and covers
--self-checkVerify dirs, database, and HTTP health then exit
--healthcheckProbe /api/health on loopback then exit (container healthchecks)
--sentry-dsnATHENAEUM_SENTRY_DSNSentry/GlitchTip DSN (server)
--sentry-dsn-publicATHENAEUM_SENTRY_DSN_PUBLICBrowser DSN (defaults to server DSN)
--sentry-environmentATHENAEUM_SENTRY_ENVIRONMENTSentry environment tag
--sentry-releaseATHENAEUM_SENTRY_RELEASEapp versionSentry release name
--sentry-traces-sample-rateATHENAEUM_SENTRY_TRACES_SAMPLE_RATE0Performance trace sample rate (0-1)
--comicvine-api-keyATHENAEUM_COMICVINE_API_KEYComic Vine API key for comic metadata lookup
--altchaATHENAEUM_ALTCHA_ENABLEDfalseRequire ALTCHA PoW on protected auth forms
--altcha-modeATHENAEUM_ALTCHA_MODEbuiltinbuiltin or sentinel
--altcha-hmac-secretATHENAEUM_ALTCHA_HMAC_SECRETHMAC secret for builtin challenges (auto-persisted under data/ when empty)
--altcha-hmac-key-secretATHENAEUM_ALTCHA_HMAC_KEY_SECRETOptional secondary HMAC key secret
--altcha-challenge-urlATHENAEUM_ALTCHA_CHALLENGE_URLWidget challenge URL override
--altcha-sentinel-urlATHENAEUM_ALTCHA_SENTINEL_URLSentinel base URL
--altcha-verify-urlATHENAEUM_ALTCHA_VERIFY_URLSentinel verify URL
--altcha-api-key-secretATHENAEUM_ALTCHA_API_KEY_SECRETSentinel API key secret
--altcha-costATHENAEUM_ALTCHA_COST5000Builtin PoW cost
--altcha-expiresATHENAEUM_ALTCHA_EXPIRES300Challenge expiry seconds
--altcha-protectATHENAEUM_ALTCHA_PROTECTlogin,setupComma-separated forms to protect
--altcha-widget-autoATHENAEUM_ALTCHA_WIDGET_AUTOonsubmitWidget auto mode: off, onfocus, onload, onsubmit
--altcha-widget-displayATHENAEUM_ALTCHA_WIDGET_DISPLAYstandardWidget display: standard, bar, floating, overlay, invisible
--altcha-widget-typeATHENAEUM_ALTCHA_WIDGET_TYPEcheckboxWidget type: checkbox, switch, native
--altcha-widget-themeATHENAEUM_ALTCHA_WIDGET_THEMEautoWidget theme: auto, light, dark, or a named ALTCHA theme
--altcha-widget-languageATHENAEUM_ALTCHA_WIDGET_LANGUAGEWidget language ISO code (empty follows UI locale)
--altcha-widget-nameATHENAEUM_ALTCHA_WIDGET_NAMEaltchaHidden input name for the ALTCHA payload
--altcha-widget-workersATHENAEUM_ALTCHA_WIDGET_WORKERS0PoW web workers (0 = library default)
--altcha-widget-hide-logoATHENAEUM_ALTCHA_WIDGET_HIDE_LOGOfalseHide ALTCHA logo in the widget
--altcha-widget-hide-footerATHENAEUM_ALTCHA_WIDGET_HIDE_FOOTERfalseHide ALTCHA footer attribution
--password-min-lengthATHENAEUM_PASSWORD_MIN_LENGTH8Minimum password length
--password-long-lengthATHENAEUM_PASSWORD_LONG_LENGTH12Length that satisfies diversity without min-kinds (0 disables)
--password-min-kindsATHENAEUM_PASSWORD_MIN_KINDS3Minimum character classes (0 disables diversity rule)
--password-require-lowerATHENAEUM_PASSWORD_REQUIRE_LOWERfalseRequire a lowercase letter
--password-require-upperATHENAEUM_PASSWORD_REQUIRE_UPPERfalseRequire an uppercase letter
--password-require-digitATHENAEUM_PASSWORD_REQUIRE_DIGITfalseRequire a digit
--password-require-symbolATHENAEUM_PASSWORD_REQUIRE_SYMBOLfalseRequire a symbol

CLI-only (see CLI users):

EnvDescription
ATHENAEUM_PASSWORDPassword for athenaeum users when --password is omitted
ATHENAEUM_ENV_FILEAlternate dotenv path loaded at startup

Upload parts are stored under {data}/uploads/ until complete. Short-lived S3 scan downloads use {data}/tmp/.

Library S3 backends are configured per mount in Settings (or via POST /api/libraries), not through environment variables. See Library and readers.

Database​

SQLite is the default and recommended for single-node installs. The database file lives at {data}/athenaeum.db (or legacy reader.db).

PostgreSQL is optional for operators who want an external database:

ATHENAEUM_DATABASE_DRIVER=postgres
ATHENAEUM_DATABASE_URL=postgres://user:pass@host:5432/athenaeum?sslmode=require

Full-text search uses SQLite FTS5 on the default backend, and PostgreSQL tsvector with GIN indexes (prefix queries) when using postgres. Schema is created automatically on first connect. Covers and uploads still use ATHENAEUM_DATA.

Sandbox (Linux)​

On Linux, --sandbox=try applies Landlock V9 via go-landlock in BestEffort mode (filesystem allowlist for data/library, optional --web-dir, plus common system paths) and a seccomp-bpf denylist for dangerous syscalls. Use strict to require Landlock V9 without BestEffort fallback.