How to update Kimai to the next release version

  1. Make sure that you have a working database backup before you start the update.
  2. Check UPGRADING for required manual changes between your current and the new version.
  3. You can upgrade multiple versions at once, e.g. from 1.19 to 2.0.22, skipping everything between.
  4. Some tweaks might be necessary to run the commands listed below, read the installation documentation for more information.

Updating Kimai

Change into your Kimai directory, then fetch the latest code and install all dependencies:

git fetch --tags
git checkout 2.18.0

You might have to prefix the next commands with sudo and/or php (depends on your environment):

Update all composer dependencies:

composer install --no-dev --optimize-autoloader -n

And run the Kimai updater:

bin/console kimai:update

Remember to adjust the file permissions if necessary.

Adjust file permission

You have to allow PHP (your webserver process) to write to var/ and it subdirectories.

Here is an example for Debian/Ubuntu (to be executed inside the Kimai directory):

chown -R :www-data .
chmod -R g+r .
chmod -R g+rw var/

That’s it, Kimai is running the most current version. Enjoy the latest time-tracking features!


flex.symfony.com not found

If you see the following error during composer install, then you are running a very old installation 😁

curl error 6 while downloading https://flex.symfony.com/versions.json: Could not resolve host: flex.symfony.com 

Great that you like Kimai, but PLEASE: for various reasons (like security) you should update more regularly!

Please run composer install --no-dev --optimize-autoloader -n --no-plugins --no-scripts once and then follow the normal update process.

Changed files

Please check with git status if your directory is without changes, to make sure you really can upgrade. If the following statement looks different for you, keep on reading:

$ LANG=en_US git status
Not currently on any branch.
nothing to commit, working tree clean

If you experience an issue like this (file name can vary) while performing the git update:

error: Your local changes to the following files would be overwritten by checkout:
Please commit your changes or stash them before you switch branches.


config/routes/annotations.yaml: needs merge
error: you need to resolve your current index first

This means you have changes in at least one of the files in your installation. This can happen by installing additional packages (e.g. for LDAP), or simply when you changed a configuration file (which was not meant to be changed, read the docs how to apply config changes in a safe manner).

These changes need to be reverted before the update can be executed. One possible solution is to use git stash, which will store your changes in a temporary location. If that fails for some reason, the other (rather extreme) option is to run git reset --hard, which will wipe all local changes.

Please read GIT docs on how to fix that, it is NOT related to Kimai.