Skip to content

Environment variables

Only things that must be known before the app starts live in the environment: paths, the port, the public address and two keys. Everything an admin chooses (Audiobookshelf, sign-in, Discord, the schedule, the folder template, download settings) is set in the app and stored in its database.

Variable Default Meaning
ARMARIUM_PUBLIC_URL http://localhost:8080 How browsers reach Armarium. Single sign-on’s callback is built from it, and an https:// address makes the session cookie secure.
ARMARIUM_LIBRARY_DIR /library The Audiobookshelf library folder inside the container. Use the same path Audiobookshelf uses.
ARMARIUM_STAGING_DIR (unset) Where downloads wait before shelving. Set it to <library>/.armarium so shelving is one rename; see Storage. Unset, it’s /data/users/<id>/books.
LIBATION_MASTER_KEY (file) Base64 of 32 bytes; encrypts members’ Audible sign-ins. Unset, Armarium creates /config/libation-master.key.
ARMARIUM_SESSION_SECRET (file) Base64 of 32 bytes; signs sessions. Unset, Armarium creates /config/session.key.
ARMARIUM_CONFIG_DIR /config Database and keys.
ARMARIUM_DATA_DIR /data Members’ Libation data and default staging.
PORT 8080 The port Armarium listens on.
ARMARIUM_LIBATION_CLI /libation/LibationCli Libation’s command-line tool. The image has it there already.
Variable Meaning
ARMARIUM_AUTH_MODE=dev Every request runs as one fixed user, with no sign-in. Never on a server others can reach.
ARMARIUM_DEV_USER That user, as id:role, e.g. me:admin.
ARMARIUM_WORKERS=false No scans, downloads, digests or clean-up. For working against seeded data.
ARMARIUM_DEMO=1 Demo mode: a seeded world with simulated Audible and Audiobookshelf.

The example compose file also uses ARMARIUM_HOME (the host folder holding config/ and data/) and ARMARIUM_LIBRARY_PATH (the library’s host path) to build its volume mounts. Armarium itself doesn’t read them.