how to install akaunting on ubuntu 22.04

How to Install Akaunting on Ubuntu 22.04

Spread the love

Akaunting is a free and open-source software written in PHP using the Laravel framework and modern technologies such as VueJS, Tailwind, RESTful API and etc.

The information is stored in MySQL database service, and for web servers, we can use Nginx, Apache, or LiteSpeed. In this blog post, we will install Akaunting with the LAMP stack.

Installing Akaunting with LAMP stack on Ubuntu 22.04 is a straightforward process that may take up to 15 minutes. Let’s get started!


  • A server with Ubuntu 22.04 as OS
  • User privileges: root or non-root user with sudo privileges
  • A valid domain with pointed A record to the server IP address

Step 1. Update the System

Before we start with the installation of the LAMP stack and Akaunting, we will update the system packages to their latest versions available.

sudo apt-get update -y && sudo apt-get upgrade -y

Step 2. Install LAMP Stack

First, we will install the Apache Web server.

sudo apt-get install apache2 -y

Once installed, start and enable the service.

sudo systemctl enable apache2 && sudo systemctl start apache2

Check if the service is up and running:

sudo systemctl status apache2

You should receive the following output:

oot@host:~# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-08-05 05:16:02 CDT; 1s ago
    Process: 70629 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 70633 (apache2)
      Tasks: 6 (limit: 4557)
     Memory: 13.6M
        CPU: 140ms
     CGroup: /system.slice/apache2.service

Next, we will install PHP8.1 with its extensions:

sudo apt-get install php8.1 php8.1-cli php8.1-common php8.1-imap php8.1-redis php8.1-snmp php8.1-xml php8.1-zip php8.1-mbstring php8.1-curl php8.1-mysqli php8.1-intl php8.1-bcmath php8.1-gd libapache2-mod-php -y

To check the installed PHP version execute the php -v command:

root@host:~# php -v
Created directory: /var/lib/snmp/cert_indexes
PHP 8.1.2-1ubuntu2.13 (cli) (built: Jun 28 2023 14:01:49) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.13, Copyright (c), by Zend Technologies

The last of the LAMP stack is the MariaDB database service:

sudo apt-get install mariadb-server -y

Start and enable the mariadb.service with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the mariadb.service

sudo systemctl status mariadb

You should receive the following output:

● mariadb.service - MariaDB 10.6.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-08-05 05:19:21 CDT; 15s ago
       Docs: man:mariadbd(8)
   Main PID: 75849 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 15 (limit: 4557)
     Memory: 61.3M
        CPU: 786ms
     CGroup: /system.slice/mariadb.service
             └─75849 /usr/sbin/mariadbd

Step 3. Create an Akaunting database and user

Next, we need to create an Akaunting database, the Akaunting user, and grant the permissions for that user to the database.

 CREATE USER 'akaunting'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
 GRANT ALL PRIVILEGES ON akaunting.* TO 'akaunting'@'localhost';

Step 4. Download and install Akaunting

Before we install Akaunting, we first need to download it in the default Apache document root:

cd /var/www/html

wget -O



Set the right permissions to files and folders.

chown -R www-data:www-data /var/www/html

cd /var/www/html

find . -type d -exec chmod 755 {} \;

find . -type f -exec chmod 644 {} \;

Step 5. Create Apache Virtual Host File

Go into the Apache directory and create a configuration file for the Akaunting.

cd /etc/apache2/sites-available/

touch akaunting.conf

Open the file, paste the following lines of code, save the file and close it.

<VirtualHost *:80>
DocumentRoot /var/www/html

<Directory /var/www/html/>
AllowOverride All

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined


Enable the Apache configuration for Akaunting and rewrite the module.

sudo a2enmod rewrite

sudo a2ensite akaunting.conf

Check the syntax:

apachectl -t

You should receive the following output:

root@vps:~# apachectl -t
Syntax OK

If the syntax is OK, restart the Apache service.

systemctl reload apache2

Once the Apache service is restarted, you can finish the Akaunting installation at

Step 6. Finish the Installation

On the first screen, choose your language and click on the Next button.

On the next screen, enter the database credentials you created in one of the previous steps:

Then create your company email and login credentials:

Once done, log in to the Akaunting dashboard.

Once logged in, you can click on Skip this step:

Add your currency and click on the Next button:

On the next window, click on the Skip this step, and you will be automatically redirected to the Akaunting Dashboard.

That was all. You successfully installed and configured Akaunting on Ubuntu 22.04 with the LAMP stack.

If you do not want to configure it on your own, you can sign up for one of our NVMe VPS plans and submit a support ticket. Our admins are available 24/7 and will start to work on your request immediately. Always trust our epic support.

If you liked this post on how to install Akaunting on Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below. Thanks.

Leave a Reply

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