In this tutorial, we will show you how to install Invoice Ninja on Ubuntu 20.04 LTS. For those of you who didn’t know, Invoice Ninja is open-source web-based application software that can be used for invoicing, payments, time tracking and many more. It is the best solution for invoicing and billing customers. You can easily create and send invoices online in seconds. Invoice Ninja allows you to create your own custom invoice and show the live invoice as a PDF file.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you through the step by step installation Invoice Ninja on an Ubuntu 20.04 LTS (Focal Fossa).
Install Invoice Ninja on Ubuntu 20.04 LTS Focal Fossa
Step 1. First, make sure that all your system packages are up-to-date by running these following
apt commands in the terminal.
Step 2. Installing a LAMP server.
An Ubuntu 20.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here.
Step 3. Installing Invoice Ninja on Ubuntu 20.04.
Run the following command to download the latest version of InvoiceNinja:
Then, extract the archive in the
We will need to change some folders permissions:
By default, MariaDB is not hardened. You can secure MariaDB using the
mysql_secure_installation script You should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:
Configure it like this:
Next, we will need to log in to the MariaDB console and create a database for the Invoice Ninja. Run the following command:
This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for Invoice Ninja installation:
To create the virtual host configuration file for your domain, run the following command:
Add the following lines:
Save and close the file. Then enable this virtual host:
Enable HTTPS by installing a free TLS certificate issued from Let’s Encrypt. Run the following command to install Let’s Encrypt:
Next, run the following command to obtain and install a TLS certificate:
Invoice Ninja will be available on HTTP port 80 by default. Open your favourite browser and navigate to
https://server-ip-address and complete the required steps to finish the installation.
Congratulations! You have successfully installed InvoiceNinja. Thanks for using this tutorial for installing Invoice Ninja on your Ubuntu 20.04 Focal Fossa system. For additional help or useful information, we recommend you to check the official Invoice Ninja website.