Hey there! If you’re looking to set up Kimai 2—the awesome open-source time-tracking tool—on your Debian 12 server, you’re in the right place. We’ll keep things casual and walk through each step like you’re having a chat over coffee. By the end, your Kimai instance will be up and running with PHP 8.2, Nginx, and Let’s Encrypt HTTPS. Ready? Let’s dive in.

Note: We assume your database (MariaDB or MySQL) is already set up. If not, check out the guide on installing MariaDB on Debian 12 first.

1. Meet Your Server Prereqs

Before we get our hands dirty, make sure you have:

  • SSH access with a sudo-capable user
  • PHP 8.2 with required extensions
  • MariaDB or MySQL up and running
  • Nginx as your web server
  • Git & Composer installed
  • A domain (e.g., kimai.yourdomain.com) pointed to your server
  • Firewall open on ports 22 (SSH), 80 (HTTP), and 443 (HTTPS)

2. Install PHP 8.2 and Extensions

Enable and verify PHP:

3. Get Git and Composer

4. Prepare Kimai Folder

5. Clone Kimai Repo

6. Configure .env

Edit the DATABASE_URL line with your actual DB credentials. For example:

7. Install Dependencies

8. Run Kimai Installer

9. Set File Permissions

10. Configure Nginx

10.1 Install Nginx

10.2 Nginx Site Config

Create /etc/nginx/sites-available/kimai.conf:

Enable the site:

11. Secure with HTTPS

Follow the prompts. After completion, test at:

12. Schedule Cron Jobs

Add this:

13. Create Your First Super Admin

Run:

Enter your details:

To remove the default admin:

14. Maintenance Tips

  • Update regularly: sudo apt update && sudo apt upgrade -y
  • Backup MariaDB daily: mysqldump -u root -p kimai2 | gzip > /backup/kimai2_$(date +%F).sql.gz
  • Monitor logs: var/log/ and /var/log/nginx/
  • Consider Supervisor or systemd for advanced task handling
  • Check out Kimai plugins to expand features

You’re All Set!

Leave A Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.