Agentic hosting is here. Connect to our MCP now
CloudLinux.ro
Applications

How to install Kimai on a Cloud VPS

Updated 11/29/2026

Kimai is time tracking and invoicing for freelancers, agencies and teams: a timer and manual entries, customers, projects and activities, hourly rates, reports, exports and invoices generated from the hours worked.

The self-hosted version removes per-user subscriptions: you pay only for the server, no matter how many teammates use the app.

One-click install on cloudlinux.ro

The fastest way: Kimai installs automatically at the first boot of a new server.

  1. Create a Cloud VPS from the control panel.
  2. In the configuration step, pick Kimai from the app catalog.
  3. Start the server. The install runs in the background for a few minutes and its status shows on the server page.
  4. Access details and generated passwords are saved on the server in /root/app-credentials.txt.

Manual install on any Ubuntu server

If you prefer doing it yourself, below is the exact script our automatic install runs. Execute it as root on a fresh Ubuntu server (24.04 recommended). It stops at the first error, and when it finishes you will find the access details in /root/app-credentials.txt.

export DEBIAN_FRONTEND=noninteractive
cl_firewall
curl -fsSL https://get.docker.com | sh
mkdir -p /opt/kimai
cd /opt/kimai
ADMIN_EMAIL="admin@${CL_HOSTNAME}"
ADMIN_PASS=$(openssl rand -base64 24 | tr -dc 'A-Za-z0-9' | cut -c1-20)
DB_PASS=$(openssl rand -hex 24)
HOST_RE=$(printf '%s' "$CL_HOSTNAME" | sed 's/\./\\./g')
cat > .env <<ENV
DB_PASS='${DB_PASS}'
DB_ROOT_PASS='$(openssl rand -hex 24)'
APP_SECRET='$(openssl rand -hex 32)'
TRUSTED_HOSTS='^(localhost|127\.0\.0\.1|${HOST_RE})$'
TRUSTED_PROXIES='127.0.0.1,172.16.0.0/12'
ADMINMAIL='${ADMIN_EMAIL}'
ADMINPASS='${ADMIN_PASS}'
DATABASE_URL='mysql://kimai:${DB_PASS}@sqldb/kimai?charset=utf8mb4&serverVersion=8.4.0'
ENV
chmod 600 .env
# kimai2:2 follows the current major (the docs' recommendation); the admin is created from ADMINMAIL/ADMINPASS.
cat > docker-compose.yml <<'YML'
services:
  sqldb:
    image: mysql:8.4
    restart: unless-stopped
    command: --default-storage-engine innodb
    volumes:
      - mysql:/var/lib/mysql
    environment:
      MYSQL_DATABASE: kimai
      MYSQL_USER: kimai
      MYSQL_PASSWORD: ${DB_PASS}
      MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
    healthcheck:
      test: mysqladmin -uroot -p$$MYSQL_ROOT_PASSWORD ping -h 127.0.0.1 --silent
      interval: 10s
      timeout: 5s
      retries: 12
      start_period: 30s
  kimai:
    image: kimai/kimai2:2
    restart: unless-stopped
    depends_on:
      sqldb: { condition: service_healthy }
    ports:
      - "127.0.0.1:8001:8001"
    volumes:
      - data:/opt/kimai/var/data
      - plugins:/opt/kimai/var/plugins
    environment:
      APP_SECRET: ${APP_SECRET}
      TRUSTED_HOSTS: ${TRUSTED_HOSTS}
      TRUSTED_PROXIES: ${TRUSTED_PROXIES}
      ADMINMAIL: ${ADMINMAIL}
      ADMINPASS: ${ADMINPASS}
      DATABASE_URL: ${DATABASE_URL}
      TZ: Europe/Bucharest
volumes:
  data:
  mysql:
  plugins:
YML
docker compose pull
docker compose up -d
for i in $(seq 1 120); do curl -fsL -o /dev/null http://127.0.0.1:8001/ && break; sleep 5; done
curl -fsL -o /dev/null http://127.0.0.1:8001/
{
  printf 'Kimai: utilizator admin (sau %s), parola %s\n' "$ADMIN_EMAIL" "$ADMIN_PASS"
  printf 'Inregistrarea publica este oprita; colegii se adauga din Sistem > Utilizatori.\n'
  printf 'Emailurile (resetare parola, notificari) se activeaza cu MAILER_URL in /opt/kimai/docker-compose.yml, de exemplu smtp://user:parola@server:587\n'
  printf 'Actualizare: cd /opt/kimai && docker compose pull && docker compose up -d\n'
} > /root/app-credentials.txt
cl_expose Kimai 8001

You can also save this script as a recipe in your account and reuse it on any new server.

Put this guide into practice on your own VPS

EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.

See pricing

Related tutorials