Deploy Kimai
Open-source time tracking with MariaDB and persistent team data.
Kimai
Just deployed
/opt/kimai/var/data
MariaDB
Just deployed
/var/lib/mysql
Deploy and Host Kimai on Railway
What is Kimai?
Kimai is an open-source, multi-user time-tracking application for freelancers, teams, and organizations. It combines timers, timesheets, projects, customers, reporting, invoicing, exports, role-based access, APIs, and optional plugins in a browser-based system that can be hosted under your own control.
About Hosting Kimai
This template runs the official Kimai 2.61.0 Apache image with MariaDB 11.4.5.
Railway provides the public HTTPS endpoint for Kimai while the database remains
on private networking. Kimai waits for MariaDB and applies its idempotent
Doctrine migrations before Apache starts. A persistent application volume
retains Kimai's writable data under /opt/kimai/var/data; MariaDB uses a
separate persistent volume. Required passwords are generated at deployment
time, while portable settings and service connections are prefilled, so the
base deployment needs no external credentials.
Common Use Cases
- Track billable and non-billable time across customers and projects.
- Operate team timesheets with roles, approvals, reports, and exports.
- Create invoices from recorded work and extend Kimai with optional plugins.
Dependencies for Kimai Hosting
kimai/kimai2:2.61.0@sha256:33d9574ba954fd4cf2f01f6369fa3a26a7bf0944d0d7f43b779c8927f8729aa9.mariadb:11.4.5@sha256:5dfb3093333fa0ea53194ddef0a2bfa21d3b1e1353bd228b22610cd6fc0c04daon Railway private networking.- Persistent volumes mounted at
/opt/kimai/var/dataand/var/lib/mysql.
Deployment Dependencies
Implementation Details
Kimai listens on port 8001; Railway routes HTTPS to that port and checks the
public /en/login page. The Kimai container waits for its private MariaDB
connection, runs kimai:install to create or migrate the schema, rebuilds
caches, and only then starts Apache. No separate worker or scheduler is required
by this release.
The template starts the official image with
bash -c "a2dismod mpm_event mpm_worker 2>/dev/null; a2enmod mpm_prefork 2>/dev/null; exec /entrypoint.sh".
This bounded adjustment disables only the two conflicting Apache MPM modules,
enables mpm_prefork, suppresses harmless module-state diagnostics, and then
executes Kimai's upstream entrypoint. It does not print deployment secrets.
The MariaDB password is generated once on the database service and referenced
by Kimai's DATABASE_URL. The initial administrator password and MariaDB root
password are independent generated values. The initial administrator email is
admin@kimai.local; retrieve the generated ADMINPASS value from the deployed
Kimai service variables, sign in, and replace both credentials immediately.
Kimai persists its writable data at /opt/kimai/var/data, while MariaDB stores
its database at /var/lib/mysql. Configure SMTP after deployment if password
reset and notification email are required.
Before updating, back up both volumes and test the new immutable Kimai and MariaDB images in isolation. Because Kimai applies database migrations during startup, an incompatible upgrade must be rolled back with both the prior image digest and the matching MariaDB/application-volume backups.
This community template is maintained independently and does not imply affiliation with or endorsement by the Kimai project.
Why Deploy Kimai on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Kimai on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
Kimai
kimai/kimai2:2.61.0MariaDB
mariadb:11.4.5