
Akaunting is an open-source web-based accounting software that offers a range of business management features such as invoicing, financial reporting, expense management, and payment tracking. You can deploy Akaunting as an alternative to applications such as QuickBooks, WaveApps, and FreshBooks, with self-hosting features that grant you full control over your accounting information.
This guide explains how to deploy Akaunting on a Vultr Cloud Server and set up the application to securely perform accounting tasks using a graphical web interface. In addition, you will integrate a Vultr Managed Database for MySQL to improve the Akaunting application server reliability and availability for production use.
Before you begin:
2 GB RAM to host Akaunting.Akaunting uses a MySQL, PostgreSQL, or SQLite database to store data. In a production environment, use an external database server such as a Vultr Managed Database for MySQL to ensure improved uptime and high availability by offloading most database functionalities from the Akaunting server to the database server. Follow the steps below to create a new MySQL database to use with your Akaunting application.
Log in to your Vultr Managed Database for MySQL cluster. Replace dbhost.vultrdb.com, 16751 and vultradmin with your actual database details.
Enter your Vultr Managed Database for MySQL administrator password to access the database console.
Create a new Akaunting database akauntingdb.
Switch to the database.
Create a new MySQL user akauntingadmin with a strong password.
Grant the user full privileges to the Akaunting database.
Flush the MySQL privileges table to apply the new permission changes.
Exit the MySQL console.
Akaunting uses your existing web server configuration to correctly run and serve the application files on your domain name. Follow the steps below to install all required PHP modules, verify your web server package, and download the latest Akaunting release package to run on your server.
Install all required PHP extensions to use with Akaunting.
View the installed PHP version and verify the version number to use with your PHP-FPM configurations.
Output:
Based on the above output, PHP 8.1 is the available version on the server. You can use the version number to access PHP-FPM and verify the service status using the following command.
View the Nginx web server status and verify that it's up and running.
Output:
Navigate to the default web root directory /var/www/html/.
Create a new directory to store the Akaunting web application files. For example, akaunting.example.com.
Switch to the directory.
Download the latest Akaunting release file and save it as akaunting.zip.
The above wget command downloads the latest Akaunting version from the official project website to your server as a new archive file akaunting.zip in your working directory.
Extract files from the Akaunting release file using the Unzip utility.
If you receive the following error:
Install the Zip and Unzip archive utilities.
List the directory files and verify that new Akaunting files are available including a nginx.example.com.conf template file.
Output:
Delete the original Akaunting archive file to free your server space.
Switch to the parent /var/www/html/ directory.
Grant the Nginx web server user www-data full permissions to all files in the Akaunting web root directory.
Akaunting supports the Nginx and Apache web server applications to deliver all dynamic files on the server. Follow the steps below to configure the Nginx web server to enable access to the Akaunting application interface using your domain akaunting.example.com.
Navigate to the Nginx virtual host configurations directory /etc/nginx/sites-available.
Create a new Akaunting configuration file such as akaunting.conf.
Open the file using your preferred text editor such as Vim.
Add the following configurations to the file. Replace akaunting.example.com with your domain.
server { listen 80; server_name akaunting.example.com; root /var/www/html/akaunting.example.com;
Activate the Akaunting virtual host configuration by linking the configuration to the sites-enabled directory.
Test the Nginx configuration changes to verify any syntax errors.
Output:
Restart the Nginx web server to apply all configuration changes.
The Akaunting virtual host configuration for Nginx includes security options that block access to specific files and requests on the server. To secure the server, set up the default UFW firewall application to allow incoming connections to the Akaunting application. Then, generate trusted SSL certificates using a CA (Certificate Authority) such as Let’s Encrypt to secure your domain with encrypted HTTPS connections.
Verify that the UFW firewall is active on the server.
If the UFW application is inactive, allow connections to the default SSH port 22 and activate the firewall using the following command.
Allow connections to the server HTTP port 80.
Allow connections to the HTTPS port 443.
Restart UFW to apply the new firewall changes.
Install the Certbot Let’s Encrypt client application for Nginx.
Request for a new SSL certificate using your Akaunting domain. Replace akaunting.example.com with your domain and akaunting@example.com with your email address to bing with the SSL certificate request.
Your output should look like the one below when successful.
Test the Cerbot SSL certificate automatic renewal process.
Output:
Access your Akaunting application domain in a web browser such as Google Chrome.
Verify that the Akaunting setup interface displays in your web browser.
Select your default Akaunting application language, for example, English (GB) and press Next to start the configuration process.
Enter your Vultr Managed Database for MySQL host URL in the Hostname field.
Enter the MySQL user you created earlier in the Username field.
Enter the associated MySQL user password in the Password field.
Enter the Akaunting database name you created earlier in the Database field.
Click Next to test your Akaunting database connection.
Enter your business name in the Company Name field to set up your main Akaunting application information.
Enter your business email in the Company Email field.
Enter your new Akaunting administrative user email in the Admin Email field and a strong password in the Admin Password field.
Click Next to save your Akaunting configuration changes.
Enter your administrator email and account password, then click login to access the Akaunting setup page.
Enter your Akaunting account API key in the API Key field or click the Get your API Key prompt to generate a new key.
Fill in your company tax number, and choose a financial year start date to use with Akaunting.
Enter your company address, select the country of operation, and click the Logo field to upload your company logo to use with your Akaunting-generated documents.
Click Save to apply the application changes and set your default currencies to use with Akaunting documents.
Keep US Dollar selected or click New Currency to set up additional values.
Click Next to save your accounting currency changes.
Click Create your first Invoice to set up a sample Akaunting invoice.
Set up your Invoice details with a title in the Title field, upload a logo, and enter an optional invoice subheading.
Click Add a Customer in the billing section and select New Customer from the list of options to create a new customer profile.
Enter the new customer details in the pop-up dialog and click Save to add your first client.
Enter the additional invoice details including the date, invoice, and order numbers. Then click Add an Item to add your invoice values.
Click Save at the bottom of the invoice page to preview your Akaunting invoice.
Click the options symbol in the top right corner next to Edit to download the invoice in PDF format, print, customize, or send the document in a new email.
Navigate to Settings on the left navigation menu and click Email Service to enable your SMTP server details to use with email communications on the server. All generated invoices and additional items are sent over email when you integrate an active SMTP server with your Akaunting application.
You have set up your Akaunting application information and created an example invoice document. For every invoice or company tracking document you create, you can share it with multiple users using links or email messages depending on your SMTP account settings.
The Akaunting application may display errors or fail to run on your server after installation due to several issues. Follow the troubleshooting steps below to fix the following common installation and application errors to enable Akaunting on your server.
A connection time-out error is a result of your web server or firewall configurations. Follow the steps below to verify the error source.
View the firewall table and verify that connections to the HTTPS port 443 are allowed to the server.
View the Nginx web server status and verify that it’s actively running.
View the Nginx web server logs to verify the latest entries associated with your application error.
Restart the Nginx to refresh all connections to your Akaunting application.
Log in to your MySQL server using the Akaunting database user.
View all databases and verify that the user has access to the Akaunting database.
Output:
If the Akaunting database is not available on the list, log out of the user, then log in to the MySQL server as an administrator to assign the user full privileges to the database.
Visit your Akaunting configuration page and set up the database user details again to test connectivity to the MySQL database server.
Delete your Akaunting web root directory files.
Download the latest Akaunting version again.
Extract files from the Akaunting archive file using unzip.
Grant the web server user www-data full privileges to all directory files.
Create a new database and grant your MySQL user full privileges to the database.
Access your Akaunting configuration screen again and set up the application with a new database.
View the available PHP version on your server.
View the PHP-FPM status and confirm that it's active. For example, for PHP 8.1, run the following command.
Output:
Open the Akaunting Nginx configuration and verify that the PHP-FPM directive matches your installed version to handle dynamic Akaunting application requests.
Output:
Change the PHP-FPM version number depending on the available version on your server.
Log in or create a new account on the Akaunting website.
Click your new user API Key field within the dashboard to copy your custom key.
Access your Akaunting dashboard and add your new account key to activate all the application features.
You have deployed Akaunting on a Vultr Cloud Server, secured the application and set up sample invoice documents. Akaunting offers extended features that allow you to perform multiple accounting tasks on your server. Upgrade your API key to use multiple company profiles, or integrate the application with supported modules to enhance your application interface and features. For more information, visit the Akaunting self-hosting documentation.
0 Comments
Be the first to comment and share your perspective with the community.