Skip to content

Configure the server

Finances App reads configuration from environment variables and the optional Notion TOML file. Docker Compose passes the important variables from .env into the container.

Use .env for deployment settings

Start from the example:

bash
cp .env.example .env

Keep .env private. It can contain passwords, setup tokens, and Notion API keys.

First-owner bootstrap variables

Use these variables only while the database is empty:

VariablePurpose
INVOICER_SETUP_TOKENProtects browser first-run setup when the app is accessed from a non-localhost host.
INVOICER_BOOTSTRAP_WORKSPACE_NAMEName of the first workspace created by unattended bootstrap.
INVOICER_BOOTSTRAP_OWNER_NAMEDisplay name for the first owner.
INVOICER_BOOTSTRAP_OWNER_EMAILLogin email for the first owner.
INVOICER_BOOTSTRAP_OWNER_PASSWORDLogin password for the first owner.

If any INVOICER_BOOTSTRAP_* value is set, all four are required. Once at least one user exists, bootstrap variables are ignored.

Runtime storage variables

VariableDefault in DockerPurpose
INVOICER_DB_PATH/data/invoicer.sqlite3SQLite database path.
INVOICER_FILE_STORAGE/data/filesDirectory for generated PDFs and uploaded/generated files.
INVOICER_BACKUP_DIR/data/backupsManaged backup repository. If unset, the app uses a backups folder next to the DB.
INVOICER_WEB_DIST/app/web-distBuilt React app served by FastAPI.
INVOICER_COOKIE_SECUREunsetSet to 1 when serving behind HTTPS so session cookies are marked secure.

The default Compose file mounts the invoicer-data volume at /data. That volume contains the SQLite database, generated files, and backups.

Notion connector variables

Notion is optional. SQLite remains the source of truth.

VariablePurpose
NOTION_TOKENNotion integration token. Use a test workspace first.
INVOICER_CONFIG_HOST_PATHHost path to the TOML config mounted into Docker. Defaults to ./invoicer.toml.
INVOICER_CONTAINER_CONFIG_PATHContainer path for the mounted TOML config. Defaults to /root/.config/invoicer/config.toml.
INVOICER_CONFIG_PATHRuntime config path read by the API inside the container. Compose sets this to the container config path.

Create a local TOML file:

bash
cp examples/invoicer.example.toml invoicer.toml

Keep database IDs in invoicer.toml, but keep secrets in .env:

toml
[profiles.test]
token_env = "NOTION_TOKEN"

The Settings page also has a write-only Notion API key field. The API never returns the saved key.

Users, workspaces, and roles

The app separates people from finance containers:

  • A user logs in with email and password.
  • A workspace owns finance records and settings.
  • A membership gives a user a role in one workspace.

Roles:

RoleAccess
OwnerFull workspace access, including user management and owner/admin changes.
AdminDaily finance access and most workspace administration. Admins cannot manage owners.
MemberDaily finance access. Blocked from workspace administration, backup restore/configuration mutations, and Notion apply/configuration actions.

After setup, create more users and workspaces from SettingsWorkspaces and users.

Self-hosted freelancer finance tooling. Review local tax requirements before using generated invoices in production.