How to Install Akaunting Self-Hosted Accounting Software on Ubuntu 22.04

Introduction

Before we begin talking about how to install Akaunting Self-Hosted Accounting Software on Ubuntu 22.04, let's briefly understand – What is Akaunting?

Akaunting is a free and open-source accounting software designed for small businesses and freelancers. It offers essential financial management tools to track expenses, revenue, and generate invoices.

With Akaunting, you can easily manage your finances, simplify bookkeeping tasks, and gain insights into your business performance. This user-friendly platform is cloud-based, ensuring accessibility from anywhere. Give Akaunting a try for efficient financial management that fits your budget and needs.

In this tutorial, you will install Akaunting Self-Hosted Accounting Software on Ubuntu 22.04. We will also address a few FAQs on how to install Akaunting Self-Hosted Accounting Software on Ubuntu 22.04.

Advantages of Akaunting

  1. User-Friendly: Akaunting boasts an intuitive interface for easy navigation and use.
  2. Cost-Effective: Being free and open-source, Akaunting offers financial management solutions without hefty expenses.
  3. Cloud-Based: Access your financial data securely from anywhere.
  4. Invoicing: Generate professional invoices quickly to streamline payment processes.
  5. Reporting: Gain insights into your business performance through detailed financial reports.

Steps to Install Akaunting software on Ubuntu 22.04 LTS

1: Update Ubuntu 22.04

To install the available updates and to clear the APT package index cache, run the system update command.

sudo apt update && sudo apt upgrade

2. Install Apache server for Akaunting

A web server is required to operate PHP-based web apps like Akuanting. Thus, let's use the provided command to install the well-known Apache web server on Ubuntu.

sudo apt install apache2

3. Enable and Start Apache

The webserver can be enabled and started along with system boot by running the following commands on your server after the installation process is finished.

sudo systemctl enable --now apache2

4. Install the MariaDB server on Ubuntu 22.04

We require a MariaDB-provided database to store the financial data produced by the Akaunting software. But you can also use SQLite and PostgreSQL.

sudo apt install mariadb-server

4. Enable MySQL services

Similar to how Apache is set up, MySQL must also be enabled and started at boot level. This means that when our system reboots, the Apache and MySQL services ought to launch automatically.

sudo systemctl enable --now mysql

Following installation, protect your database by establishing a root password and limiting unauthorized access.

sudo mysql_secure_installation

The system will ask the following questions; sample responses are also provided below:

Enter current password for root (enter for none): Press ENTER
Set root password? [Y/n]: Y
New password: Set-your-new-password
Re-enter new password: Set-your-new-password
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

5. Akaunting database setup

Now, let's build the database that this open-source accounting program will need by running the following commands. It is the same regardless of the Linux OS.

Note: Feel free to substitute any other text you choose for the bold text. The database name is vegastackdb, the username is vegastack, and the password is password.

sudo mysql
CREATE DATABASE vegastackdb;
CREATE USER 'vegastack'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON vegastackdb.*TO'vegastack'@'localhost' WITH GRANT OPTION;
flush privileges;
exit;

6. Install PHP

PHP 8.0 or higher is the minimum PHP version that must be installed in order to use the open-source accounting program Akaunting.

Simply run the provided command to install PHP 8.x for Ubuntu 22.04.

sudo apt install php libapache2-mod-php php-bcmath php-common php-imap php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysql php-cli php-ldap php-zip php-curl -y

However, PHP 8.0 won't be available for Ubuntu 20.04 via the default system repository. Thus, in order to have the most recent version of PHP 8.0, we must add a PPA repository. To do this, run the following commands:

sudo apt install software-properties-common -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt install php-imagick php8.0-common php8.0-mysql php8.0-gd php8.0-bcmath php8.0-curl php8.0-zip php8.0-xml php8.0-mbstring php8.0-bz2 php8.0-intl -y

You can change PHP 8.0 to PHP 8.1 by substituting 8.1 in the command above.

Run:

sudo update-alternatives --config php

Choose PHP 8.0 as the system version to use by default.

7. Install Akaunting on Ubuntu 22.04

The most recent release file for the free Akaunting software will be downloaded in this step, and it will be extracted into the public web folder for future use.

wget -O Akaunting.zip https://akaunting.com/download.php?version=latest && sudo mkdir -p /var/www/akaunting/ && sudo apt install unzip && sudo unzip Akaunting.zip -d /var/www/akaunting/

Now, modify the cloned folder's permissions:

sudo chown -R www-data:www-data /var/www/akaunting/

Now grant complete read and write permission to the Apache user:

sudo chmod -R 755 /var/www/akaunting/

8. Configure the Apache site configuration file for Akaunting

Here, we'll create an Apache site configuration file for Akaunting, which will instruct it on what to do next and where to find the folder containing the files to execute.

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

Add the next lines, spaced and broken exactly as they appear here:

Take the example text and replace it with your domain's values.

<VirtualHost *:80>
ServerAdmin localhost
DocumentRoot /var/www/akaunting/
ServerName example.com
ServerAlias www.example.com

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

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

</VirtualHost>

Press the Ctrl+X keys, type Y, and press the Enter key to save and close the nano editor.

Activate the modules for rewriting and configuration.

sudo a2ensite akaunting.conf
sudo a2enmod rewrite
sudo a2dissite 000-default.conf

To ensure the changes take effect, restart Apache.

sudo systemctl restart apache2

9: Setup Akaunting Dashboard

All set now, if you want to install it on cloud or virtual private server hosting, open your browser and navigate to the server IP address or domain name.

Here, we are using the local IP address of the server on which we are installing Akaunting for a demo.

http://server-ip-address

or

http://domain-name.com

When you point the domain or IP to the server, an Akaunting setup page will open. First, choose the language you wish to install it in; English will be the default.

Add the MySQL database details that we created in this post.

Add the company's information, the admin email address, and the password that will be used to access this free accounting program from any location.

Add your company's tax information. Click the link, register for an Akaunting account, and copy the API to paste in to obtain the API key.

At last, the software's Dashboard will appear before you. Proceed with your financial computations now, as well as bill creation, bill addition, cash flow management, expense tracking, and more.

Visit the official documentation page to learn more about how this open-source accounting software is configured.

FAQs to Install Akaunting Self-Hosted Accounting Software on Ubuntu 22.04

What are the system requirements for installing Akaunting?

The minimum system requirements for installing Akaunting on Ubuntu 22.04 are PHP 7.4, MySQL, and Apache/Nginx.

Is Akaunting self-hosted software free to download and use?

Yes, Akaunting is an open-source accounting software that is free to download and use.

Does Akaunting provide regular updates for the software?

Yes, Akaunting provides regular updates to ensure the software's security, stability, and features.

How do I access the Akaunting web interface after installation?

You can access the Akaunting web interface by navigating to your server's IP or domain in a web browser.

Can I customize the features and modules in Akaunting?

Yes, Akaunting allows customization of features and modules to suit your specific accounting needs.

How secure is my data when using Akaunting self-hosted software?

Akaunting prioritizes data security through encryption and secure server configurations for safeguarding your financial information.

Does Akaunting offer multi-currency support on Ubuntu 22.04?

Yes, Akaunting provides multi-currency support, allowing you to manage transactions in various currencies with ease.

Conclusion

We hope this tutorial helped you understand how to install Akaunting Self-Hosted Accounting Software on Ubuntu 22.04.

If you have any queries, please leave a comment below, and we’ll be happy to respond to them for sure.