Skip to main content

Self-Hosting

OpenFinance is designed to be self-hosted. Your financial data stays on your server — no third-party cloud services required.

Docker Deployment

The simplest way to deploy OpenFinance is with Docker Compose.
1

Create a project directory

2

Create a docker-compose.yml

docker-compose.yml
3

Create a .env file

.env
Generate a secret:
4

Start the service

The app runs on port 3000. The database is automatically created and migrated on first startup.

Environment Variables

Building from Source

If you prefer to build the Docker image yourself:
Then update your docker-compose.yml to use image: openfinance instead of the registry image.

Reverse Proxy (HTTPS)

In production, put OpenFinance behind a reverse proxy with HTTPS. Here is an example using Caddy:
Caddy automatically provisions and renews TLS certificates. Make sure BETTER_AUTH_URL matches the public HTTPS URL.

Data & Backups

OpenFinance stores everything in a single SQLite database file. To back up your data:
To restore from a backup, copy the file back into the volume and restart the container.

Production Considerations

  • HTTPS is required for secure authentication cookies. Always run behind a reverse proxy with TLS in production.
  • Regular backups — schedule a cron job to copy the SQLite database file.
  • Resource requirements — OpenFinance is lightweight. A 1 CPU / 1 GB RAM VPS is sufficient for a single user.
  • Updates — pull the latest image and restart: