Skip to content

Configuration reference ​

Vaultisse is configured with environment variables, set in the .env file next to docker-compose.yml. After you change .env, apply it with:

bash
docker compose up -d

Settings you leave out use the default shown below.

The essentials ​

VariableDefaultWhat it does
JWT_SECRETnone, requiredSecret that signs login sessions. Use a long random value: openssl rand -hex 32. Changing it signs everyone out.
DB_PASSWORDnone, requiredPassword for the database.
FRONT_END_URLhttp://localhost:3000The address people type in the browser, including https:// and no trailing slash. It controls which origins the server accepts, so it must match exactly.
ALLOW_DEV_AUTHfalseSkips login with a fake session. Never true on a real server.
APP_TAGlatestWhich Vaultisse version to run. Pin it, for example 1.3.5.

Network and ports ​

VariableDefaultWhat it does
API_PORT3000Port the app listens on, and the port published on the host.
TRUST_PROXYfalseSet true only when a reverse proxy or tunnel is in front of the app. It makes rate limiting use each visitor's real address. With it on and no proxy, visitors can fake their address.
ALLOW_HTTPfalseSet true only when the app is reached over plain http:// on something other than localhost, such as http://192.168.1.50:3000. Without it browsers rewrite every link to https://. Leave false whenever HTTPS is in front.
CSP_EXTRA_IMG_SRCemptyExtra websites allowed to serve book covers, comma separated, for example https://covers.example.com.
CLOUDFLARE_TUNNEL_TOKENemptyOnly used with the cloudflare profile, see Reverse proxy & HTTPS.

Database ​

VariableDefaultWhat it does
DB_NAMEvaultisseName of the database.
DB_USERpostgresDatabase user.
DB_PASSWORDnoneDatabase password.

With the supplied compose file the app always reaches the database as db on port 5432 inside the Compose network, whatever DB_HOST and DB_PORT say. Those two only matter if you run the app outside Docker.

Accounts and sessions ​

VariableDefaultWhat it does
REGISTRATION_ENABLEDtruefalse turns off the registration page and the sign-up link. Nobody can create an account by password.
REGISTRATION_REQUIRES_APPROVALfalsetrue lets people register but keeps the account disabled until you enable it in the database, see Installation.
SESSION_TIME3600000How long a login lasts without activity, in milliseconds (one hour). Activity renews it.
MAX_SESSION_AGE_DAYS30The longest a login can last, even with constant activity. After this people must sign in again.
DEMO_MODEfalseMakes the instance read-only for public demos: only sign-in and browsing work, and SSO is switched off.

Single sign-on ​

All of these are explained, step by step, on Single sign-on.

VariableDefaultWhat it does
OIDC_ISSUERemptyAddress of your identity provider.
OIDC_CLIENT_IDemptyClient ID from the provider.
OIDC_CLIENT_SECRETemptyClient secret from the provider.
OIDC_REDIRECT_URIemptyMust be exactly https://your-address/auth/oidc/callback.
OIDC_SCOPESopenid profile emailWhat to ask the provider for.
OIDC_BUTTON_LABELSign in with SSOText of the button on the sign-in page.
OIDC_GROUPS_CLAIMgroupsName of the field that holds a person's groups. Which group opens which vault is set in each vault, not here.
OIDC_PERSONAL_VAULTtrueGive a new SSO user a library of their own on first sign-in. Set to false so they see only the vaults their groups give them.
SSO_ONLYfalseTurn off password sign-in and registration, so SSO is the only way in. Ignored unless SSO is on.

SSO is on only when the first four are all set.

Uploads and limits ​

VariableDefaultWhat it does
MAX_EBOOK_FILE_SIZE_MB10Largest ebook file (.epub, .pdf, .mobi, .azw3) a person can upload to a book. Raise it for scanned PDFs.
MAX_IMPORT_FILE_SIZE_MB10Largest CSV accepted by Importing books.
MAX_JSON_BODY_PARSE100kbLargest request body the API reads. Values such as 500kb or 1mb work.
MAX_URLENCODED_BODY_PARSE100kbSame, for form-style requests.

If you put a reverse proxy in front, it may have its own upload limit too. Nginx, for example, stops at 1m unless you raise client_max_body_size.

Book information lookups ​

VariableDefaultWhat it does
GOOGLE_BOOKS_API_KEYemptyOptional. Gives you more lookups per day from Google Books. Open Library is tried first and needs no key.
LIBRARYTHING_API_KEYemptyOptional. A third place to look for a cover when the first two have none. Free with a LibraryThing account.

Logging ​

VariableDefaultWhat it does
LOGGER_PATH/app/logsWhere the log is written inside the container. The app-logs volume keeps it. Leave it.
DEBUG_LOGGINGfalseDetailed logging, including database queries and names of people and records. Use it briefly while troubleshooting, then turn it off.

A sensible starting file ​

ini
APP_TAG=1.3.5
FRONT_END_URL=https://books.example.com
JWT_SECRET=<output of: openssl rand -hex 32>
DB_PASSWORD=<a long random password>
ALLOW_DEV_AUTH=false
TRUST_PROXY=true
REGISTRATION_ENABLED=false

This is for a public server behind a reverse proxy where you have already created the accounts you need.

Released under the MIT License.