Installation · 8 min read · Dec 20, 2025

Comment installer Akaunting avec Apache et Let's Encrypt SSL sur Ubuntu 22.04

Akaunting est une application de comptabilité open-source et auto-hébergée pour les petites entreprises et les freelances. Elle est construite avec Laravel, Bootstrap, jQuery et RESTful API. Elle est utilisée pour créer et gérer des factures, des devis et des finances via un navigateur web. Elle offre un excellent App Store pour les utilisateurs et les développeurs afin d’étendre la fonctionnalité d’Akaunting.

Dans ce tutoriel, je vais vous montrer comment installer le logiciel de comptabilité Akaunting avec Apache et Let’s Encrypt SSL sur Ubuntu 22.04.

Prérequis

  • Un serveur exécutant Ubuntu 22.04.
  • Un nom de domaine valide pointant vers l’IP de votre serveur.
  • Un mot de passe root configuré sur le serveur.

Installer Apache, MariaDB et PHP

Tout d’abord, vous devrez installer Apache, MariaDB, PHP et d’autres extensions PHP sur votre serveur. Vous pouvez tous les installer en exécutant la commande suivante :

apt-get install apache2 mariadb-server php libapache2-mod-php php-common php-imap php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysql php-cli php-bcmath php-ldap php-zip php-curl unzip curl -y

Après avoir installé tous les paquets, éditez le fichier de configuration PHP et changez les paramètres par défaut :

nano /etc/php/8.1/apache2/php.ini
Changez les lignes suivantes :
memory_limit = 256M
upload_max_filesize = 16M
post_max_size = 16M
max_execution_time = 300
date.timezone = UTC

Enregistrez et fermez le fichier, puis redémarrez le service Apache pour appliquer les modifications de configuration :

systemctl restart apache2

Configurer la base de données MariaDB

Akaunting utilise MariaDB/MySQL comme backend de base de données. Vous devrez donc créer une base de données et un utilisateur pour Akaunting.

Tout d’abord, connectez-vous à MariaDB avec la commande suivante :

mysql

Une fois connecté, créez une base de données et un utilisateur pour Akaunting avec la commande suivante :

MariaDB [(none)]> CREATE DATABASE akaunting_db;
MariaDB [(none)]> CREATE USER 'akaunting_user'@'localhost' IDENTIFIED BY 'password';

Ensuite, accordez tous les privilèges à la base de données Akaunting avec la commande suivante :

MariaDB [(none)]> GRANT ALL ON akaunting_db.* TO 'akaunting_user'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

Ensuite, videz les privilèges et quittez MariaDB avec la commande suivante :

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

Installer Akaunting

Tout d’abord, allez sur la page de téléchargement officielle d’Akaunting et téléchargez la dernière version en utilisant la commande suivante :

wget -O Akaunting.zip https://akaunting.com/download.php?version=latest

Une fois le téléchargement terminé, décompressez le fichier téléchargé dans le répertoire racine web d’Apache :

mkdir -p /var/www/html/akaunting
unzip Akaunting.zip -d /var/www/html/akaunting

Ensuite, changez la propriété et les permissions du répertoire Akaunting :

chown -R www-data:www-data /var/www/html/akaunting/
chmod -R 755 /var/www/html/akaunting/

Une fois que vous avez terminé, vous pouvez passer à l’étape suivante.

Configurer Apache pour Akaunting

Ensuite, vous devrez créer un fichier de configuration de virtual host Apache pour Akaunting. Vous pouvez le créer avec la commande suivante :

nano /etc/apache2/sites-available/akaunting.conf

Ajoutez les lignes suivantes :


ServerAdmin [email protected]
DocumentRoot /var/www/html/akaunting
ServerName akaunting.example.com
DirectoryIndex index.html index.php

Options +FollowSymlinks
AllowOverride All
Require all granted



ErrorLog ${APACHE_LOG_DIR}/akaunting_error.log
CustomLog ${APACHE_LOG_DIR}/akaunting_access.log combined

Enregistrez et fermez le fichier, puis activez le virtual host Apache et le module de réécriture avec la commande suivante :

a2ensite akaunting
a2enmod rewrite

Ensuite, redémarrez le service Apache pour appliquer les modifications :

systemctl restart apache2

Vous pouvez maintenant vérifier l’état d’Apache avec la commande suivante :

systemctl status apache2

Vous obtiendrez la sortie suivante :

? apache2.service - Le serveur HTTP Apache
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-11-12 13:45:47 UTC; 10s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 16032 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 16036 (apache2)
      Tasks: 6 (limit: 464122)
     Memory: 14.2M
     CGroup: /system.slice/apache2.service
             ??16036 /usr/sbin/apache2 -k start
             ??16037 /usr/sbin/apache2 -k start
             ??16038 /usr/sbin/apache2 -k start
             ??16039 /usr/sbin/apache2 -k start
             ??16040 /usr/sbin/apache2 -k start
             ??16041 /usr/sbin/apache2 -k start

Nov 12 13:45:47 ubuntu22041 systemd[1]: Starting Le serveur HTTP Apache...

Sécuriser Akaunting avec Let’s Encrypt SSL

Ensuite, il est judicieux de sécuriser votre site web avec Let’s Encrypt SSL. Tout d’abord, installez le client Certbot en utilisant la commande suivante :

apt-get install certbot python3-certbot-apache -y

Une fois installé, exécutez la commande suivante pour sécuriser votre site web avec Let’s Encrypt SSL :

certbot --apache -d akaunting.example.com

On vous demandera de fournir votre email et d’accepter les conditions de service comme indiqué ci-dessous :

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for akaunting.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/akaunting-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/akaunting-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/akaunting-le-ssl.conf

Ensuite, choisissez si vous souhaitez ou non rediriger le trafic HTTP vers HTTPS comme indiqué ci-dessous :

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

Tapez 2 et appuyez sur Entrée pour installer le Let’s Encrypt SSL pour votre site web :

Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/akaunting.conf to ssl vhost in /etc/apache2/sites-available/akaunting-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://akaunting.example.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=akaunting.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/akaunting.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/akaunting.example.com/privkey.pem
   Your cert will expire on 2023-02-12. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

Accéder à l’interface web d’Akaunting

Maintenant, ouvrez votre navigateur web et accédez à l’interface web d’Akaunting en utilisant l’URL http://akaunting.example.com. Vous obtiendrez l’écran suivant :

Choisir la langue

Sélectionnez votre langue et cliquez sur le bouton Suivant. Vous obtiendrez l’écran de configuration de la base de données :

Paramètres de la base de données

Fournissez les détails de votre base de données et cliquez sur le bouton Suivant. Vous obtiendrez l’écran de création du compte utilisateur Admin :

Paramètres de l'entreprise

Fournissez le nom de votre entreprise, votre email, votre mot de passe et cliquez sur le bouton Suivant. Vous obtiendrez l’écran de connexion d’Akaunting :

Connexion

Fournissez votre nom d’utilisateur admin, votre mot de passe et cliquez sur le bouton Connexion. Vous obtiendrez l’écran suivant :

Entreprise

Cliquez sur le bouton Passer. Vous obtiendrez l’écran des devises :

Devises

Activez vos devises et cliquez sur le bouton Suivant. Vous obtiendrez l’écran des plugins :

Tableau de bord d'Akaunting

Installez vos modules requis et cliquez sur le bouton Suivant. Vous obtiendrez l’écran suivant :

Créer une nouvelle facture

Vous pouvez maintenant créer votre première facture à partir de l’écran ci-dessus.

Conclusion

Félicitations ! Vous avez réussi à installer Akaunting avec Apache et Let’s Encrypt SSL sur le serveur Ubuntu 22.04. Vous pouvez maintenant héberger le logiciel Akaunting dans votre organisation pour gérer vos factures, devis et finances de n’importe où. N’hésitez pas à me poser des questions si vous en avez.

Share: X/Twitter LinkedIn

Recevez de nouveaux articles dans votre boîte de réception.

Aucun spam. Désabonnez-vous à tout moment.