Skip to content

๐Ÿ›ก๏ธ Admin Manual

For the people who install and run LibreFolio. Almost everything is done in one of three places: from the command line, in the .env file (environment variables) or in the app's Settings โ€บ Administration tabs.


๐Ÿ“š Guides

๐Ÿณ Deployment & Exposure

โš™๏ธ System Configuration

  • ๐Ÿ“ Environment Variables: the .env file and the main variables (PORT, JWT_SECRET, LIBREFOLIO_DATA_DIR, etc.), with the precedence between the values.
  • ๐Ÿ“ง Email: optional SMTP: the variables, examples for the most common servers, the Email tab of Settings โ€บ Administration and the test email.
  • โš™๏ธ Global Settings: the runtime settings (session TTL, upload limits, market data sync intervals), the Administration tabs and the Security checks of the instance.
  • ๐Ÿ‘ฅ Users & Invitations: the app's Users tab: invitations, password-reset links, administrator rights, deactivation and deletion.

๐Ÿงน Maintenance & Operations

  • ๐Ÿ› ๏ธ CLI Admin Tools: the dev.py script for user management, database upgrades and instance backups.
  • ๐Ÿ’พ Backup, Restore & Moving: one archive with the whole instance, from Settings โ€บ Administration โ€บ Backup or from the command line: make it, check it, restore it, move LibreFolio between two installations.
  • ๐Ÿ“‚ Filesystem Structure: where databases, logs, uploads and temporary folders live, and how to perform backups.

๐Ÿ”” Update Notifications

When an administrator signs in, LibreFolio checks GitHub for a newer stable release. If there is one, the New version available window shows your version and the latest side by side, with the How to update (updating guide) and Release notes on GitHub links.

Update available modal with the current and the latest version
Button Effect
Remind me later Closes the window until a later sign-in.
Skip this version No automatic prompt for that version; an even newer one will be announced.
  • A release is announced only when its Docker image can be downloaded; the window waits until no other window or guide is open.
  • Without internet access the check fails silently: no error, no banner.
  • To check right away: Check for updates in the changelog. It reports errors, and skipped versions too.
๐Ÿ‘ฅ Other users โ€” when someone who is not an administrator checks

For users who are not administrators, no check runs at sign-in. If one of them runs Check for updates and a newer release exists, the Update available โ€” contact an administrator window lists the administrators, with their email addresses when available.


๐Ÿ” Keep Users Signed In After a Restart

JWT_SECRET is the key that signs every login session.

  • Not set (the default): a new random key at every start, so everyone signs in again after a restart or an update.
  • Set: sessions survive restarts. Set it also when several LibreFolio servers share the same users behind a load balancer.

To set it:

  1. Generate a key. From a terminal, on the host:

    python3 -c "import secrets; k = secrets.token_urlsafe(64); print(f'JWT_SECRET={k}'); print(k)"
    

    You get two lines: the first, JWT_SECRET=โ€ฆ, is ready to paste into .env; the second is the key alone, for when you keep it in a file (JWT_SECRET_FILE, below). Without Python on the host, run the command in the container:

    docker exec librefolio python -c "import secrets; k = secrets.token_urlsafe(64); print(f'JWT_SECRET={k}'); print(k)"
    
  2. Paste the first line into LibreFolio's .env file:

    JWT_SECRET=paste-the-generated-value-here
    
  3. Restart LibreFolio. With Docker Compose, run docker compose up -d.

    From then on, a restart signs nobody out.

๐Ÿ”’ Keep the key secret

Whoever knows it can forge a session.

๐Ÿณ Keep the key out of .env โ€” JWT_SECRET_FILE

Save the key in a file, such as a Docker secret, and set JWT_SECRET_FILE to its path instead of JWT_SECRET: for example JWT_SECRET_FILE=/run/secrets/jwt_secret. The rules and a Docker Compose example are in Secrets.

  • The workers of a single ./dev.py server --workers โ€ฆ share one key on their own.
  • How long a session lasts is the Session Duration in Global Settings.
  • Details for developers: Security Architecture.