Log inSign up

Firefly III: a private budget and money tracker

Download the Firefly III Compose file plus the .env and .db.env templates, set a 32-character APP_KEY, matching database passwords, APP_URL and a STATIC_CRON_TOKEN, bind the app to 127.0.0.1:8080 and run docker compose up -d. Publish it at money.example.net with Caddy or Nginx and HTTPS, register the owner account, and the cron container keeps recurring transactions and rules running.

Topic: Self-hosted apps · Tested on: Ubuntu 24.04 and 22.04, Debian 12 and 13 · Updated 2026-12-03

What do you need for Firefly III?

Firefly III is a self-hosted personal finance manager: accounts, budgets, categories, recurring transactions, rules and reports, all in a web interface. Your financial history stays on a server you control, which is the main reason people host it themselves.

  • Server: Ubuntu 24.04 or Debian 12/13 with Docker Engine and Compose (Docker Engine), or the Docker app image.
  • Memory: 1 GB runs the app and MariaDB for one household; 2 GB leaves room for imports and reports over many years of data.
  • DNS: a name such as money.example.net, created as in DNS records.

Since the data is sensitive, follow SSH keys and hardening before you load real statements.

How do you fetch the Compose files?

The project publishes a ready Compose setup with three services: the app, MariaDB and a small cron container. Download it with the two environment templates.

sudo mkdir -p /opt/firefly && cd /opt/firefly
sudo wget -O docker-compose.yml https://raw.githubusercontent.com/firefly-iii/docker/main/docker-compose.yml
sudo wget -O .env https://raw.githubusercontent.com/firefly-iii/firefly-iii/main/.env.example
sudo wget -O .db.env https://raw.githubusercontent.com/firefly-iii/docker/main/database.env
ls -la

Open docker-compose.yml and read it once. Note the published port of the app service and the URL inside the cron service; both need small edits below.

Which values must you set in the environment files?

Generate the secrets, then edit both files so the database credentials agree.

tr -dc A-Za-z0-9 </dev/urandom | head -c 32; echo    # APP_KEY
tr -dc A-Za-z0-9 </dev/urandom | head -c 32; echo    # STATIC_CRON_TOKEN
openssl rand -hex 16                                  # database password
sudo nano /opt/firefly/.env
APP_KEY=PasteExactly32CharactersHere0000
APP_URL=https://money.example.net
SITE_OWNER=deploy@example.net
TZ=UTC
TRUSTED_PROXIES=**
DB_HOST=db
DB_DATABASE=firefly
DB_USERNAME=firefly
DB_PASSWORD=paste-database-password
STATIC_CRON_TOKEN=PasteAnother32CharacterToken0000

Then in .db.env set MYSQL_PASSWORD to the same database password and keep MYSQL_USER and MYSQL_DATABASE equal to the values above. APP_KEY must be exactly 32 characters; a wrong length stops the app with an encryption error. TRUSTED_PROXIES=** lets Firefly III trust the forwarded HTTPS headers from your proxy. Finally lock the files with sudo chmod 600 .env .db.env.

How do you start Firefly III on loopback?

Change the port mapping so only the local proxy can reach the app, place the cron token in the cron service, and start the stack.

cd /opt/firefly
grep -n '8080\|REPLACEME' docker-compose.yml
sudo sed -i 's/- "80:8080"/- "127.0.0.1:8080:8080"/' docker-compose.yml
sudo sed -i 's/REPLACEME/PasteAnother32CharacterToken0000/' docker-compose.yml
sudo docker compose up -d
sudo docker compose logs -f app       # wait until migrations finish
curl -sI http://127.0.0.1:8080/login | head -n 1

The grep shows exactly how your copy writes the port and the cron placeholder; adjust the two sed patterns if the text differs. A 200 or 302 status line means the app is serving pages. The cron container calls /api/v1/cron/<token> once a day, which creates recurring transactions and runs scheduled tasks.

How do you add HTTPS?

Place a reverse proxy before the app. With Caddy:

money.example.net {
    reverse_proxy 127.0.0.1:8080
}

With Nginx, use a block with proxy_pass http://127.0.0.1:8080;, the headers Host, X-Forwarded-For and X-Forwarded-Proto, then run Certbot:

sudo nginx -t && sudo systemctl reload nginx
sudo certbot --nginx -d money.example.net
sudo ufw allow 80,443/tcp
sudo ufw status

If pages load but styles or redirects point at http://, check APP_URL and TRUSTED_PROXIES, then run sudo docker compose up -d again. Templates for both proxies are in Caddy HTTPS and the Nginx reverse proxy guide.

How do you create the owner account and close registration?

Visit https://money.example.net and register: the first account becomes the owner with admin rights. Firefly III starts in single-user mode, which blocks new registrations once that first account exists; confirm it under Administration, Configuration. Enable two-factor authentication in your profile, and create personal access tokens there only if you plan to use the API or the separate Data Importer.

How do you set up email notifications?

Firefly III emails login warnings, password resets and bill reminders. Add these lines to .env and use an authenticated relay on port 587:

MAIL_MAILER=smtp
MAIL_HOST=smtp.example.net
MAIL_PORT=587
MAIL_ENCRYPTION=tls
MAIL_USERNAME=money@example.net
MAIL_PASSWORD=relay-password
MAIL_FROM=money@example.net

Recreate the app with sudo docker compose up -d and send a test message from the administration pages. Port 25 is not promised to be open for direct delivery, so ask support with a ticket before planning around it; the relay on 587 is the dependable route. The SMTP relay guide covers the sender records.

How do you import bank data?

Firefly III has no built-in bank connection; imports go through the separate Data Importer tool, which reads CSV, CAMT and other formats and talks to Firefly III over its API. Run it as an extra container with its own URL, give it a personal access token from your profile and point it at https://money.example.net. Save the import configuration file it offers, so next month the same mapping applies in one step.

How do you back up and upgrade Firefly III?

Dump MariaDB before every upgrade, then pull the new images. Attachments live in the upload volume, so include the Docker volume folder in your file backups as well.

cd /opt/firefly
sudo docker compose exec -T db sh -c 'mariadb-dump -u "$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE"' \
  | gzip > /root/firefly-$(date +%F).sql.gz
sudo docker compose pull
sudo docker compose up -d
sudo docker compose logs --tail 30 app

The dump runs inside the database container and reads the user, password and database name from the variables that .db.env passed to it. Migrations run on start. Read the changelog for major versions, which can raise the minimum database version. Keep dumps off the server too; the daily backups add-on gives a second layer.

Plans that fit this guide

Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.

All prices
PlanFits becauseSizeMonthlyOrder from
A1-1one household with modest history1 vCPU, 1 GB RAM, 25 GB NVMe$3.60/mo$43.20 for 12 months
A1-2Firefly III plus the Data Importer1 vCPU, 2 GB RAM, 50 GB NVMe$7.20/mo$43.20 for 6 months

Questions about Firefly III personal finance

Can Firefly III connect to my bank automatically?

Not by itself. The Data Importer can fetch from some open banking services that you sign up for separately; otherwise you import exported files.

Does it track cryptocurrency?

You can create accounts in any currency code you define, including BTC, and record transactions with manual exchange rates. It does not read wallets or exchanges on its own.

How much space does it need?

Very little: years of transactions take only megabytes. Attachments such as receipts add more.

Can several people use one instance?

Yes. Turn off single-user mode to allow more registrations, or create users from the administration area. Each user sees only their own data.

Why does the app show an encryption key error?

APP_KEY is missing or not exactly 32 characters. Fix it in .env and recreate the container. Never change the key once data exists, as stored secrets depend on it.