How to Install Akaunting on Arch Linux

Akaunting is a free and open-source accounting software designed for small businesses and freelancers. It is ideal for managing invoicing, expenses, and taxes. In this tutorial, we will go through the steps to install Akaunting on Arch Linux.

Prerequisites

Before we begin, ensure that your Arch Linux system is up to date with the latest software package updates. You can achieve this by running the following command:

sudo pacman -Syu

Step 1: Install Dependencies

Akaunting is built with PHP and Laravel, so you need to install the following dependencies before installing Akaunting:

sudo pacman -S git base-devel mariadb php php-fpm php-gd php-intl php-imagick php-mcrypt php-pdo php-mysql php-apcu php-zip composer

Step 2: Install and Configure MariaDB

Akaunting requires a database to store its data, so we will install MariaDB:

sudo pacman -S mariadb

After successful installation, start the MariaDB service and enable it to start at boot time:

sudo systemctl start mariadb
sudo systemctl enable mariadb

Secure the MariaDB installation by running the following command:

sudo mysql_secure_installation

Step 3: Create Akaunting Database and User

Log in to the MariaDB shell as a root user:

sudo mysql -u root -p

Create a new database for Akaunting:

CREATE DATABASE akaunting;

Create a new MariaDB user for Akaunting and grant permissions to access the database:

GRANT ALL ON akaunting.* TO 'akauntinguser'@'localhost' IDENTIFIED BY 'yourpassword';

Flush the privileges and exit from MariaDB shell:

FLUSH PRIVILEGES;
EXIT;

Step 4: Download Akaunting Source Code

Go to the Akaunting website and download the latest stable release:

wget https://github.com/akaunting/akaunting/archive/stable.tar.gz

Extract the downloaded archive:

tar -xzf stable.tar.gz

Move the extracted directory to the web root directory:

sudo mv akaunting-stable /srv/http/akaunting

Step 5: Install Akaunting

Change the working directory to the Akaunting installation directory:

cd /srv/http/akaunting

Install Akaunting dependencies using Composer:

composer install --no-dev --optimize-autoloader

Copy the environment configuration file:

cp .env.example .env

Set the database configuration options in the .env file:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=akaunting
DB_USERNAME=akauntinguser
DB_PASSWORD=yourpassword

Generate a unique key for Akaunting:

php artisan key:generate

Run the Akaunting database migrations:

php artisan migrate --seed

Set the file and folder permissions:

sudo chown -R http:http /srv/http/akaunting
sudo chmod -R 755 /srv/http/akaunting
sudo chmod -R 777 /srv/http/akaunting/storage

Start the PHP-FPM and Nginx services and enable them to start at boot time:

sudo systemctl start php-fpm
sudo systemctl enable php-fpm
sudo systemctl start nginx
sudo systemctl enable nginx

Step 6: Access Akaunting

Open your web browser and navigate to http://localhost/akaunting. You should see the Akaunting login page. Use the default username admin and password akaunting to log in. You can change the password by logging in and going to Settings -> User Management.

Congratulations! You have successfully installed Akaunting on Arch Linux.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!