Firefly III Part 2: Importing Bank Transactions With the Data Importer
Data Importer 2.3 reads your bank CSV into Firefly III: access token, column roles, duplicate detection – and the password protection it does not bring along.
Table of contents
A household ledger you type every transaction into by hand lasts about three weeks. After that, it doesn’t. The Data Importer closes that gap. It is deliberately a separate program and not a button inside Firefly III.
What are we building?
We put the Firefly III Data Importer 2.3.5 next to the household ledger from part
1, connect it to Firefly III with an access token and
read in a bank’s CSV export: date, payee, reference, amount. At the end the transactions sit in
Firefly III as proper double-entry records, neatly grouped under an import tag. Next month’s batch
can run from cron with a single curl.
The importer has no login of its own
The Data Importer has no user management whatsoever. Anyone who knows the address sees the wizard and may upload. Since the service carries your Firefly token in its pocket, it writes into your ledger with it. That is the design: the importer is meant as a tool you place beside your own Firefly installation, and not as a service for the open internet.
That is why password protection is step 2 in this tutorial, before the container starts for the first time, and not an afterthought at the end.
Direct bank access is not included. The importer does speak to services such as GoCardless, Enable Banking or SimpleFIN, but all of those require an account with a third party that you grant access to your transactions. And FinTS/HBCI, the German standard, is listed as Not available yet. For German accounts the reliable route is therefore: download the CSV from your online banking and read it in here. That is the route we build.
Requirements
- A running Firefly III from part 1: same server, same
compose.yaml, we only extend it - A second subdomain pointing at the server (
import.YOUR_DOMAINin the examples) - A CSV export from your online banking
- About 40 minutes
VPS 1000 G12.5
4 vCores · 8 GB RAM · 128 GB SSD
from €14.50/month
Measured: the importer adds about 60 MB. It runs next to Firefly III on the same small VPS.
💶 1 month free:
Single use, valid for VPS 1000 G12.5. Redeem in the cart →
💶 €5.95 voucher for new netcup customers: always valid · not for domains or VPS Lite
About the screenshots
Step by step
Step 1: Create an access token in Firefly III
The importer authenticates against Firefly III like any third-party application, with a personal access token. Log in to Firefly III and open Remote access and tokens from the user menu at the top right (the person icon). At the bottom you find Personal Access Tokens and a Create new token button.

Give it a descriptive name (Data Importer) and confirm with Create. Firefly III then shows the
token in a dialog, exactly once. Close the dialog without copying and your only option is to delete
the token and create a new one. The token is a good 1,000 characters long, a JSON Web Token and not
a short string. Copy all of it.
It expires after one year. Firefly III caps the lifetime, and the list shows the expiry date. Note it down, or your imports will stop rather quietly twelve months from now (see “Maintenance & backups”).
Token or OAuth client?
Step 2: Add the importer to the stack with a password
Next to the .env from part 1, create a second file just for the importer:
# /opt/firefly/importer.env
FIREFLY_III_URL=http://app:8080
VANITY_URL=https://money.YOUR_DOMAIN
FIREFLY_III_ACCESS_TOKEN=YOUR_VERY_LONG_TOKEN
TRUSTED_PROXIES=**
EXPECT_SECURE_URL=true
FALLBACK_LOCALE=en_US
TZ=Europe/BerlinFIREFLY_III_URL is the address inside the Docker network, not the public one. The importer talks
to Firefly III directly, without a detour through Traefik and without a TLS handshake. VANITY_URL
is the public address. It appears in the links the importer shows after an import (“Created
withdrawal #3”). Without it those links point into the internal network and go nowhere in your
browser. TRUSTED_PROXIES=** lets the importer trust Traefik’s headers, and FALLBACK_LOCALE helps
when interpreting amounts. Set it to the locale your export uses.
chmod 600 /opt/firefly/importer.envNow the container. For the password protection you need a bcrypt hash; a throwaway container produces one:
docker run --rm httpd:2.4-alpine htpasswd -nbB importer YOUR_PASSWORDimporter:$2y$05$Jthy7xqkzzGiBIrBf01iA.EzbN9zlcTRpHYjusQLgsV3FkVJz7j/mThat output goes into a Traefik label in a moment. Every $ has to be doubled there ($$), or
Compose will try to expand the hash as a variable and leave you with a stump. Add this block under
services: in /opt/firefly/compose.yaml:
importer:
image: fireflyiii/data-importer:version-2.3.5
container_name: firefly-importer
restart: unless-stopped
depends_on: [app]
env_file: importer.env
networks: [firefly-intern, proxy]
labels:
- traefik.enable=true
- traefik.docker.network=proxy
- traefik.http.routers.fidi.rule=Host(`import.YOUR_DOMAIN`)
- traefik.http.routers.fidi.entrypoints=websecure
- traefik.http.routers.fidi.tls.certresolver=le
- traefik.http.services.fidi.loadbalancer.server.port=8080
- traefik.http.routers.fidi.middlewares=fidi-auth
- traefik.http.middlewares.fidi-auth.basicauth.users=importer:$$2y$$05$$YOUR_HASHThe importer sits in both networks: the internal one to reach app:8080, and proxy so Traefik
can publish it. Start it:
cd /opt/firefly
docker compose up -d
docker compose ps --format '{{ .Name }}\t{{ .Status }}'firefly Up 2 minutes (healthy)
firefly-cron Up 2 minutes
firefly-db Up 2 minutes (healthy)
firefly-importer Up 20 seconds (healthy)Verify the password protection before doing anything else:
curl -s -o /dev/null -w "%{http_code}\n" https://import.YOUR_DOMAIN/
curl -s -o /dev/null -w "%{http_code}\n" -u importer:YOUR_PASSWORD https://import.YOUR_DOMAIN/401
200If the first call returns 200, the middleware is not taking effect, and your importer is standing
open on the internet. In that case compare the middleware name in the middlewares label with the
one in the basicauth label; they have to match exactly.
Now open the page in a browser. After the password prompt the importer greets you with a list of data sources and the line You’re using a Personal Access Token to authenticate to Firefly III. That confirms the token arrived.
Step 3: Prepare the bank’s CSV
Download the transaction export as CSV from your online banking. What comes out differs per bank, but it almost always follows this pattern:
Date;Payee;Purpose;Amount;Currency
01.09.2026;Corner Grocer;Weekly shop;-87,40;EUR
03.09.2026;City Utilities;Electricity September;-62,00;EUR
10.09.2026;Employer Ltd;Salary September;2450,00;EURThree quirks of continental European exports matter in a moment: a semicolon instead of a comma
as the separator, DD.MM.YYYY dates and a comma as the decimal separator. The sign decides
the type of transaction: minus becomes a withdrawal, plus a deposit.
Open the file first and remove anything that does not belong: many banks write a few header lines with account number and period above the actual table. The importer expects the column headings on the first line.
Step 4: Create the import and set the options
On the start page click Start in the File (CSV or CAMT.* files) row, upload the CSV in the next step (leave the configuration field below it empty on your first run) and confirm with Next →. What follows is the most important page of the whole wizard:

For a European export you set:
Headers Yes headings on line 1
CSV-file delimiter A semicolon the continental separator
Date format d.m.Y matching 01.09.2026
Default import account Checking account the asset account from part 1The date format is where most imports fail, and they fail quietly (see “When it doesn’t work”).
The default Y-m-d matches 2026-09-01, not 01.09.2026. The hint below the field shows a sample
date, but only in the last saved format. On the first pass that is still Y-m-d, even if you have
already typed d.m.Y. So compare your format with a line from the file.
You can leave the remaining defaults alone. Two of them deserve a mention:
- Import tag is on and attaches a tag with the date and time of the run to every imported transaction. That is your way back: if something went wrong, the tag finds exactly the transactions from that run.
- Duplicate transaction detection is set to Content-based detection. With it, Firefly III recognises a transaction you have already imported, so two exports that overlap are not a problem.
Submit → takes you to the next page.
Step 5: Give the columns their roles
Now you tell the importer what each column contains. It shows real examples from your file next to every column, which makes the assignment pleasantly unambiguous:

For our example:
Date → Date (primary transaction date)
Payee → Opposing account (name)
Purpose → Description
Amount → Amount
Currency → Currency code (ISO 4217)Only two roles are mandatory: Amount and a date. The importer says as much at the top of the
page. Everything else is optional, but without Opposing account (name) every expense lands on a
nameless counter account, and the reporting in Firefly III is worthless.
Each row has a Map data? checkbox on the right. Tick it and the next step lets you match every value in the file to an existing account in Firefly III by hand, three spellings of the same supermarket onto one expense account, for instance. On the first import that gains you nothing, because the counter accounts do not exist yet; the list then only contains your asset accounts. Leave it unticked and send the page with Submit →. The importer creates missing expense and revenue accounts itself. From the second import onwards, that checkbox is your tool against duplicates in the account list.
Step 6: Convert and submit
The import runs in two separate passes, both started with the same Start job → button: first the importer converts the lines into Firefly transactions, then it submits them. The split is deliberate. It lets the tool report problems in reading your file before anything reaches your database.

Line #1: Created withdrawal #6 "Weekly shop" (EUR 87.4)
Line #5: Created deposit #10 "Salary September" (EUR 2450)withdrawal is an expense, deposit an income. The importer read the sign correctly, and -87,40
became a clean 87.4. The continental decimal comma needs no special treatment.
Finally, click Download configuration file and keep the JSON. It contains everything you just configured. The most important of its 50-odd entries are delimiter, date format, roles and target account:
{
"version": 3,
"date": "d.m.Y",
"delimiter": "semicolon",
"headers": true,
"default_account": 1,
"roles": ["date_transaction", "opposing-name", "description", "amount", "currency-code"],
"duplicate_detection_method": "classic",
"flow": "file"
}Next time you upload it together with the new CSV and skip steps 4 and 5 entirely. It is also the prerequisite for the automation in step 8.
Step 7: The result in Firefly III
Switch back to the ledger and open Classification → Tags. The run appears as a single entry, and behind it sit exactly the transactions of that import. The page only shows the period selected at the top right; if the transactions are from last month, switch it there:

Check two things:
- Are the dates right? Every transaction carrying the same date is the sure sign of a wrong date format.
- Are the counter accounts right? The destination account column should hold the payees from the CSV, not “(no name)”.
If something went wrong, select all transactions on the tag’s page and undo the run with Delete selected, instead of hunting transaction by transaction.
Step 8: Automate recurring imports
This is where it gets comfortable. The importer ships an endpoint you can post the file and the
configuration to directly, without wizard or browser. It is off by default and needs two entries in
importer.env:
AUTO_IMPORT_SECRET=A_SECRET_OF_AT_LEAST_16_CHARACTERS
CAN_POST_FILES=truecd /opt/firefly
docker compose up -d --force-recreate importerAfter that a single call with the CSV and the configuration file from step 6 is enough:
curl -u importer:YOUR_PASSWORD \
-F "importable=@transactions-october.csv" \
-F "json=@firefly-config.json" \
"https://import.YOUR_DOMAIN/autoupload?secret=YOUR_SECRET"{"message":"Translate the import result to a JSON thing."}That reply is an untranslated placeholder in the program and also appears when everything worked. The outcome is not in it. You look it up in the container log instead:
docker compose logs importer --since 5m | grep -E "Created (withdrawal|deposit)|Duplicate of"Two things are easy to miss on this route. The password protection applies here too: without -u
the endpoint answers 401 before the secret is even checked. That is a good thing; your cron entry
just has to carry both. And the secret travels in the URL, so it ends up in the container’s access
log. Use a dedicated one you do not reuse anywhere else.
Two doors, one keyring
CAN_POST_FILES=true you have opened a route that writes transactions into your ledger without
a browser. Two things secure it: the password in front of the service and the secret in the URL. Use
long random strings for both, and set CAN_POST_FILES back to false once you no longer need the
automated route. An active endpoint you remember beats one you have forgotten.The monthly run is then a cron entry on the machine where the export file lands, not on the server. Even if you download the export by hand, this route still saves you the entire wizard.
When it doesn’t work
Every imported transaction carries the same date – today’s. The Date format setting does not
match the file. And this is the nasty variant: the importer neither aborts nor warns, it substitutes
the current date for every line it cannot parse. With the default Y-m-d against 01.09.2026, every
transaction lands on today’s date. Because they differ from the correct ones,
duplicate detection does not catch them either, so you get the import a second time. Undo the run
via the import tag, set d.m.Y and read the file in again.
The preview shows B�ckerei Schmidt, and the import creates not a single transaction. The bank’s
export is encoded in ISO-8859-1 instead of UTF-8, still common with German banks. Firefly III rejects the
characters (the importer log says Malformed UTF-8 characters, followed by No transactions in array, there is nothing to import.). You can see it in the preview on the roles page before
anything is imported. Tick Convert to UTF-8 on the configuration page and upload the file again;
the umlauts then arrive correctly. Alternatively convert the file yourself first:
iconv -f ISO-8859-1 -t UTF-8 export.csv > transactions.csv.
The second import reports [a117]: transactions.0.description: Duplicate of transaction #6. in red. That is
duplicate detection doing its job: the transaction is already in Firefly III. With overlapping
exports that is exactly the desired behaviour, the message is just coloured as an “Error”. It gets
awkward when you deleted those transactions beforehand and still get duplicate reports: Firefly III
only moves transactions to the bin, and the comparison still sees those remains. For a genuine fresh
start, set Duplicate transaction detection to No duplicate detection for that one run.
/autoupload answers with 500 and an error page. The reason is in the importer log:
Please make sure your secret value matches whatever is in AUTO_IMPORT_SECRET means the secret is
wrong. Please set CAN_POST_AUTOIMPORT=true for this function to work. means the endpoint is still
off, and the message names the wrong switch: for /autoupload what counts is CAN_POST_FILES=true;
CAN_POST_AUTOIMPORT belongs to a different endpoint. Both are off by default, and the secret alone
enables nothing. Both values belong in importer.env, and the container has to be rebuilt
afterwards with docker compose up -d --force-recreate importer. If you get a 401 instead, the
curl call is missing -u importer:YOUR_PASSWORD for the password protection in front.
The import finished but nothing new appears in Firefly III. Check the importer log for
transactions rejected as duplicates: docker compose logs importer --since 10m | grep -i duplicate.
If there is nothing, check whether any rows arrived at all. A CSV with the bank’s own header lines
above the actual table is read as data salad until the first real row. For automated runs the log is
your only source: IGNORE_DUPLICATE_ERRORS hides the messages in the interface, but they remain in
the log.
Your problem is not listed? Search all error messages →
Maintenance & backups
The importer itself has nothing to back up. It holds no data: the transactions live in Firefly III, the rest is configuration. Two files belong in your Restic backup regardless:
/opt/firefly/importer.env # token, secret, password hash
firefly-config.json # delimiter, date format, rolesThe JSON file is the actual time-saver. Lose it and you click through the wizard from scratch again.
Updates work like the ledger’s, through the image tag. What matters is that both halves fit together:
cd /opt/firefly
sed -i 's/data-importer:version-2.3.5/data-importer:version-NEW_VERSION/' compose.yaml
docker compose pull && docker compose up -d
docker compose logs importer --tail 20The importer follows Firefly III’s major versions. If you update Firefly III, update the importer in
the same go, and the other way round. Stable releases are listed on the
releases page on GitHub; the nightly
develop tags are nothing for an installation that touches your finances.
The date you really need in your calendar is the token’s expiry. Firefly III caps personal
access tokens at one year. After that every import fails, and not very loudly. Put the date from the
token list in your calendar; renewing means a new token, one line in importer.env and a
docker compose up -d --force-recreate importer.
And the effort? The first import costs half an hour, because delimiter, date format and roles
have to be right. From the second one onwards it is two minutes a month with the configuration file,
or zero if the curl call from step 8 runs in cron. Plus the token once a year. That is the point
where a self-hosted household ledger stops being a good intention.
Send feedback: feedback@serverkueche.de
You might also like


