Skip to content

Database setup

The backend reads its configuration from config/.env.

Required variables

JWT_SECRET

A strong secret used to sign authentication tokens. Use a long, random value and keep it private.

Example:

JWT_SECRET=replace-this-with-a-long-random-secret

Optional variables

ACCESS_TOKEN_EXPIRE_MINUTES

How long access tokens remain valid, in minutes. The default is 60.

IMAGE_QUALITY

Image quality used by the image-processing pipeline. The default is 85.

MAX_BACKUPS_SIZE

Maximum total size of backup archives, in bytes. The default is 1000000000.

BACKUP_INTERVAL_SECONDS

How often periodic backups run, in seconds. The default is 3600 seconds.

ID

A UUID used as the server identifier. If it is not set, the application generates one automatically.

Setup flow

  1. Create a virtual environment and install the dependencies.
  2. Create config/.env and set JWT_SECRET.
  3. Run python3 setup.py to initialize the databases and create the first admin user.
  4. Start the server with ./start.sh.

The application will create the required directories automatically when it starts.