How To Install Akaunting on Fedora 41
Akaunting stands as a powerful, free, and open-source accounting solution that helps businesses manage their finances efficiently. For those running Fedora 41, installing Akaunting provides a robust financial management system on a stable, secure Linux foundation. This comprehensive guide walks you through every step of installing Akaunting on Fedora 41, from preparing your system to post-installation configuration and maintenance.
Fedora 41 offers an excellent platform for running business applications due to its cutting-edge features, robust security measures, and excellent performance characteristics. The combination of Akaunting’s financial management capabilities with Fedora’s stability creates an ideal environment for managing your business finances without recurring subscription costs or proprietary software limitations.
Understanding Prerequisites
Before diving into the installation process, you should ensure your system meets all requirements for a smooth Akaunting deployment on Fedora 41.
Hardware Requirements
Akaunting doesn’t demand excessive resources, but for optimal performance, your system should have:
- A processor with at least 2 cores (4 cores recommended for business use)
- Minimum 2GB RAM (4GB or more recommended for better performance)
- At least 10GB free disk space for the operating system, web server, database, and Akaunting files
- A stable internet connection for installation and updates
Software Requirements
Akaunting relies on the LAMP stack (Linux, Apache, MySQL/MariaDB, PHP) components:
- Apache 2.4 or higher web server
- MySQL 5.7+ or MariaDB 10.2+ database server
- PHP 8.0 or higher (with several extensions)
- Composer (PHP dependency manager)
Essential PHP Extensions
Akaunting requires several PHP extensions:
- BCMath
- Ctype
- JSON
- Mbstring
- OpenSSL
- PDO
- Tokenizer
- XML
- Curl
- GD
- Zip
Linux Command Knowledge
While this guide provides explicit commands, basic familiarity with Linux terminal operations, file manipulation, and service management will be beneficial. If you’re new to Linux administration, keep additional Fedora documentation handy.
Backup Recommendations
If you’re installing on an existing Fedora system that contains important data, create a backup before proceeding. For virtual environments, consider taking a snapshot of your machine state to allow easy restoration if needed.
Preparing Your Fedora 41 Environment
A properly configured environment forms the foundation for a successful Akaunting installation. Let’s prepare your Fedora 41 system with all required components.
System Updates
Start by ensuring your system is fully updated:
sudo dnf update -y
This command updates all installed packages to their latest versions, ensuring compatibility and security.
Installing Apache Web Server
Install the Apache web server, which will host the Akaunting application:
sudo dnf install httpd -y
After installation, start the service and enable it to launch automatically at system boot:
sudo systemctl start httpd
sudo systemctl enable httpd
Verify Apache is running correctly:
sudo systemctl status httpd
You should see “active (running)” in the output.
Installing MariaDB Database Server
Akaunting requires a database to store financial data. Install MariaDB, a robust MySQL-compatible database server:
sudo dnf install mariadb mariadb-server -y
Start and enable the MariaDB service:
sudo systemctl start mariadb
sudo systemctl enable mariadb
Secure your MariaDB installation by running the security script:
sudo mysql_secure_installation
During this process:
- Set a strong root password
- Remove anonymous users
- Disallow root login remotely
- Remove the test database
- Reload privilege tables
Installing PHP and Required Extensions
Fedora 41 comes with PHP 8.2 by default, which works well with Akaunting. Install PHP and the required extensions:
sudo dnf install php php-cli php-fpm php-json php-common php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath php-json -y
After installation, restart Apache to recognize the PHP installation:
sudo systemctl restart httpd
Configuring Firewall Settings
Configure the firewall to allow web traffic:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
Setting File Permissions
Create the directory where Akaunting will be installed:
sudo mkdir -p /var/www/html/akaunting
Set appropriate ownership and permissions:
sudo chown -R apache:apache /var/www/html/akaunting
sudo chmod -R 755 /var/www/html/akaunting
Database Setup for Akaunting
A dedicated database improves security and makes maintenance easier. Let’s create one specifically for Akaunting.
Creating the Database and User
Log in to the MariaDB console:
sudo mysql -u root -p
After entering your password, create a database and user for Akaunting:
CREATE DATABASE akaunting;
CREATE USER 'akaunting_user'@'localhost' IDENTIFIED BY 'your_strong_password';
GRANT ALL PRIVILEGES ON akaunting.* TO 'akaunting_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Remember to replace ‘your_strong_password’ with an actual strong password. Store this password securely as you’ll need it during the Akaunting installation.
Verifying Database Connection
Test that your new user can connect to the database:
mysql -u akaunting_user -p -D akaunting
If you can successfully connect, your database is ready for Akaunting. Type exit
to leave the MySQL console.
Database Configuration Best Practices
For improved security:
- Use a unique username not easily guessed
- Implement a complex password with mixed case, numbers, and special characters
- Limit database user privileges to only what’s necessary for Akaunting
- Regularly audit database users and permissions
Downloading and Extracting Akaunting
Now that your environment is ready, it’s time to download and install Akaunting.
Getting the Latest Version
Download the latest version of Akaunting directly from the official website:
cd /tmp
wget https://akaunting.com/download.php?version=latest -O akaunting.zip
Verifying the Download
Verify the integrity of the downloaded file:
sha256sum akaunting.zip
You can compare this hash with the one provided on the official download page (if available).
Extracting the Package
Install unzip if not already available:
sudo dnf install unzip -y
Extract the Akaunting files:
unzip akaunting.zip -d /tmp/akaunting
Moving Files to Web Directory
Move the extracted files to your web server directory:
sudo cp -R /tmp/akaunting/* /var/www/html/akaunting/
Setting Proper Permissions
Update the ownership and permissions:
sudo chown -R apache:apache /var/www/html/akaunting
sudo find /var/www/html/akaunting -type d -exec chmod 755 {} \;
sudo find /var/www/html/akaunting -type f -exec chmod 644 {} \;
sudo chmod -R 775 /var/www/html/akaunting/storage
sudo chmod -R 775 /var/www/html/akaunting/bootstrap/cache
This ensures Apache can read files and write to the specific directories that need write access.
Web Server Configuration
Proper Apache configuration ensures secure and efficient access to your Akaunting installation.
Creating a Virtual Host
Create a new virtual host configuration file:
sudo nano /etc/httpd/conf.d/akaunting.conf
Add the following configuration:
<VirtualHost *:80>
ServerAdmin webmaster@yourdomain.com
DocumentRoot /var/www/html/akaunting
ServerName accounting.yourdomain.com
ServerAlias www.accounting.yourdomain.com
<Directory /var/www/html/akaunting>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/httpd/akaunting_error.log
CustomLog /var/log/httpd/akaunting_access.log combined
</VirtualHost>
Replace accounting.yourdomain.com
with your actual domain name or use your server’s IP address if you don’t have a domain.
Enabling the Configuration
Check the configuration syntax:
sudo apachectl configtest
If the test shows “Syntax OK,” restart Apache:
sudo systemctl restart httpd
Setting Up SSL for Secure Access
For production environments, secure your Akaunting installation with SSL:
sudo dnf install mod_ssl openssl -y
For a free SSL certificate, install Certbot:
sudo dnf install certbot python3-certbot-apache -y
Obtain and configure an SSL certificate:
sudo certbot --apache -d accounting.yourdomain.com
Follow the prompts to complete the SSL setup.
Configuring SELinux Contexts
If SELinux is enabled on your system (default for Fedora), set the proper contexts:
sudo semanage fcontext -a -t httpd_sys_content_t "/var/www/html/akaunting(/.*)?"
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/akaunting/storage(/.*)?"
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/akaunting/bootstrap/cache(/.*)?"
sudo restorecon -Rv /var/www/html/akaunting
Running the Akaunting Web Installer
With all components in place, you can now run the web-based installation wizard to complete the Akaunting setup.
Accessing the Installer
Open your web browser and navigate to your server using either:
https://your_server_ip/
https://accounting.yourdomain.com/
(if you configured a domain)
You should see the Akaunting installation wizard.
Installation Wizard Step-by-Step
- Language Selection: Choose your preferred language for the installation process.
- Requirements Check: The installer will check if your server meets all requirements. Address any issues if shown in red.
- Database Connection: Enter the database details you created earlier:
- Database Engine: MySQL/MariaDB
- Host: localhost
- Username: akaunting_user
- Password: your_strong_password
- Database Name: akaunting
- Company Information: Enter your company details:
- Company Name
- Company Email
- Company Tax Number (optional)
- Company Address (optional)
- Company Phone (optional)
- Administrator Account: Create the admin user:
- Admin Email
- Admin Password (use a strong, unique password)
- Finalize Installation: Click “Install” to complete the process.
The installer will configure the database tables and initial settings. This process typically takes less than a minute.
Verifying the Installation
After the installation completes, you’ll be redirected to the login page. Use the admin credentials you created to log in and verify everything is working correctly.
Post-Installation Configuration
After installing Akaunting, several additional configurations can enhance security and functionality.
Initial Security Hardening
Remove the installation files:
sudo rm -rf /var/www/html/akaunting/install.php
Set a proper APP_KEY in the .env file if not automatically generated:
cd /var/www/html/akaunting
sudo php artisan key:generate
Setting Up Cron Jobs
Akaunting requires a cron job for scheduled tasks. Edit the crontab:
sudo crontab -e
Add the following line:
* * * * * php /var/www/html/akaunting/artisan schedule:run >> /dev/null 2>&1
This runs the scheduler every minute, which manages all scheduled tasks in Akaunting.
Configuring Email Notifications
Configure email settings in the Akaunting admin panel:
- Go to Settings > General Settings > Email
- Configure SMTP details for your mail server
- Send a test email to verify the configuration
Testing the Installation
Perform these basic tests:
- Create a test customer
- Generate a sample invoice
- Test the payment workflow
- Check that reports generate correctly
- Verify that the dashboard displays accurate information
Method 2: Command Line Installation (Alternative)
For advanced users who prefer command-line methods, Akaunting can also be installed using Git and Composer.
Using Git to Clone the Repository
Install Git if not already available:
sudo dnf install git -y
Clone the Akaunting repository:
cd /var/www/html
sudo git clone https://github.com/akaunting/akaunting.git
Installing Composer
Install Composer for PHP dependency management:
sudo dnf install composer -y
Installing Dependencies
Install the required PHP dependencies:
cd /var/www/html/akaunting
sudo composer install --no-dev
Manual Configuration
Create and configure the environment file:
sudo cp .env.example .env
sudo nano .env
Update the following variables:
- APP_URL: Your Akaunting URL
- DB_HOST: Database host (usually localhost)
- DB_DATABASE: Database name (akaunting)
- DB_USERNAME: Database user (akaunting_user)
- DB_PASSWORD: Database password
Generate the application key:
sudo php artisan key:generate
Run the database migrations:
sudo php artisan migrate --seed
Setting Proper Permissions
Update directory permissions:
sudo chown -R apache:apache /var/www/html/akaunting
sudo find /var/www/html/akaunting -type d -exec chmod 755 {} \;
sudo find /var/www/html/akaunting -type f -exec chmod 644 {} \;
sudo chmod -R 775 /var/www/html/akaunting/storage
sudo chmod -R 775 /var/www/html/akaunting/bootstrap/cache
Command Line vs. Web Installer Comparison
The command line approach offers:
- Better automation potential for scripted deployments
- More granular control over the installation process
- No need to remove installation files afterward
However, it requires:
- More technical knowledge
- Manual configuration of settings that the web installer handles automatically
- Potential for more troubleshooting if steps are missed
Troubleshooting Common Installation Issues
Even with careful preparation, issues can arise during installation. Here are solutions for common problems.
Permission and Ownership Problems
If you encounter “Permission denied” errors:
sudo chown -R apache:apache /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
Database Connection Errors
If Akaunting can’t connect to the database:
- Verify database credentials in the .env file
- Confirm the database user has proper permissions
- Check that the MariaDB service is running:
sudo systemctl status mariadb
- Test direct database connection:
mysql -u akaunting_user -p -D akaunting
PHP Extension Requirements
If the installer shows missing PHP extensions:
sudo dnf install php-{extension_name} -y
sudo systemctl restart httpd
Replace {extension_name} with the specific missing extension.
SELinux-Related Problems
If SELinux blocks Akaunting operations:
# Check for SELinux denials
sudo grep "denied" /var/log/audit/audit.log | grep httpd
# Set proper contexts
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/akaunting/storage(/.*)?"
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/akaunting/bootstrap/cache(/.*)?"
sudo restorecon -Rv /var/www/html/akaunting
Alternatively, you can temporarily set SELinux to permissive mode for testing:
sudo setenforce 0
Remember to set it back after testing:
sudo setenforce 1
Checking Log Files
When troubleshooting, check these log files:
- Apache error logs:
/var/log/httpd/error_log
- Akaunting logs:
/var/www/html/akaunting/storage/logs/laravel.log
- PHP errors:
/var/log/php-fpm/www-error.log
(if using PHP-FPM) - SELinux audit log:
/var/log/audit/audit.log
Updating Akaunting on Fedora 41
Keeping Akaunting updated is crucial for security and functionality.
Backup Before Updates
Always create a backup before updating:
# Backup the database
mysqldump -u akaunting_user -p akaunting > akaunting_backup_$(date +%Y%m%d).sql
# Backup application files
sudo cp -R /var/www/html/akaunting /var/www/html/akaunting_backup_$(date +%Y%m%d)
Manual Update Process
- Download the latest version from the official website
- Extract it to a temporary location
- Replace the existing files (except config files)
- Update the database schema:
cd /var/www/html/akaunting sudo php artisan migrate
- Clear the application cache:
sudo php artisan cache:clear sudo php artisan view:clear sudo php artisan route:clear sudo php artisan config:clear
Using the Built-in Updater
For minor updates, you can use Akaunting’s built-in updater:
- Log in to your Akaunting admin panel
- Go to Settings > Updates
- The system will check for available updates
- Follow the on-screen instructions to update
Performance Optimization
Optimize your Akaunting installation for better performance.
PHP Optimization
Edit your PHP configuration:
sudo nano /etc/php.ini
Adjust these settings:
memory_limit = 256M
max_execution_time = 300
upload_max_filesize = 20M
post_max_size = 20M
opcache.enable=1
opcache.memory_consumption=128
Database Tuning
For better MariaDB performance:
sudo nano /etc/my.cnf.d/server.cnf
Add under [mysqld] section:
innodb_buffer_pool_size = 256M
query_cache_size = 32M
query_cache_limit = 1M
Restart MariaDB:
sudo systemctl restart mariadb
Web Server Caching
Enable Apache caching:
sudo dnf install mod_expires -y
Edit your virtual host configuration:
sudo nano /etc/httpd/conf.d/akaunting.conf
Add:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType text/html "access plus 1 week"
</IfModule>
Restart Apache:
sudo systemctl restart httpd
Congratulations! You have successfully installed Akaunting. Thanks for using this tutorial for installing Akaunting on Fedora 41 system. For additional help or useful information, we recommend you check the Akaunting website.