Kimai

How To Install Kimai on a Ubuntu 24.04

 

In this tutorial, we have covered step-by-step guide on how to install Kimai on a Ubuntu 24.04. A self-hosted time-tracking application.

Kimai is popular among freelancers and businesses for its intuitive interface and powerful reporting tools. Each step below includes explanations so you understand not just what to do, but also why you’re doing it.

Prerequisites

  • A Ubuntu 24.04 installed dedicated server .
  • A root user or normal user with administrative privileges.
  • A domain name point A record to server's IP

How To Install Kimai on a Ubuntu 24.04

1. Update and Prepare Your Server

Update Your Package List

Open your terminal or SSH into your Ubuntu server. It’s always a good practice to ensure that your server packages are up to date before installing any new software.

sudo apt update
sudo apt upgrade -y

The -y flag automatically confirms any prompts to install updates.

Install Basic Tools

While many of these might be installed by default, it’s good to be certain.

sudo apt install software-properties-common zip unzip curl -y
  • software-properties-common helps manage repository settings.
  • zip and unzip allow you to compress and extract archives.
  • curl helps you download files and check network endpoints.

2. Install Apache (or Nginx)

Kimai runs on PHP, which needs a web server to handle requests. Apache is straightforward and widely used; you can also use Nginx if you prefer.

Install Apache

sudo apt install apache2 -y
  • Installs the Apache web server on your Ubuntu server.
  • After installation, Apache will automatically start running.

Check if Apache is Running

sudo systemctl status apache2

If it’s active (running), you’re good to go.
If not, start it manually: sudo systemctl start apache2.

Enable Apache on Boot

sudo systemctl enable apache2

Ensures Apache automatically starts after a server reboot.

(If you prefer using Nginx, you would install it by running sudo apt install nginx -y and configure the virtual host accordingly. For simplicity, this guide focuses on Apache.)

3. Install and Configure PHP

Kimai requires PHP with several extensions. Ubuntu 24.04 typically has a newer version of PHP (for example, PHP 8.x).

Install PHP and Required Extensions

sudo apt install php php-cli php-fpm php-common \
php-gd php-intl php-mbstring php-mysql php-xml \
php-zip php-curl php-ldap -y
  • php-cli: Command-line interface for running PHP scripts.
  • php-fpm: FastCGI process manager for PHP, helps with performance.
  • php-mbstring: Needed for string manipulation in various encodings.
  • php-mysql: Allows PHP to communicate with MySQL/MariaDB databases.
  • php-intl: Important for internationalization and date formatting.
  • php-xml, php-zip, php-curl, php-gd: Various functionalities that Kimai needs to generate PDFs, handle files, and manage HTTP requests.
  • php-ldap: Required if you plan to integrate Kimai with an LDAP directory.

Adjust PHP Settings

Open the main PHP configuration file or the relevant pool file (often found at /etc/php/8.3/apache2/php.ini) in your favorite text editor:

sudo nano /etc/php/8.3/apache2/php.ini

Look for these settings and adjust them if necessary (for example, increasing the maximum file upload size or memory limit):

memory_limit = 256M
upload_max_filesize = 50M
post_max_size = 50M
  • memory_limit controls how much memory a PHP script can use.
  • upload_max_filesize and post_max_size control allowed file upload sizes.

Restart Apache

sudo systemctl restart apache2

Applies any configuration changes immediately.

4. Install MariaDB (or MySQL) and Create a Database

Kimai stores its data (projects, timesheets, user info, etc.) in a database. MariaDB is a popular open-source fork of MySQL.

Install MariaDB

sudo apt install mariadb-server mariadb-client -y

Secure Your MariaDB Server

sudo mysql_secure_installation

You’ll be prompted to set a root password, remove anonymous users, disable remote root login, and more. These steps help secure your database.

Create a Database and User for Kimai

Log into the MariaDB shell:

sudo mysql

Inside the MariaDB shell, run the following queries (adjust values to match your preferences—here we use kimai_dbkimai_user, and StrongPassword as placeholders):

CREATE DATABASE kimai_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'kimai_user'@'localhost' IDENTIFIED BY 'StrongPassword';
GRANT ALL PRIVILEGES ON kimai_db.* TO 'kimai_user'@'localhost';
  • 0 Utenti hanno trovato utile questa risposta
  • Hai trovato utile questa risposta?

    Articoli Correlati

    ERPNext v15

    Last Updated: 31 August 2025Applies to: Ubuntu 24.04 LTS (fresh server recommended)Skill Level:...

    Open-EMR v7.0.3

    Last Updated: 31 August 2025Applies to: Ubuntu 24.04 LTS (fresh server recommended)Skill Level:...

    ERPNext v14

    Last Updated: 31 August 2025Applies to: Ubuntu 24.04 LTS (fresh server recommended)Skill Level:...

    WordPress

    1. Overview WordPress is the most popular open-source blogging system and CMS on the Web. It...

    Joomla

    How to Install Joomla on Ubuntu 24.04   Joomla is a free and open-source content management...