<?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>Time-Tracking – Serverküche</title><link>https://serverkueche.de/en/tags/time-tracking/</link><description>Time-Tracking – 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>Thu, 26 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://serverkueche.de/en/tags/time-tracking/index.xml" rel="self" type="application/rss+xml"/><item><title>Kimai: Time Tracking for Freelancers &amp; Small Teams</title><link>https://serverkueche.de/en/tutorials/kimai-time-tracking/</link><pubDate>Thu, 26 Nov 2026 00:00:00 +0000</pubDate><author>feedback@serverkueche.de (Serverküche)</author><guid>https://serverkueche.de/en/tutorials/kimai-time-tracking/</guid><description>Kimai 2.72 with MariaDB behind Traefik: customer, project, activity – and the health check that hides the container without the right TRUSTED_HOSTS line.</description><content:encoded><![CDATA[<p>Anyone who bills by the hour writes those hours down somewhere in the end: in a spreadsheet, in a
SaaS account, or from memory straight into the invoice. Kimai is the third option: a full-grown time
tracker on your own server, where your clients&rsquo; data stays where you are accountable for it.</p>
<h2 id="what-are-we-building">What are we building?</h2>
<p>We run Kimai 2.72.0 with MariaDB 11.8.9 behind Traefik. At the end you create customers,
projects and activities, record time with a stopwatch or by hand, store an hourly rate and pull a
weekly report plus a CSV or Excel export out of it, the basis for any invoice.</p>
<p>Kimai is not a weekend project: it knows teams, roles, budgets, rates, working contracts, invoice
templates and a REST API. This tutorial builds the core that all of it sits on.</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>One line decides whether the site appears at all
  </p>
  <div class="prose-kitchen text-sm"><p>The Kimai image ships its own Docker health check that calls itself over <code>http://127.0.0.1:8001</code>. If
<code>TRUSTED_HOSTS</code> contains only your domain, Kimai rejects that request. The container then stays
<code>unhealthy</code> forever, and Traefik silently skips it. The result: no certificate, no reachable site,
and no error you would see without a debug log.</p>
<p>That is why <code>TRUSTED_HOSTS</code> below carries <code>|localhost|127.0.0.1</code>. Do not drop it.</p>
</div>
</div>
<h2 id="requirements">Requirements</h2>
<ul>
<li>A <a href="/en/tutorials/traefik-reverse-proxy/">reverse proxy with Traefik</a> and a subdomain pointing at
the server</li>
<li>Docker with Compose (comes with the <a href="/en/tutorials/traefik-reverse-proxy/">Traefik tutorial</a>)</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/kimai-time-tracking/" 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: Kimai about 140 MB, MariaDB about 150 MB. It runs next to other services on the 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 screenshots show the interface set to German. The menu structure is identical in English, and
the English labels are named in the text.</div>
</div>
<h2 id="step-by-step">Step by step</h2>
<h3 id="step-1-generate-the-credentials">Step 1: Generate the credentials</h3>
<p>Kimai needs four secrets. Create them before you write the configuration:</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">mkdir -p /opt/kimai <span class="o">&amp;&amp;</span> <span class="nb">cd</span> /opt/kimai
</span></span><span class="line"><span class="cl">openssl rand -hex <span class="m">32</span>      <span class="c1"># APP_SECRET</span>
</span></span><span class="line"><span class="cl">openssl rand -hex <span class="m">16</span>      <span class="c1"># database password</span>
</span></span><span class="line"><span class="cl">openssl rand -hex <span class="m">16</span>      <span class="c1"># database root password</span></span></span></code></pre></div>
</div>
<p>The fourth is the starting password for the administrator. Use a long one you will replace right
away:</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">openssl rand -base64 <span class="m">18</span></span></span></code></pre></div>
</div>
<p><code>APP_SECRET</code> signs sessions and form tokens. Swap it and every login becomes invalid, so it belongs
in your backup. The database root password is only needed by the container itself; Kimai connects
with the regular user.</p>
<h3 id="step-2-the-configuration">Step 2: The configuration</h3>
<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/kimai/.env</span>
</span></span><span class="line"><span class="cl"><span class="na">DOMAIN</span><span class="o">=</span><span class="s">time.YOUR_DOMAIN</span>
</span></span><span class="line"><span class="cl"><span class="na">APP_SECRET</span><span class="o">=</span><span class="s">YOUR_APP_SECRET</span>
</span></span><span class="line"><span class="cl"><span class="na">DB_PASSWORD</span><span class="o">=</span><span class="s">YOUR_DB_PASSWORD</span>
</span></span><span class="line"><span class="cl"><span class="na">DB_ROOT_PASSWORD</span><span class="o">=</span><span class="s">YOUR_ROOT_PASSWORD</span>
</span></span><span class="line"><span class="cl"><span class="na">ADMIN_MAIL</span><span class="o">=</span><span class="s">you@YOUR_DOMAIN</span>
</span></span><span class="line"><span class="cl"><span class="na">ADMIN_PASSWORD</span><span class="o">=</span><span class="s">YOUR_STARTING_PASSWORD</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">chmod <span class="m">600</span> /opt/kimai/.env</span></span></code></pre></div>
</div>
<h3 id="step-3-the-stack">Step 3: The stack</h3>
<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="c"># /opt/kimai/compose.yaml</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">services</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">db</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">mariadb:11.8.9</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">kimai-db</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">command</span><span class="p">:</span><span class="w"> </span>--<span class="l">default-storage-engine innodb</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">environment</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">MARIADB_DATABASE</span><span class="p">:</span><span class="w"> </span><span class="l">kimai</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">MARIADB_USER</span><span class="p">:</span><span class="w"> </span><span class="l">kimai</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">MARIADB_PASSWORD</span><span class="p">:</span><span class="w"> </span><span class="l">${DB_PASSWORD}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">MARIADB_ROOT_PASSWORD</span><span class="p">:</span><span class="w"> </span><span class="l">${DB_ROOT_PASSWORD}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">dbdata:/var/lib/mysql</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">kimai-intern]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">healthcheck</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">test</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">&#34;CMD&#34;</span><span class="p">,</span><span class="w"> </span><span class="s2">&#34;healthcheck.sh&#34;</span><span class="p">,</span><span class="w"> </span><span class="s2">&#34;--connect&#34;</span><span class="p">,</span><span class="w"> </span><span class="s2">&#34;--innodb_initialized&#34;</span><span class="p">]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">interval</span><span class="p">:</span><span class="w"> </span><span class="l">10s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">timeout</span><span class="p">:</span><span class="w"> </span><span class="l">5s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">retries</span><span class="p">:</span><span class="w"> </span><span class="m">12</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">start_period</span><span class="p">:</span><span class="w"> </span><span class="l">30s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">app</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">kimai/kimai2:2.72.0</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">kimai</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></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">db</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">condition</span><span class="p">:</span><span class="w"> </span><span class="l">service_healthy</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">environment</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">APP_SECRET</span><span class="p">:</span><span class="w"> </span><span class="l">${APP_SECRET}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">TRUSTED_HOSTS</span><span class="p">:</span><span class="w"> </span><span class="l">${DOMAIN}|localhost|127.0.0.1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">TRUSTED_PROXIES</span><span class="p">:</span><span class="w"> </span><span class="m">172.16.0.0</span><span class="l">/12</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">ADMINMAIL</span><span class="p">:</span><span class="w"> </span><span class="l">${ADMIN_MAIL}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">ADMINPASS</span><span class="p">:</span><span class="w"> </span><span class="l">${ADMIN_PASSWORD}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">DATABASE_URL</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;mysql://kimai:${DB_PASSWORD}@db/kimai?charset=utf8mb4&amp;serverVersion=11.8.9-MariaDB&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">TZ</span><span class="p">:</span><span class="w"> </span><span class="l">Europe/Berlin</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">data:/opt/kimai/var/data</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">plugins:/opt/kimai/var/plugins</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">kimai-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.kimai.rule=Host(`time.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.kimai.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.kimai.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.kimai.loadbalancer.server.port=8001</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">dbdata</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">data</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">plugins</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">networks</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">kimai-intern</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">internal</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">proxy</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">external</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span></span></span></code></pre></div>
</div>
<p>Four spots deserve a look. The Apache inside the Kimai container listens on port 8001, not 80;
without <code>loadbalancer.server.port=8001</code> Traefik talks into the void. <code>serverVersion</code> in
<code>DATABASE_URL</code> tells Doctrine which SQL dialect to speak. With MariaDB the <code>-MariaDB</code> suffix belongs
there. If the value does not match the database, Doctrine builds queries for the wrong server.
<code>TRUSTED_PROXIES</code> is the Docker network Traefik comes from; otherwise Kimai considers the
connection unencrypted. And the database sits in a network with <code>internal: true</code> and is therefore
unreachable both from outside and from the <code>proxy</code> network.</p>
<p>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/kimai
</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">kimai     Up 25 seconds (healthy)
</span></span><span class="line"><span class="cl">kimai-db  Up 36 seconds (healthy)</span></span></code></pre></div>
</div>
<p>The first start takes a moment. Kimai creates the schema, clears and warms the cache. Expect
half a minute to a minute until <code>(healthy)</code> shows up. And that <code>(healthy)</code> is exactly what Traefik waits for:
as long as it is missing there is neither a route nor a certificate.</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://time.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">302</span></span></code></pre></div>
</div>
<p>The redirect leads to the login page, so the service is up.</p>
<h3 id="step-4-first-login-and-the-setup-wizard">Step 4: First login and the setup wizard</h3>
<p>The username is <code>admin</code>, not the mail address from <code>ADMINMAIL</code>. That one only ends up in the
profile. The password is the one from <code>ADMIN_PASSWORD</code>.</p>
<p>After signing in, Kimai walks every new user through a short wizard once. It starts in English;
on the second page you can switch <em>Language</em> to your own. That page is the important one:</p>
<p><figure class="my-6"><img src="/en/tutorials/kimai-time-tracking/kimai-wizard_hu_4073e41caab07cb4.webp" srcset="/en/tutorials/kimai-time-tracking/kimai-wizard_hu_23bdb1c4522d0352.webp 480w, /en/tutorials/kimai-time-tracking/kimai-wizard_hu_4073e41caab07cb4.webp 768w, /en/tutorials/kimai-time-tracking/kimai-wizard_hu_a0461c5e9ea3d941.webp 1200w, /en/tutorials/kimai-time-tracking/kimai-wizard_hu_1f78235bc287796.webp 1920w" sizes="(min-width: 768px) 768px, 100vw"
    width="768" height="432"
    data-full="/en/tutorials/kimai-time-tracking/kimai-wizard_hu_e3d8dc38b52cac17.webp"
    alt="Kimai&rsquo;s setup wizard with fields for language, time/date/currency format, timezone and design" title="Language, format and timezone. The timezone is the one that matters."
    loading="lazy" decoding="async" class="rounded-lg"><figcaption class="mt-2 text-sm text-center text-slate-500 italic">Language, format and timezone. The timezone is the one that matters.</figcaption></figure></p>
<p>Change the timezone. Kimai defaults it to <code>UTC</code>, even with <code>TZ=Europe/Berlin</code> set in the
container: the environment variable applies to PHP, while the timezone in the profile belongs to the
user. For a time tracker that means a two-hour offset in every entry.</p>
<p>These settings are per user. Every new team member runs the same wizard and picks their own.</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>Change the starting password, then delete the lines
  </p>
  <div class="prose-kitchen text-sm">Switch to a password of your own now under <em>My profile → Password</em>. After that you can remove
<code>ADMINMAIL</code> and <code>ADMINPASS</code> from <code>compose.yaml</code>: the two variables only create the user if it is
missing. A changed password stays valid after restarting the container, and without the lines
logging in keeps working unchanged. As long as they stay, a valid login
password sits in plain text in your configuration.</div>
</div>
<h3 id="step-5-customer-project-activity">Step 5: Customer, project, activity</h3>
<p>Kimai assigns every recorded minute to three things, and they hang together:</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">Customer    who pays         -&gt; Sample Customer Ltd
</span></span><span class="line"><span class="cl">Project     what for         -&gt; Website relaunch
</span></span><span class="line"><span class="cl">Activity    what exactly     -&gt; Development, Meeting, Testing</span></span></code></pre></div>
</div>
<p>No customer, no project; no project, no time entry. First create the customer under
<em>Administration → Customers → Create</em>; the name is the only required field.</p>
<p>Then the project under <em>Administration → Projects</em>:</p>
<p><figure class="my-6"><img src="/en/tutorials/kimai-time-tracking/kimai-projekt_hu_335c9d73ebef27a9.webp" srcset="/en/tutorials/kimai-time-tracking/kimai-projekt_hu_eab16a9a6b3e4034.webp 480w, /en/tutorials/kimai-time-tracking/kimai-projekt_hu_335c9d73ebef27a9.webp 768w, /en/tutorials/kimai-time-tracking/kimai-projekt_hu_274273f892845b2a.webp 1200w, /en/tutorials/kimai-time-tracking/kimai-projekt_hu_cb985ce8da757461.webp 1920w" sizes="(min-width: 768px) 768px, 100vw"
    width="768" height="432"
    data-full="/en/tutorials/kimai-time-tracking/kimai-projekt_hu_277d9af2f40d422c.webp"
    alt="Kimai&rsquo;s &ldquo;create project&rdquo; form with name, customer, project number and an hourly quota of 40:00" title="The project hangs off the customer. Hourly quota and budget are optional but useful."
    loading="lazy" decoding="async" class="rounded-lg"><figcaption class="mt-2 text-sm text-center text-slate-500 italic">The project hangs off the customer. Hourly quota and budget are optional but useful.</figcaption></figure></p>
<p>The hourly quota (<code>40:00</code> here) is the number Kimai measures progress against. The project page
then shows a line like <code>Working hours – 55.00% 22:00 / 40:00</code>. That is the most honest early warning
against fixed-price projects going sideways.</p>
<p>Activities (<em>Administration → Activities</em>) come in two flavours: bound to a project, or global.
Global means you can use them in every project, exactly right for classics like &ldquo;Development&rdquo; or
&ldquo;Meeting&rdquo;. The <em>Allow global activities</em> switch on the project decides whether they show up
there.</p>
<h3 id="step-6-record-time">Step 6: Record time</h3>
<p>Two routes lead to the same entry. The stopwatch is the start button at the top right, next to
your name. The running time is visible there afterwards, and a second click ends the entry. By hand
you go through <em>My times → Create</em>, with date, start and end. Leave the end empty and you get a
running entry, which is handy when you forgot to hit start.</p>
<p><figure class="my-6"><img src="/en/tutorials/kimai-time-tracking/kimai-zeiten_hu_1e02120d400c6276.webp" srcset="/en/tutorials/kimai-time-tracking/kimai-zeiten_hu_cd134fb064a17b01.webp 480w, /en/tutorials/kimai-time-tracking/kimai-zeiten_hu_1e02120d400c6276.webp 768w, /en/tutorials/kimai-time-tracking/kimai-zeiten_hu_3b2c7b77d54c19b4.webp 1200w, /en/tutorials/kimai-time-tracking/kimai-zeiten_hu_ff1dd02400878b8c.webp 1920w" sizes="(min-width: 768px) 768px, 100vw"
    width="768" height="432"
    data-full="/en/tutorials/kimai-time-tracking/kimai-zeiten_hu_d4536568326f9405.webp"
    alt="Kimai&rsquo;s &ldquo;my times&rdquo; list with nine entries, one of them without an end time as a running record" title="The top entry is still running: end shows \&#34;-\&#34;, and the clock ticks in the top right"
    loading="lazy" decoding="async" class="rounded-lg"><figcaption class="mt-2 text-sm text-center text-slate-500 italic">The top entry is still running: end shows \&#34;-\&#34;, and the clock ticks in the top right</figcaption></figure></p>
<p>A running entry does not show up in the reports yet. It is only counted once it has been
stopped. Anyone wondering why today reads <code>0:00</code> in the report usually still has the clock going.</p>
<h3 id="step-7-store-an-hourly-rate">Step 7: Store an hourly rate</h3>
<p>Without an hourly rate every currency column stays empty. You set the rate on the project
(<em>Project → Prices</em>), either per user or for everyone:</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">Price           85          price per hour
</span></span><span class="line"><span class="cl">Internal price  (empty)     falls back to the normal price
</span></span><span class="line"><span class="cl">Fixed price     off         otherwise every entry costs the same</span></span></code></pre></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>The hourly rate is not retroactive
  </p>
  <div class="prose-kitchen text-sm">Kimai freezes the price when an entry is saved. A rate stored later does not change times
already recorded: seven entries created before the rate stay at <code>€0.00</code>, while a new three-hour
entry immediately shows up as <code>€255.00</code> in the project overview. So if you take Kimai
into production, set the rates before the first recorded hour or fix the old entries one by
one.</div>
</div>
<h3 id="step-8-report-and-export">Step 8: Report and export</h3>
<p><em>Reporting</em> holds a dozen views; the everyday one is <em>Weekly view for one user</em>:</p>
<p><figure class="my-6"><img src="/en/tutorials/kimai-time-tracking/kimai-wochenbericht_hu_882f664f7e676493.webp" srcset="/en/tutorials/kimai-time-tracking/kimai-wochenbericht_hu_aa0bddbd33c71fa.webp 480w, /en/tutorials/kimai-time-tracking/kimai-wochenbericht_hu_882f664f7e676493.webp 768w, /en/tutorials/kimai-time-tracking/kimai-wochenbericht_hu_5531afd2d149d85b.webp 1200w, /en/tutorials/kimai-time-tracking/kimai-wochenbericht_hu_40ffbd81fad6cd0e.webp 1920w" sizes="(min-width: 768px) 768px, 100vw"
    width="768" height="432"
    data-full="/en/tutorials/kimai-time-tracking/kimai-wochenbericht_hu_db68b7a150f7f9de.webp"
    alt="Kimai&rsquo;s weekly report with times per customer, project and activity for week 43" title="Customer, project and activity per weekday, with a total across everything"
    loading="lazy" decoding="async" class="rounded-lg"><figcaption class="mt-2 text-sm text-center text-slate-500 italic">Customer, project and activity per weekday, with a total across everything</figcaption></figure></p>
<p>For the invoice you use <em>Time Tracking → Export</em>. Filter period, customer and project there, click
<em>Search</em> and get a preview with duration and amount:</p>
<p><figure class="my-6"><img src="/en/tutorials/kimai-time-tracking/kimai-export_hu_ba42892a9032e3db.webp" srcset="/en/tutorials/kimai-time-tracking/kimai-export_hu_a77273228f69b0be.webp 480w, /en/tutorials/kimai-time-tracking/kimai-export_hu_ba42892a9032e3db.webp 768w, /en/tutorials/kimai-time-tracking/kimai-export_hu_a7c3c1b905e00747.webp 1200w, /en/tutorials/kimai-time-tracking/kimai-export_hu_2379326526ca1a49.webp 1920w" sizes="(min-width: 768px) 768px, 100vw"
    width="768" height="432"
    data-full="/en/tutorials/kimai-time-tracking/kimai-export_hu_7a130d6ee4c76060.webp"
    alt="Kimai&rsquo;s export page with filters, a preview over 25:00 hours and the CSV, Excel, PDF and print buttons" title="Filter and search first, then export. The total is already in the header."
    loading="lazy" decoding="async" class="rounded-lg"><figcaption class="mt-2 text-sm text-center text-slate-500 italic">Filter and search first, then export. The total is already in the header.</figcaption></figure></p>
<p>Four outputs are available: <em>CSV</em>, <em>Excel</em>, <em>PDF</em> and <em>Print</em>. CSV and Excel arrive as
files with the date in the name (<code>20261026-kimai-export.csv</code> and <code>.xlsx</code>); the PDF button opens a menu of
templates. One quirk of the CSV: the column headings are English
(<code>Date,From,To,Duration,Currency,Price,…</code>) regardless of the interface language.</p>
<p>The <em>Mark as exported</em> switch ticks a flag on the entries you just exported. Afterwards you can
hide them with the <code>Exported = No</code> filter, so next month you do not accidentally export the same
hours twice.</p>
<h3 id="step-9-more-users">Step 9: More users</h3>
<p>Under <em>System → Users → Create</em> you add colleagues. Besides name, mail and password you
pick language, timezone and optionally a role:</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">(none)           User – records and sees only their own times
</span></span><span class="line"><span class="cl">ROLE_TEAMLEAD    Team lead – manages their own teams
</span></span><span class="line"><span class="cl">ROLE_ADMIN       Administrator – customers, projects, users
</span></span><span class="line"><span class="cl">ROLE_SUPER_ADMIN System admin – plus the system settings</span></span></code></pre></div>
</div>
<p>Without a role a user is simply a user, and that is the right default: such an account sees nothing
but its own timesheet, <em>Administration</em> and <em>System</em> are missing from the menu, and calling
<code>/en/admin/user/</code> directly ends in a <code>403</code> error page.</p>
<p>If you want finer control over who sees which projects, use teams: a team gets members and is
attached to customers or projects. As long as no team is assigned, a project is visible to everyone,
and the project page says so too.</p>
<p>For accounts with administrator rights, <em>My profile → Two-Factor (2FA)</em> is worth the two minutes;
Kimai brings TOTP along out of the box.</p>
<h2 id="when-it-doesnt-work">When it doesn&rsquo;t work</h2>
<div class="troubleshoot not-prose">
<p><strong>The site is unreachable and the browser reports an invalid certificate.</strong> Check <code>docker compose ps</code>
first: if it permanently reads <code>(health: starting)</code> or <code>(unhealthy)</code>, that is your cause. Traefik
skips containers that are not healthy. Its debug log then says <code>Filtering unhealthy or starting container</code>, and since no router exists, Traefik never requests a certificate either. The trigger is
almost always <code>TRUSTED_HOSTS</code>: the built-in health check calls <code>http://127.0.0.1:8001</code>, and Kimai
answers with a <code>400</code> if only the domain is listed. The log (<code>docker compose logs app</code>) shows
<code>Untrusted Host &quot;127.0.0.1&quot;</code>. Set
<code>TRUSTED_HOSTS: ${DOMAIN}|localhost|127.0.0.1</code> and rebuild with <code>docker compose up -d --force-recreate app</code>.</p>
<p><strong>Every recorded time is off by a couple of hours.</strong> The timezone in the user profile is still UTC.
It is a user setting and is not taken from <code>TZ</code> in the container; that variable only applies to
PHP. Fix it under <em>My profile → Preferences</em>. Careful: entries already recorded keep their stored
time and shift along in the display.</p>
<p><strong>Logging in with the mail address from <code>ADMINMAIL</code> fails.</strong> The username is <code>admin</code>, the mail
address only lands in the account&rsquo;s profile. If you locked yourself out, create a new account inside
the container: <code>docker compose exec -T app /opt/kimai/bin/console kimai:user:create emergency emergency@YOUR_DOMAIN ROLE_SUPER_ADMIN &quot;YOUR_PASSWORD&quot;</code>. On success it answers
<code>[OK] Success! Created user: emergency</code>. Pass the password as the fourth argument. Leave it out and
the command asks with <code>Please enter the password:</code>, and because of <code>-T</code> your input then shows up
readable in the terminal. In a script without input it aborts with <code>The password may not be empty</code>.</p>
<p><strong>The report shows hours but <code>0.00 €</code>.</strong> The hourly rate is frozen when an entry is saved and does
not apply retroactively. Enter the rate on the project (or the user) and verify with a fresh test
entry. If an amount appears there, the setting is right and only the old entries need fixing.</p>
<p><strong>A new user sees no projects or gets a <code>403</code>.</strong> That is the expected behaviour of an account
without a role: own times yes, administration no. If the projects are missing from their
selection instead, a team is involved. As soon as a team is assigned to a project, only its members
see it. Either add the user to the team or remove the team assignment from the project.</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>Kimai releases often. From 2.58.0 (25 May 2026) to 2.72.0 (13 November 2026) there were 17
releases, one every ten days on average. If you do not want to chase that, pin the major version
(<code>kimai/kimai2:2</code>) and update deliberately; if you pin the exact version you always know what is
running. Both are defensible, <code>latest</code> is not.</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/kimai
</span></span><span class="line"><span class="cl">docker compose <span class="nb">exec</span> -T db sh -c <span class="s1">&#39;mariadb-dump -uroot -p&#34;$MARIADB_ROOT_PASSWORD&#34; kimai&#39;</span> &gt; before-update-<span class="k">$(</span>date +%F<span class="k">)</span>.sql
</span></span><span class="line"><span class="cl">sed -i <span class="s1">&#39;s/kimai2:2.72.0/kimai2: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 app --tail <span class="m">20</span></span></span></code></pre></div>
</div>
<p>The dump takes the password from the database container&rsquo;s own environment, which is why the command
sits in single quotes and is evaluated <em>there</em>, not in your shell.</p>
<p>The container handles schema migration and cache warming on start by itself. Every restart shows
it in the log (<code>Rebuilding your cache</code>, <code>Kimai config was reloaded</code>). That is why the
first request after an update is slow; after about a minute <code>(healthy)</code> is back.</p>
<p>Three things need backing up:</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/kimai/.env         # APP_SECRET and database passwords
</span></span><span class="line"><span class="cl">mariadb-dump output     # customers, projects, times, users
</span></span><span class="line"><span class="cl">volume kimai_data       # uploaded files, invoice templates</span></span></code></pre></div>
</div>
<p>A database dump without the <code>.env</code> is of little use: with a new <code>APP_SECRET</code> every session becomes
invalid and logging in breaks. Both belong together in your
<a href="/en/tutorials/restic-backups/">Restic backup</a>, because customer names, project names and hourly
rates live here.</p>
<p>The footprint is modest and stays that way:</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">kimai     ~140 MB RAM
</span></span><span class="line"><span class="cl">kimai-db  ~150 MB RAM
</span></span><span class="line"><span class="cl">volume kimai_dbdata   173 MB after setup</span></span></code></pre></div>
</div>
<p>Those 173 MB are almost entirely the empty MariaDB scaffolding. Time entries are a few bytes each,
even ten years of full-time work will not come near a gigabyte.</p>
<p>And the effort? An update every few weeks with a dump beforehand, ten minutes. Once a quarter
a look at the user list and the team assignments. The real discipline lies elsewhere: a time tracker
is only as good as the habit of actually starting the clock.</p>
]]></content:encoded></item></channel></rss>