How to Install Akaunting Accounting Software on Ubuntu 20.04?

Akaunting is a free, open-source accounting software that can be used to manage your finances, create invoices, track expenses, and generate financial reports. It is a great alternative to expensive commercial accounting software and is suitable for small to medium-sized businesses. In this article, we will guide you through the steps to install Akaunting on Ubuntu 20.04.

Prerequisites

Before starting the installation, ensure you have:

  • Ubuntu 20.04 server with root or sudo access

  • At least 1GB RAM and 10GB free disk space

  • A domain name (optional but recommended for production)

Step 1: Update Your Ubuntu System

Before installing any software, update your Ubuntu system to ensure you have the latest security updates and bug fixes:

sudo apt update && sudo apt upgrade -y

Step 2: Install Required Dependencies

Install the necessary components including Apache web server, MariaDB database server, and PHP modules:

sudo apt install apache2 mariadb-server php php-common php-mysql php-gd php-cli php-mbstring php-intl php-xml php-zip unzip wget curl -y

Enable and start the services:

sudo systemctl enable apache2 mariadb
sudo systemctl start apache2 mariadb

Step 3: Secure MariaDB Installation

Run the MySQL security script to set a root password and remove insecure defaults:

sudo mysql_secure_installation

Follow the prompts to set a strong root password and answer 'Y' to all security questions.

Step 4: Create Database and User

Open the MariaDB shell and create a database for Akaunting:

sudo mysql -u root -p

Execute the following SQL commands:

CREATE DATABASE akaunting_db;
CREATE USER 'akaunting_user'@'localhost' IDENTIFIED BY 'your_strong_password';
GRANT ALL PRIVILEGES ON akaunting_db.* TO 'akaunting_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Note: Replace your_strong_password with a secure password of your choice.

Step 5: Download and Install Akaunting

Download the latest version of Akaunting:

cd /tmp
wget https://github.com/akaunting/akaunting/releases/latest/download/Akaunting_3.0.x-Stable.zip

Extract and move the files to the web root:

sudo unzip Akaunting_3.0.x-Stable.zip -d /var/www/html/
sudo mv /var/www/html/akaunting-* /var/www/html/akaunting

Set proper permissions:

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

Step 6: Configure Apache Virtual Host

Create a new Apache virtual host configuration:

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

Add the following configuration:

<VirtualHost *:80>
    ServerName your-domain.com
    DocumentRoot /var/www/html/akaunting/public
    
    <Directory /var/www/html/akaunting/public>
        Options Indexes FollowSymLinks
        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 required Apache modules:

sudo a2ensite akaunting.conf
sudo a2enmod rewrite
sudo systemctl restart apache2

Step 7: Complete Web-Based Installation

Open your web browser and navigate to http://your-domain.com or http://your-server-ip. You will see the Akaunting installation wizard.

Follow these steps in the web installer:

  • Requirements Check: Ensure all requirements are met

  • Database Setup: Enter your database credentials from Step 4

  • Company Details: Enter your company information

  • Admin Account: Create your administrator account

Step 8: Enable HTTPS (Optional but Recommended)

For production environments, secure your installation with SSL/TLS:

sudo apt install certbot python3-certbot-apache -y
sudo certbot --apache -d your-domain.com

Follow the prompts to obtain and install a free Let's Encrypt SSL certificate.

Step 9: Configure Cron Jobs

Set up cron jobs for recurring tasks like sending invoices and generating reports:

sudo crontab -e

Add the following line:

* * * * * php /var/www/html/akaunting/artisan schedule:run >> /dev/null 2>&1

Performance Optimization

For better performance, consider these optimizations:

  • PHP Configuration: Increase memory_limit to 256M in /etc/php/7.4/apache2/php.ini

  • Database Optimization: Configure MariaDB for your workload

  • Caching: Enable APCu or Redis for better performance

Backup Strategy

Implement regular backups to protect your financial data:

# Database backup
mysqldump -u root -p akaunting_db > akaunting_backup_$(date +%Y%m%d).sql

# File backup
tar -czf akaunting_files_$(date +%Y%m%d).tar.gz /var/www/html/akaunting

Troubleshooting Common Issues

Issue Solution
Permission errors Check file ownership and permissions for storage directories
Database connection failed Verify database credentials and MariaDB service status
500 Internal Server Error Check Apache error logs and PHP error reporting
Module not found Ensure all required PHP extensions are installed

Conclusion

Akaunting provides a powerful, open-source accounting solution suitable for small to medium-sized businesses. By following this installation guide, you now have a fully functional accounting system running on Ubuntu 20.04. Remember to keep your installation secure with regular updates, proper backups, and SSL encryption for production use.

Updated on: 2026-03-17T09:01:38+05:30

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements