Finper uses two separate environment files that are consumed by different parts of the monorepo:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/soker90/finper/llms.txt
Use this file to discover all available pages before exploring further.
.envat the repo root — loaded by the API (packages/api) viadotenv. Create this file by copying.env.examplebefore you start the API for the first time.packages/client/.env— loaded by Vite at dev-server startup and baked into the production build. It holds a single variable that tells the React app where to find the API.
.env take effect the next time you restart the API; changes to packages/client/.env take effect the next time Vite restarts or you rebuild the client.
API environment variables
These variables are read from.env in the repo root and consumed exclusively by the API process.
| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_FILE | No | ./finper-dev.db | Path to the SQLite database file. Can be relative (resolved from the process working directory) or absolute. When running via Docker Compose the recommended path is /home/node/app/data/finper.db, which maps to the persistent finperdb volume. |
JWT_SECRET | Yes | — | Secret string used to sign and verify all JWT tokens. Must be long and random in production — see the warning below. |
SALT_ROUNDS | Yes | — | Number of bcrypt hashing rounds applied to passwords. 10 is the standard default; increase for stronger security at the cost of slower login. |
GRAFANA_LOGGER_USER | No | — | Username for the external Grafana Loki log-shipping integration. Leave blank to disable remote logging. |
GRAFANA_LOGGER_PASSWORD | No | — | Password for the Grafana Loki logger. Used together with GRAFANA_LOGGER_USER. |
TICKET_BOT_URL | No | — | Base URL of the finper-bot external ticket service (e.g. https://bot.example.com). Required only if you use the Tickets module. |
TICKET_BOT_API_KEY | No | — | API key used to authenticate requests from the API to the finper-bot service. Required together with TICKET_BOT_URL. |
CORS_EXTRA_ORIGINS | No | — | Comma-separated list of additional origins allowed by the CORS middleware (e.g. https://finance.example.com,https://app.example.com). localhost and IPs in the 192.168.1.x subnet are already permitted by default. |
ALLOW_REGISTRATION | No | false | Set to true to allow anyone to create an account via POST /api/auth/register. Disabled by default to prevent unwanted signups on public deployments. |
Frontend environment variables
This variable lives inpackages/client/.env and is consumed by Vite. It is prefixed with VITE_ so that it is exposed to the browser bundle.
| Variable | Required | Default | Description |
|---|---|---|---|
VITE_API_HOST | Yes | http://localhost:3008/api/ | Base URL of the API consumed by the React client. All axios requests are built relative to this value. Must end with a trailing slash. Update this when deploying the client against a remote API. |
If
VITE_API_HOST is missing or incorrect, every API call in the client will fail — there is no built-in fallback URL. Always verify this value when deploying the frontend to a new environment.Docker Compose variables
When running Finper with the includeddocker-compose.yml or docker-compose.prod.yml, two additional variables are interpolated by Compose for the Loki log-shipping sidecar:
| Variable | Required in Compose | Description |
|---|---|---|
LOKI_USER | No | Loki username used by the Compose logging configuration. Mirrors the value of GRAFANA_LOGGER_USER. |
LOKI_PASSWORD | No | Loki password used by the Compose logging configuration. Mirrors the value of GRAFANA_LOGGER_PASSWORD. |