Akaunting is a free and open source accounting software to manage your invoices, quotes, and finances. It is specially designed for small businesses and freelancers. It is based on the LAMP and built with modern technologies such as Laravel, Bootstrap, jQuery and RESTful API. It is simple, easy to use and powerful tool that allows you to see your financials online from a central location.

In this tutorial, we will learn how to install Akaunting software on Ubuntu 18.04 server.


  • A server running Ubuntu 18.04.
  • A non-root user with sudo privileges.

Getting Started

Before starting, you will need to update your system with the latest version. You can do this by running the following command:

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

Install LAMP Server

First, you will need to install Apache, MariaDB, PHP, and other required modules to your server. You can install all of them by running the following command:

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

Once all the packages are installed, you will need to edit php.ini file and make some changes. you can do this with the following command:

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

Make the following changes:

file_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 30M
post_max_size = 40M
max_execution_time = 60
zend.assertions = 0
display_errors = Off
max_input_vars = 1500
date.timezone = Asia/Kolkata

Save and close the file, when you are finished. Then, start Apache and MariaDB service and enable them to start on boot time with the following command:

sudo systemctl start apache2
sudo systemctl enable apache2
sudo systemctl start mariadb
sudo systemctl enable mariadb

Once you have finished, you can proceed to the next step.

Configure the Database

By default, MariaDB is not secured. So, you will need to secure it. You can do this by running the mysql_secure_installation script:

sudo mysql_secure_installation

This script will change your current root password, remove anonymous users, disallow root login remotely as shown below:

    Enter current password for root (enter for none):
    Set root password? [Y/n]: N
    Remove anonymous users? [Y/n]: Y
    Disallow root login remotely? [Y/n]: Y
    Remove test database and access to it? [Y/n]:  Y
    Reload privilege tables now? [Y/n]:  Y

Once the MariaDB is secured, log in to MariaDB shell:

mysql -u root -p

Enter your root password when prompt. Then, create a database and user for Akaunting:

MariaDB [(none)]> CREATE DATABASE akauntingdb;
MariaDB [(none)]> CREATE USER 'akaunting'@'localhost' IDENTIFIED BY 'mypassword';

Replace the word 'mypassword' in the above SQL statement with a secure password of your choice. Next, grant all privileges to the Akaunting with the following command:

MariaDB [(none)]> GRANT ALL ON akauntingdb.* TO 'akaunting'@'localhost' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;

And again, replace 'mypassword' with the same password that you used above. Next, flush the privileges and exit from the MariaDB shell:

MariaDB [(none)]> EXIT;

Install Akaunting

First, you will need to download the latest version of the Akaunting from their official website. You can do this with the following command:

curl -O -J -L https://akaunting.com/download.php?version=latest

Once the download is completed, extract the downloaded file in the Apache web root directory with the following command:

sudo mkdir -p /var/www/html/akaunting
sudo unzip Akaunting_*.zip -d /var/www/html/akaunting/

Next, give proper permissions to the akaunting directory:

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

Once you have finished, you can proceed to the next step.

Configure Apache for Akaunting

Next, you will need to create an Apache virtual host file for Akaunting. You create it with the following command:

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

Add the following lines:

<VirtualHost *:80>
     ServerAdmin admin@example.com
     DocumentRoot /var/www/html/akaunting
     ServerName example.com
     DirectoryIndex index.html index.php
     <Directory /var/www/html/akaunting/>
          Options +FollowSymlinks
          AllowOverride All
          Require all granted

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


Replace 'example.com' with your own domain name in the above vhost file. Save and close the file, when you are finished. Then, enable Apache virtual host with the following command:

sudo a2ensite akaunting

Next, enable the Apache rewrite module and restart Apache service with the following command:

sudo a2enmod rewrite
sudo systemctl restart apache2

Access Akaunting

Now, open your web browser and type the URL http://example.com. You will be redirected to the  page.

Here, Select your language and click on the Next button. Now, provide your database details like, database name, database username, and password. Then, click on the Next button. 

Once done, provide your company name, company email address, admin email and password, then click on the Next button. Now, provide your login credentials and click on the Login button. Later, enter your details and click on the Save button. 

Now, Add currencies or click on the Skip button. Then, Add taxes or click on the Skip button. And finally, click on the Go to Dashboard button. 

Congratulations! you have successfully installed Akaunting on Ubuntu 18.04 server. You can now easily manage your invoices, quote, and finances from anywhere. Feel free to ask me if you have any questions.


¿Fue útil la respuesta? 0 Los Usuarios han Encontrado Esto Útil (0 Votos)