How to Install Akaunting (Free Accounting Software) on Debian 12

Estimated reading: 4 minutes 478 views

Introduction

Akaunting is an open-source accounting and business management platform designed for small and medium-sized businesses. It provides features such as invoicing, expense tracking, financial reports, and multi-currency support.

In this tutorial, you will learn how to install Akaunting on Debian 12 using:

  • Apache Web Server

  • MariaDB Database

  • PHP 8.1 (via Sury repository)

This guide follows a step-by-step structure that matches the installation process shown in the video, without SSL configuration, making it ideal for demos, labs, and internal deployments.

Prerequisites

Before starting, make sure you have:

  • A server running Debian 12

  • Root access via SSH

  • A domain name pointing to your server IP (or you can use the server IP directly)

Step 1: Connect to the Server

Linux & macOS

ssh root@YOUR_SERVER_IP

Windows (PowerShell / Windows Terminal)

ssh root@YOUR_SERVER_IP

Windows (PuTTY)

  • Host Name: YOUR_SERVER_IP

  • Port: 22

  • Connection type: SSH

  • Username: root

After connecting, you should see a shell prompt indicating you are logged in as root.

Step 2: Update the Operating System

apt update

Refreshes the package index and ensures Debian knows about the latest available packages.

apt upgrade -y

Installs all pending updates and reduces security and compatibility issues.

Note:
If you encounter the error “dpkg was interrupted”, run the following command to fix it and then repeat the update:

dpkg --configure -a

Step 3: Install Apache Web Server

apt install apache2

Installs the Apache HTTP server.

Enable Apache at boot:

systemctl enable apache2

Start Apache immediately:

systemctl start apache2

Verify Apache status:

systemctl status apache2

Apache will serve Akaunting’s web interface.

Step 4: Install and Configure MariaDB

Install MariaDB:

apt install mariadb-server

Enable and start MariaDB:

systemctl enable mariadb
systemctl start mariadb

Secure the Database

mysql_secure_installation

This interactive script:

  • Sets the MariaDB root password

  • Removes anonymous users

  • Disables remote root login

  • Removes test databases

Create the Akaunting Database

Enter the MariaDB shell:

mariadb

Run the following commands:

CREATE DATABASE akaunting CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'akaunting'@'localhost' IDENTIFIED BY 'StrongPasswordHere';
GRANT ALL PRIVILEGES ON akaunting.* TO 'akaunting'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 5: Install PHP 8.1 (Sury Repository)

Install required tools:

apt install ca-certificates apt-transport-https lsb-release curl gnupg

Create a keyring directory:

mkdir -p /etc/apt/keyrings

Import the PHP repository signing key:

curl -fsSL https://packages.sury.org/php/apt.gpg \
| gpg --dearmor -o /etc/apt/keyrings/php.gpg

Add the PHP repository:

echo "deb [signed-by=/etc/apt/keyrings/php.gpg] https://packages.sury.org/php/ bookworm main" \
> /etc/apt/sources.list.d/php.list

Update package metadata:

apt update

Step 6: Install PHP 8.1 and Required Extensions

apt install php8.1 libapache2-mod-php8.1 \
php8.1-mysql php8.1-bcmath php8.1-curl php8.1-gd \
php8.1-intl php8.1-mbstring php8.1-xml php8.1-zip \
php8.1-fileinfo php8.1-tokenizer php8.1-opcache

Verify PHP installation:

php -v

Step 7: Configure PHP for Akaunting

Edit the PHP configuration file:

nano /etc/php/8.1/apache2/php.ini

Confirm or update the following values:

memory_limit = 512M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
date.timezone = Europe/Bucharest

Apply changes:

systemctl restart apache2

Step 8: Download and Prepare Akaunting

Move to the web root:

cd /var/www

Download Akaunting:

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

Install unzip and extract:

apt install unzip
unzip akaunting.zip -d akaunting

Set permissions:

chown -R www-data:www-data /var/www/akaunting
chmod -R 755 /var/www/akaunting
chmod -R 775 /var/www/akaunting/storage
chmod -R 775 /var/www/akaunting/bootstrap/cache

Step 9: Configure Apache Virtual Host

Create a new virtual host:

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

Paste:

<VirtualHost *:80>
    ServerName yourdomain.com
    DocumentRoot /var/www/akaunting

    <Directory /var/www/akaunting>
        AllowOverride All
        Require all granted
    </Directory>

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

Enable the site and rewrite module:

a2ensite akaunting.conf
a2enmod rewrite
systemctl reload apache2

Step 10: Complete Akaunting Web Installation

Open your browser:

http://yourdomain.com

Follow the installer:

  • Enter database credentials

 

  • Create the admin account

  • Finish installation

You will be redirected to the Akaunting dashboard.


Conclusion

You have successfully installed Akaunting on Debian 12 using Apache, MariaDB, and PHP 8.1, without SSL.
This setup matches the video installation flow exactly and is suitable for testing, demos, or internal environments.

Share this Doc

How to Install Akaunting (Free Accounting Software) on Debian 12

Or copy link

CONTENTS