<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Csv – Serverküche</title><link>https://serverkueche.de/en/tags/csv/</link><description>Csv – Neueste Beiträge von Serverküche</description><generator>Hugo</generator><language>en-US</language><managingEditor>feedback@serverkueche.de (Serverküche)</managingEditor><webMaster>feedback@serverkueche.de (Serverküche)</webMaster><copyright>2026 Serverküche</copyright><lastBuildDate>Tue, 24 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://serverkueche.de/en/tags/csv/index.xml" rel="self" type="application/rss+xml"/><item><title>Firefly III Part 2: Importing Bank Transactions With the Data Importer</title><link>https://serverkueche.de/en/tutorials/firefly-iii-data-importer/</link><pubDate>Tue, 24 Nov 2026 00:00:00 +0000</pubDate><author>feedback@serverkueche.de (Serverküche)</author><guid>https://serverkueche.de/en/tutorials/firefly-iii-data-importer/</guid><description>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.</description><content:encoded><![CDATA[<p>A household ledger you type every transaction into by hand lasts about three weeks. After that, it
doesn&rsquo;t. The Data Importer closes that gap. It is deliberately a separate program and not a button
inside Firefly III.</p>
<h2 id="what-are-we-building">What are we building?</h2>
<p>We put the Firefly III Data Importer 2.3.5 next to the <a href="/en/tutorials/firefly-iii-household-ledger/">household ledger from part
1</a>, connect it to Firefly III with an access token and
read in a bank&rsquo;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&rsquo;s batch
can run from cron with a single <code>curl</code>.</p>
<div class="not-prose my-6 rounded-lg border-l-4 p-4 border-amber-400 bg-amber-50 dark:border-amber-700 dark:bg-amber-900/20">
  <p class="mb-1 flex items-center gap-2 font-semibold text-slate-900 dark:text-white">
    <span aria-hidden="true">⚠️</span>The importer has no login of its own
  </p>
  <div class="prose-kitchen text-sm"><p>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
<em>your</em> 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.</p>
<p>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.</p>
</div>
</div>
<p>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 <em>Not available yet</em>. 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.</p>
<h2 id="requirements">Requirements</h2>
<ul>
<li>A running <a href="/en/tutorials/firefly-iii-household-ledger/">Firefly III from part 1</a>: same server, same
<code>compose.yaml</code>, we only extend it</li>
<li>A second subdomain pointing at the server (<code>import.YOUR_DOMAIN</code> in the examples)</li>
<li>A CSV export from your online banking</li>
<li>About 40 minutes</li>
</ul>
<div class="not-prose my-6 overflow-hidden rounded-xl border border-paprika-200 bg-paprika-50 dark:border-paprika-800 dark:bg-paprika-900/20"
     data-track-content data-content-name="Affiliate-Box · /en/tutorials/firefly-iii-data-importer/" data-content-piece="VPS 1000 G12.5">
  <div class="flex items-center justify-between border-b border-paprika-200 bg-paprika-100 px-4 py-1.5 text-xs font-semibold uppercase tracking-wide text-paprika-700 dark:border-paprika-800 dark:bg-paprika-900/40 dark:text-paprika-300">
    <span>🍳 Recommendation</span>
    <span title="Links marked with * are affiliate links.">Ad</span>
  </div>
  <div class="flex flex-col gap-4 p-4 sm:flex-row sm:items-center sm:justify-between">
    <div>
      <p class="text-lg font-bold text-slate-900 dark:text-white">VPS 1000 G12.5</p>
      <p class="mt-1 text-sm text-slate-600 dark:text-slate-300">4 vCores · 8 GB RAM · 128 GB SSD</p>
      <p class="mt-1 text-sm font-semibold text-paprika-700 dark:text-paprika-400">from €14.50/month</p>
      <p class="mt-2 text-sm text-slate-600 dark:text-slate-400">Measured: the importer adds about 60 MB. It runs next to Firefly III on the same small VPS.</p>
    </div>
    <a href="https://www.netcup.com/en/server/vps/vps-1000-g12.5-iv-24m-eu?ref=44083#vps-1000-g12.5-iv-12m-eu" rel="sponsored noopener" target="_blank"
   data-track-event="Affiliate|netcup: Affiliate-Box|VPS 1000 G12.5 · {page}"
   class="inline-flex shrink-0 items-center justify-center rounded-lg bg-paprika-600 px-5 py-2.5 font-semibold text-white transition-colors hover:bg-paprika-700">
  Go to netcup →
</a>

  </div><div class="px-4 pb-4"><div class="not-prose my-3 rounded-lg border border-herb-500/40 bg-herb-50 px-3 py-2 text-sm text-slate-700 dark:bg-herb-900/20 dark:text-slate-200"
     data-voucher-api="vps-1000" data-voucher-msg-empty="No code is available for this plan right now – use the €5.95 code." data-voucher-msg-limit="No more codes today – use the €5.95 code or try again tomorrow." data-voucher-msg-error="The code couldn&#39;t be fetched right now – use the €5.95 code."
     data-voucher-hint="Empty the cart first – the code adds the server itself.">
  <p class="flex flex-wrap items-center gap-x-2 gap-y-1"><span>💶 <span class="font-semibold">1 month free</span>:</span>
    <button type="button" data-voucher-reveal data-copy-title="Click to copy"
            class="cursor-pointer rounded bg-white px-2 py-0.5 font-mono text-sm font-semibold text-herb-800 hover:ring-2 hover:ring-herb-500/40 dark:bg-slate-800 dark:text-herb-400">Show code</button>
    <button type="button" data-voucher-next hidden
            class="rounded border border-herb-500/40 px-2 py-0.5 text-xs text-herb-800 hover:bg-white dark:text-herb-400 dark:hover:bg-slate-800">another code</button>
  </p><p class="mt-1 text-xs text-slate-500 dark:text-slate-400" data-voucher-hint-target>
    Single use, valid for VPS 1000 G12.5.
    <a href="https://www.netcup.com/en/checkout/cart?ref=44083" rel="sponsored noopener" target="_blank"
       data-track-event="Affiliate|netcup: Gutschein einlösen|VPS 1000 G12.5 · {page}"
       class="font-medium text-herb-800 underline underline-offset-2 hover:text-herb-900 dark:text-herb-400">Redeem in the cart →</a>
  </p><p class="mt-2 flex flex-wrap items-center gap-x-2 gap-y-1 border-t border-herb-500/30 pt-2">
    <span>💶 <span class="font-semibold">€5.95 voucher</span> for new netcup customers:</span>
    <button type="button" data-voucher-code data-track-voucher="36nc17844976032"
            title="Click to copy" class="cursor-pointer rounded bg-white px-2 py-0.5 font-mono text-sm font-semibold text-herb-800 hover:ring-2 hover:ring-herb-500/40 dark:bg-slate-800 dark:text-herb-400">36nc17844976032</button>
    <span class="text-xs text-slate-500 dark:text-slate-400">always valid · not for domains or VPS Lite</span>
  </p><p class="mt-1 text-xs"><a href="/en/netcup-voucher/" class="font-medium text-herb-800 underline underline-offset-2 hover:text-herb-900 dark:text-herb-400">All netcup vouchers →</a></p>
</div></div>
</div>

<div class="not-prose my-6 rounded-lg border-l-4 p-4 border-sky-300 bg-sky-50 dark:border-sky-800 dark:bg-sky-900/20">
  <p class="mb-1 flex items-center gap-2 font-semibold text-slate-900 dark:text-white">
    <span aria-hidden="true">ℹ️</span>About the screenshots
  </p>
  <div class="prose-kitchen text-sm">The importer&rsquo;s interface is English-only, so those screenshots match what you see. The two Firefly
III screenshots show the German UI; the menu structure is identical in English.</div>
</div>
<h2 id="step-by-step">Step by step</h2>
<h3 id="step-1-create-an-access-token-in-firefly-iii">Step 1: Create an access token in Firefly III</h3>
<p>The importer authenticates against Firefly III like any third-party application, with a personal
access token. Log in to Firefly III and open <em>Remote access and tokens</em> from the user menu at the top
right (the person icon). At the bottom you find <em>Personal Access Tokens</em> and a <em>Create new token</em> button.</p>
<p><figure class="my-6"><img src="/en/tutorials/firefly-iii-data-importer/firefly-token_hu_3f3567a65c0c7bd4.webp" srcset="/en/tutorials/firefly-iii-data-importer/firefly-token_hu_aa6241bd5186b3fe.webp 480w, /en/tutorials/firefly-iii-data-importer/firefly-token_hu_3f3567a65c0c7bd4.webp 768w, /en/tutorials/firefly-iii-data-importer/firefly-token_hu_50e10de8bad15749.webp 1200w, /en/tutorials/firefly-iii-data-importer/firefly-token_hu_d799487d34c16ac8.webp 1920w" sizes="(min-width: 768px) 768px, 100vw"
    width="768" height="432"
    data-full="/en/tutorials/firefly-iii-data-importer/firefly-token_hu_f211f148b0aa949d.webp"
    alt="The &ldquo;Remote access and tokens&rdquo; page in Firefly III showing the created token named Data Importer and its expiry date" title="One token per application. The list also shows when it expires."
    loading="lazy" decoding="async" class="rounded-lg"><figcaption class="mt-2 text-sm text-center text-slate-500 italic">One token per application. The list also shows when it expires.</figcaption></figure></p>
<p>Give it a descriptive name (<code>Data Importer</code>) and confirm with <em>Create</em>. 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.</p>
<p>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 &ldquo;Maintenance &amp;
backups&rdquo;).</p>
<div class="not-prose my-6 rounded-lg border-l-4 p-4 border-sky-300 bg-sky-50 dark:border-sky-800 dark:bg-sky-900/20">
  <p class="mb-1 flex items-center gap-2 font-semibold text-slate-900 dark:text-white">
    <span aria-hidden="true">ℹ️</span>Token or OAuth client?
  </p>
  <div class="prose-kitchen text-sm">On the same page you can create an OAuth client instead; the importer is explicitly built for
that flow and will redirect you to Firefly III to sign in. The catch: it only works if Firefly III
handles its own login. If an external authentication provider sits in front of it, Firefly III says
so right on that page: OAuth clients then stop working and only tokens remain. The token is the
route that always works, so that is the one we take.</div>
</div>
<h3 id="step-2-add-the-importer-to-the-stack-with-a-password">Step 2: Add the importer to the stack with a password</h3>
<p>Next to the <code>.env</code> from part 1, create a second file just for the importer:</p>
<div class="sk-code">
  <span class="sk-code-head">INI</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ini" data-lang="ini"><span class="line"><span class="cl"><span class="c1"># /opt/firefly/importer.env</span>
</span></span><span class="line"><span class="cl"><span class="na">FIREFLY_III_URL</span><span class="o">=</span><span class="s">http://app:8080</span>
</span></span><span class="line"><span class="cl"><span class="na">VANITY_URL</span><span class="o">=</span><span class="s">https://money.YOUR_DOMAIN</span>
</span></span><span class="line"><span class="cl"><span class="na">FIREFLY_III_ACCESS_TOKEN</span><span class="o">=</span><span class="s">YOUR_VERY_LONG_TOKEN</span>
</span></span><span class="line"><span class="cl"><span class="na">TRUSTED_PROXIES</span><span class="o">=</span><span class="s">**</span>
</span></span><span class="line"><span class="cl"><span class="na">EXPECT_SECURE_URL</span><span class="o">=</span><span class="s">true</span>
</span></span><span class="line"><span class="cl"><span class="na">FALLBACK_LOCALE</span><span class="o">=</span><span class="s">en_US</span>
</span></span><span class="line"><span class="cl"><span class="na">TZ</span><span class="o">=</span><span class="s">Europe/Berlin</span></span></span></code></pre></div>
</div>
<p><code>FIREFLY_III_URL</code> 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. <code>VANITY_URL</code>
is the public address. It appears in the links the importer shows after an import (&ldquo;Created
withdrawal #3&rdquo;). Without it those links point into the internal network and go nowhere in your
browser. <code>TRUSTED_PROXIES=**</code> lets the importer trust Traefik&rsquo;s headers, and <code>FALLBACK_LOCALE</code> helps
when interpreting amounts. Set it to the locale your export uses.</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">chmod <span class="m">600</span> /opt/firefly/importer.env</span></span></code></pre></div>
</div>
<p>Now the container. For the password protection you need a bcrypt hash; a throwaway container
produces one:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker run --rm httpd:2.4-alpine htpasswd -nbB importer YOUR_PASSWORD</span></span></code></pre></div>
</div>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">importer:$2y$05$Jthy7xqkzzGiBIrBf01iA.EzbN9zlcTRpHYjusQLgsV3FkVJz7j/m</span></span></code></pre></div>
</div>
<p>That output goes into a Traefik label in a moment. Every <code>$</code> has to be doubled there (<code>$$</code>), or
Compose will try to expand the hash as a variable and leave you with a stump. Add this block under
<code>services:</code> in <code>/opt/firefly/compose.yaml</code>:</p>
<div class="sk-code">
  <span class="sk-code-head">YAML</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="w">  </span><span class="nt">importer</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">fireflyiii/data-importer:version-2.3.5</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">container_name</span><span class="p">:</span><span class="w"> </span><span class="l">firefly-importer</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">restart</span><span class="p">:</span><span class="w"> </span><span class="l">unless-stopped</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">depends_on</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">app]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">env_file</span><span class="p">:</span><span class="w"> </span><span class="l">importer.env</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">networks</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">firefly-intern, proxy]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">labels</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">traefik.enable=true</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">traefik.docker.network=proxy</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">traefik.http.routers.fidi.rule=Host(`import.YOUR_DOMAIN`)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">traefik.http.routers.fidi.entrypoints=websecure</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">traefik.http.routers.fidi.tls.certresolver=le</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">traefik.http.services.fidi.loadbalancer.server.port=8080</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">traefik.http.routers.fidi.middlewares=fidi-auth</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">traefik.http.middlewares.fidi-auth.basicauth.users=importer:$$2y$$05$$YOUR_HASH</span></span></span></code></pre></div>
</div>
<p>The importer sits in both networks: the internal one to reach <code>app:8080</code>, and <code>proxy</code> so Traefik
can publish it. Start it:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">cd</span> /opt/firefly
</span></span><span class="line"><span class="cl">docker compose up -d
</span></span><span class="line"><span class="cl">docker compose ps --format <span class="s1">&#39;{{ .Name }}\t{{ .Status }}&#39;</span></span></span></code></pre></div>
</div>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">firefly           Up 2 minutes (healthy)
</span></span><span class="line"><span class="cl">firefly-cron      Up 2 minutes
</span></span><span class="line"><span class="cl">firefly-db        Up 2 minutes (healthy)
</span></span><span class="line"><span class="cl">firefly-importer  Up 20 seconds (healthy)</span></span></code></pre></div>
</div>
<p>Verify the password protection before doing anything else:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">curl -s -o /dev/null -w <span class="s2">&#34;%{http_code}\n&#34;</span> https://import.YOUR_DOMAIN/
</span></span><span class="line"><span class="cl">curl -s -o /dev/null -w <span class="s2">&#34;%{http_code}\n&#34;</span> -u importer:YOUR_PASSWORD https://import.YOUR_DOMAIN/</span></span></code></pre></div>
</div>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">401
</span></span><span class="line"><span class="cl">200</span></span></code></pre></div>
</div>
<p>If the first call returns <code>200</code>, the middleware is not taking effect, and your importer is standing
open on the internet. In that case compare the middleware name in the <code>middlewares</code> label with the
one in the <code>basicauth</code> label; they have to match exactly.</p>
<p>Now open the page in a browser. After the password prompt the importer greets you with a list of
data sources and the line <em>You&rsquo;re using a Personal Access Token to authenticate to Firefly III</em>.
That confirms the token arrived.</p>
<h3 id="step-3-prepare-the-banks-csv">Step 3: Prepare the bank&rsquo;s CSV</h3>
<p>Download the transaction export as CSV from your online banking. What comes out differs per bank,
but it almost always follows this pattern:</p>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Date;Payee;Purpose;Amount;Currency
</span></span><span class="line"><span class="cl">01.09.2026;Corner Grocer;Weekly shop;-87,40;EUR
</span></span><span class="line"><span class="cl">03.09.2026;City Utilities;Electricity September;-62,00;EUR
</span></span><span class="line"><span class="cl">10.09.2026;Employer Ltd;Salary September;2450,00;EUR</span></span></code></pre></div>
</div>
<p>Three quirks of continental European exports matter in a moment: a semicolon instead of a comma
as the separator, <code>DD.MM.YYYY</code> dates and a comma as the decimal separator. The sign decides
the type of transaction: minus becomes a withdrawal, plus a deposit.</p>
<p>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.</p>
<h3 id="step-4-create-the-import-and-set-the-options">Step 4: Create the import and set the options</h3>
<p>On the start page click <em>Start</em> in the <em>File</em> (<em>CSV or CAMT.* files</em>) row, upload the CSV in the
next step (leave the configuration field below it empty on your first run) and confirm with <em>Next
→</em>. What follows is the most important page of the whole wizard:</p>
<p><figure class="my-6"><img src="/en/tutorials/firefly-iii-data-importer/fidi-optionen_hu_98c862c3831d4f34.webp" srcset="/en/tutorials/firefly-iii-data-importer/fidi-optionen_hu_2ec73c02be7d974b.webp 480w, /en/tutorials/firefly-iii-data-importer/fidi-optionen_hu_98c862c3831d4f34.webp 768w, /en/tutorials/firefly-iii-data-importer/fidi-optionen_hu_f64115aaf7521009.webp 1200w, /en/tutorials/firefly-iii-data-importer/fidi-optionen_hu_9040b3f4bb07c7fc.webp 1920w" sizes="(min-width: 768px) 768px, 100vw"
    width="768" height="432"
    data-full="/en/tutorials/firefly-iii-data-importer/fidi-optionen_hu_8b75e2e8886bcdba.webp"
    alt="The Data Importer configuration page with the semicolon delimiter and the date format d.m.Y set" title="Four settings decide between success and data salad: headers, delimiter, date format, target account"
    loading="lazy" decoding="async" class="rounded-lg"><figcaption class="mt-2 text-sm text-center text-slate-500 italic">Four settings decide between success and data salad: headers, delimiter, date format, target account</figcaption></figure></p>
<p>For a European export you set:</p>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Headers                 Yes           headings on line 1
</span></span><span class="line"><span class="cl">CSV-file delimiter      A semicolon   the continental separator
</span></span><span class="line"><span class="cl">Date format             d.m.Y         matching 01.09.2026
</span></span><span class="line"><span class="cl">Default import account  Checking account  the asset account from part 1</span></span></code></pre></div>
</div>
<p>The date format is where most imports fail, and they fail quietly (see &ldquo;When it doesn&rsquo;t work&rdquo;).
The default <code>Y-m-d</code> matches <code>2026-09-01</code>, not <code>01.09.2026</code>. The hint below the field shows a sample
date, but only in the last saved format. On the first pass that is still <code>Y-m-d</code>, even if you have
already typed <code>d.m.Y</code>. So compare your format with a line from the file.</p>
<p>You can leave the remaining defaults alone. Two of them deserve a mention:</p>
<ul>
<li><em>Import tag</em> 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.</li>
<li><em>Duplicate transaction detection</em> is set to <em>Content-based detection</em>. With it, Firefly III
recognises a transaction you have already imported, so two exports that overlap are not a
problem.</li>
</ul>
<p><em>Submit →</em> takes you to the next page.</p>
<h3 id="step-5-give-the-columns-their-roles">Step 5: Give the columns their roles</h3>
<p>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:</p>
<p><figure class="my-6"><img src="/en/tutorials/firefly-iii-data-importer/fidi-rollen_hu_9ad86a6d8b8347c6.webp" srcset="/en/tutorials/firefly-iii-data-importer/fidi-rollen_hu_8a0c7a9f1bc420a9.webp 480w, /en/tutorials/firefly-iii-data-importer/fidi-rollen_hu_9ad86a6d8b8347c6.webp 768w, /en/tutorials/firefly-iii-data-importer/fidi-rollen_hu_4e3a833c348657e1.webp 1200w, /en/tutorials/firefly-iii-data-importer/fidi-rollen_hu_ba1ce68c09074ae7.webp 1920w" sizes="(min-width: 768px) 768px, 100vw"
    width="768" height="432"
    data-full="/en/tutorials/firefly-iii-data-importer/fidi-rollen_hu_2adbd7b2767429bd.webp"
    alt="The Data Importer &ldquo;Role definition&rdquo; page with roles assigned for date, payee, purpose, amount and currency" title="Every column gets a role. \&#34;Amount\&#34; and a date are mandatory, the rest is optional."
    loading="lazy" decoding="async" class="rounded-lg"><figcaption class="mt-2 text-sm text-center text-slate-500 italic">Every column gets a role. \&#34;Amount\&#34; and a date are mandatory, the rest is optional.</figcaption></figure></p>
<p>For our example:</p>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Date       → Date (primary transaction date)
</span></span><span class="line"><span class="cl">Payee      → Opposing account (name)
</span></span><span class="line"><span class="cl">Purpose    → Description
</span></span><span class="line"><span class="cl">Amount     → Amount
</span></span><span class="line"><span class="cl">Currency   → Currency code (ISO 4217)</span></span></code></pre></div>
</div>
<p>Only two roles are mandatory: <code>Amount</code> and a date. The importer says as much at the top of the
page. Everything else is optional, but without <code>Opposing account (name)</code> every expense lands on a
nameless counter account, and the reporting in Firefly III is worthless.</p>
<p>Each row has a <em>Map data?</em> 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 <em>Submit →</em>. 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.</p>
<h3 id="step-6-convert-and-submit">Step 6: Convert and submit</h3>
<p>The import runs in two separate passes, both started with the same <em>Start job →</em> 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.</p>
<p><figure class="my-6"><img src="/en/tutorials/firefly-iii-data-importer/fidi-ergebnis_hu_587430d7873c62d7.webp" srcset="/en/tutorials/firefly-iii-data-importer/fidi-ergebnis_hu_e7d8f38d11a2888d.webp 480w, /en/tutorials/firefly-iii-data-importer/fidi-ergebnis_hu_587430d7873c62d7.webp 768w, /en/tutorials/firefly-iii-data-importer/fidi-ergebnis_hu_fe3b50049b1e71d7.webp 1200w, /en/tutorials/firefly-iii-data-importer/fidi-ergebnis_hu_eb8c4afc5a133c5f.webp 1920w" sizes="(min-width: 768px) 768px, 100vw"
    width="768" height="432"
    data-full="/en/tutorials/firefly-iii-data-importer/fidi-ergebnis_hu_1ed37083cf5133a4.webp"
    alt="The Data Importer result page with six messages about created transactions" title="Every line acknowledged individually, with type, number and amount"
    loading="lazy" decoding="async" class="rounded-lg"><figcaption class="mt-2 text-sm text-center text-slate-500 italic">Every line acknowledged individually, with type, number and amount</figcaption></figure></p>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Line #1: Created withdrawal #6 &#34;Weekly shop&#34; (EUR 87.4)
</span></span><span class="line"><span class="cl">Line #5: Created deposit #10 &#34;Salary September&#34; (EUR 2450)</span></span></code></pre></div>
</div>
<p><code>withdrawal</code> is an expense, <code>deposit</code> an income. The importer read the sign correctly, and <code>-87,40</code>
became a clean <code>87.4</code>. The continental decimal comma needs no special treatment.</p>
<p>Finally, click <em>Download configuration file</em> 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:</p>
<div class="sk-code">
  <span class="sk-code-head">JSON</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;version&#34;</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;date&#34;</span><span class="p">:</span> <span class="s2">&#34;d.m.Y&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;delimiter&#34;</span><span class="p">:</span> <span class="s2">&#34;semicolon&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;headers&#34;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;default_account&#34;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;roles&#34;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&#34;date_transaction&#34;</span><span class="p">,</span> <span class="s2">&#34;opposing-name&#34;</span><span class="p">,</span> <span class="s2">&#34;description&#34;</span><span class="p">,</span> <span class="s2">&#34;amount&#34;</span><span class="p">,</span> <span class="s2">&#34;currency-code&#34;</span><span class="p">],</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;duplicate_detection_method&#34;</span><span class="p">:</span> <span class="s2">&#34;classic&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;flow&#34;</span><span class="p">:</span> <span class="s2">&#34;file&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
<p>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.</p>
<h3 id="step-7-the-result-in-firefly-iii">Step 7: The result in Firefly III</h3>
<p>Switch back to the ledger and open <em>Classification → Tags</em>. 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:</p>
<p><figure class="my-6"><img src="/en/tutorials/firefly-iii-data-importer/firefly-import-tag_hu_301fbbb0bf078bad.webp" srcset="/en/tutorials/firefly-iii-data-importer/firefly-import-tag_hu_ecd9314ca73c42b7.webp 480w, /en/tutorials/firefly-iii-data-importer/firefly-import-tag_hu_301fbbb0bf078bad.webp 768w, /en/tutorials/firefly-iii-data-importer/firefly-import-tag_hu_c677bf26a9157229.webp 1200w, /en/tutorials/firefly-iii-data-importer/firefly-import-tag_hu_35f476aee643447c.webp 1920w" sizes="(min-width: 768px) 768px, 100vw"
    width="768" height="432"
    data-full="/en/tutorials/firefly-iii-data-importer/firefly-import-tag_hu_fed5efbaff29623c.webp"
    alt="The Firefly III tag page with six imported transactions, source and destination accounts and the totals" title="One import, one tag, with the sum of expenses and income"
    loading="lazy" decoding="async" class="rounded-lg"><figcaption class="mt-2 text-sm text-center text-slate-500 italic">One import, one tag, with the sum of expenses and income</figcaption></figure></p>
<p>Check two things:</p>
<ol>
<li>Are the dates right? Every transaction carrying the same date is the sure sign of a wrong date
format.</li>
<li>Are the counter accounts right? The <em>destination account</em> column should hold the payees from
the CSV, not &ldquo;(no name)&rdquo;.</li>
</ol>
<p>If something went wrong, select all transactions on the tag&rsquo;s page and undo the run with <em>Delete
selected</em>, instead of hunting transaction by transaction.</p>
<h3 id="step-8-automate-recurring-imports">Step 8: Automate recurring imports</h3>
<p>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
<code>importer.env</code>:</p>
<div class="sk-code">
  <span class="sk-code-head">INI</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ini" data-lang="ini"><span class="line"><span class="cl"><span class="na">AUTO_IMPORT_SECRET</span><span class="o">=</span><span class="s">A_SECRET_OF_AT_LEAST_16_CHARACTERS</span>
</span></span><span class="line"><span class="cl"><span class="na">CAN_POST_FILES</span><span class="o">=</span><span class="s">true</span></span></span></code></pre></div>
</div>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">cd</span> /opt/firefly
</span></span><span class="line"><span class="cl">docker compose up -d --force-recreate importer</span></span></code></pre></div>
</div>
<p>After that a single call with the CSV and the configuration file from step 6 is enough:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">curl -u importer:YOUR_PASSWORD <span class="se">\
</span></span></span><span class="line"><span class="cl">  -F <span class="s2">&#34;importable=@transactions-october.csv&#34;</span> <span class="se">\
</span></span></span><span class="line"><span class="cl">  -F <span class="s2">&#34;json=@firefly-config.json&#34;</span> <span class="se">\
</span></span></span><span class="line"><span class="cl">  <span class="s2">&#34;https://import.YOUR_DOMAIN/autoupload?secret=YOUR_SECRET&#34;</span></span></span></code></pre></div>
</div>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">{&#34;message&#34;:&#34;Translate the import result to a JSON thing.&#34;}</span></span></code></pre></div>
</div>
<p>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:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker compose logs importer --since 5m <span class="p">|</span> grep -E <span class="s2">&#34;Created (withdrawal|deposit)|Duplicate of&#34;</span></span></span></code></pre></div>
</div>
<p>Two things are easy to miss on this route. The password protection applies here too: without <code>-u</code>
the endpoint answers <code>401</code> 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&rsquo;s access
log. Use a dedicated one you do not reuse anywhere else.</p>
<div class="not-prose my-6 rounded-lg border-l-4 p-4 border-amber-400 bg-amber-50 dark:border-amber-700 dark:bg-amber-900/20">
  <p class="mb-1 flex items-center gap-2 font-semibold text-slate-900 dark:text-white">
    <span aria-hidden="true">⚠️</span>Two doors, one keyring
  </p>
  <div class="prose-kitchen text-sm">With <code>CAN_POST_FILES=true</code> 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 <code>CAN_POST_FILES</code> back to <code>false</code> once you no longer need the
automated route. An active endpoint you remember beats one you have forgotten.</div>
</div>
<p>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.</p>
<h2 id="when-it-doesnt-work">When it doesn&rsquo;t work</h2>
<div class="troubleshoot not-prose">
<p><strong>Every imported transaction carries the same date – today&rsquo;s.</strong> The <em>Date format</em> 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 <code>Y-m-d</code> against <code>01.09.2026</code>, every
transaction lands on today&rsquo;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 <code>d.m.Y</code> and read the file in again.</p>
<p><strong>The preview shows <code>B�ckerei Schmidt</code>, and the import creates not a single transaction.</strong> The bank&rsquo;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 <code>Malformed UTF-8 characters</code>, followed by <code>No transactions in array, there is nothing to import.</code>). You can see it in the preview on the roles page before
anything is imported. Tick <em>Convert to UTF-8</em> on the configuration page and upload the file again;
the umlauts then arrive correctly. Alternatively convert the file yourself first:
<code>iconv -f ISO-8859-1 -t UTF-8 export.csv &gt; transactions.csv</code>.</p>
<p><strong>The second import reports <code>[a117]: transactions.0.description: Duplicate of transaction #6.</code> in red.</strong> 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 &ldquo;Error&rdquo;. 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 <em>Duplicate transaction detection</em> to <em>No duplicate detection</em> for that one run.</p>
<p><strong><code>/autoupload</code> answers with <code>500</code> and an error page.</strong> The reason is in the importer log:
<code>Please make sure your secret value matches whatever is in AUTO_IMPORT_SECRET</code> means the secret is
wrong. <code>Please set CAN_POST_AUTOIMPORT=true for this function to work.</code> means the endpoint is still
off, and the message names the wrong switch: for <code>/autoupload</code> what counts is <code>CAN_POST_FILES=true</code>;
<code>CAN_POST_AUTOIMPORT</code> belongs to a different endpoint. Both are off by default, and the secret alone
enables nothing. Both values belong in <code>importer.env</code>, and the container has to be rebuilt
afterwards with <code>docker compose up -d --force-recreate importer</code>. If you get a <code>401</code> instead, the
<code>curl</code> call is missing <code>-u importer:YOUR_PASSWORD</code> for the password protection in front.</p>
<p><strong>The import finished but nothing new appears in Firefly III.</strong> Check the importer log for
transactions rejected as duplicates: <code>docker compose logs importer --since 10m | grep -i duplicate</code>.
If there is nothing, check whether any rows arrived at all. A CSV with the bank&rsquo;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: <code>IGNORE_DUPLICATE_ERRORS</code> hides the messages in the interface, but they remain in
the log.</p>

</div>
<p class="mt-3 text-sm text-slate-500 dark:text-slate-400">
  Your problem is not listed?
  <a href="/en/errors/" class="font-medium text-paprika-700 hover:underline dark:text-paprika-400">Search all error messages →</a>
</p>

<h2 id="maintenance--backups">Maintenance &amp; backups</h2>
<p>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
<a href="/en/tutorials/restic-backups/">Restic backup</a> regardless:</p>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">/opt/firefly/importer.env    # token, secret, password hash
</span></span><span class="line"><span class="cl">firefly-config.json          # delimiter, date format, roles</span></span></code></pre></div>
</div>
<p>The JSON file is the actual time-saver. Lose it and you click through the wizard from scratch again.</p>
<p>Updates work like the ledger&rsquo;s, through the image tag. What matters is that both halves fit
together:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">cd</span> /opt/firefly
</span></span><span class="line"><span class="cl">sed -i <span class="s1">&#39;s/data-importer:version-2.3.5/data-importer:version-NEW_VERSION/&#39;</span> compose.yaml
</span></span><span class="line"><span class="cl">docker compose pull <span class="o">&amp;&amp;</span> docker compose up -d
</span></span><span class="line"><span class="cl">docker compose logs importer --tail <span class="m">20</span></span></span></code></pre></div>
</div>
<p>The importer follows Firefly III&rsquo;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
<a href="https://github.com/firefly-iii/data-importer/releases">releases page on GitHub</a>; the nightly
<code>develop</code> tags are nothing for an installation that touches your finances.</p>
<p>The date you really need in your calendar is the token&rsquo;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 <code>importer.env</code> and a
<code>docker compose up -d --force-recreate importer</code>.</p>
<p>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 <code>curl</code> 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.</p>
]]></content:encoded></item></channel></rss>