Akaunting is a free and open source accounting software that helps businesses manage their finances. In this tutorial, we will guide you on how to install Akaunting on NixOS.
Before installing anything, it is important to update your NixOS server to prevent compatibility issues.
sudo nix-channel --update
sudo nixos-rebuild switch
Akaunting requires PHP and its extensions to function. We will install PHP and the necessary extensions required by Akaunting using the following command.
sudo nix-env -iA nixpkgs.php{,Extensions.php-mysql,Extensions.php-mysqli,Extensions.php-curl}
Create a new directory in the /var/www/ folder and navigate to the folder.
sudo mkdir /var/www/akaunting
cd /var/www/akaunting
Download Akaunting latest version from the official website.
sudo curl -LJO https://akaunting.com/download/latest
Extract the zip file.
sudo unzip akaunting-latest.zip
Change ownership and permissions of the Akaunting installation folder.
sudo chown -R www-data:www-data /var/www/akaunting
sudo chmod -R 755 /var/www/akaunting
Create a new virtual host configuration file for Akaunting.
sudo vim /etc/nginx/sites-available/akaunting.conf
Add the following configuration to the file:
server {
listen 80;
server_name your_domain.com;
root /var/www/akaunting/public;
index index.php;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
}
}
Replace your_domain.com with your actual domain name.
Save and close the file.
Create a symbolic link to enable the virtual host configuration file.
sudo ln -s /etc/nginx/sites-available/akaunting.conf /etc/nginx/sites-enabled/
Test the NGINX configuration for syntax errors.
sudo nginx -t
If no errors are displayed, restart the NGINX server.
sudo systemctl restart nginx
Open your web browser and navigate to http://your_domain.com. Akaunting setup page will appear, click on "Next" to continue.
Follow the on-screen instructions to configure your Akaunting installation.
Congratulations! You have successfully installed Akaunting on NixOS.
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!