How To Install Invoice Ninja on CentOS 7

Install Invoice Ninja on CentOS 7

In this tutorial we will show you how to install and configuration of Invoice Ninja on your CentOS 7 server. For those of you who didn’t know, Invoice Ninja is a free and open source web-bases application software that can be used for invoicing, payments, time tracking and many more. It is 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 live invoice as 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 a CentOS 7 server.

Invoice Ninja’s features

  • Create work tasks and track time
  • Create invoices online in seconds
  • Email invoices & get paid online
  • Mobile responsive design
  • Integrate 45+ payment gateways
  • 10 fresh invoice template designs
  • View live invoice .PDF creation
  • Add your company logo to invoices
  • Quotations convert to invoices
  • Auto-billing & recurring invoices
  • Multiple tax settings
  • Multiple currencies supported
  • Client Portal to View Invoices
  • Alerts when invoices are paid
  • Set invoice payment due dates
  • Import expenses and setup vendors

Install Invoice Ninja on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Install LEMP server.

A CentOS 7 LEMP stack server is required. If you do not have a LEMP installed, you can follow our guide here. Also install required PHP modules:

Once the installation is finished, you will need to modify the php.ini configuration file:

Change the following line:

Step 3. Configuring MariaDB for Invoice Ninja.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each steps carefully which will set 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:

Step 4. Configure PHP-FPM.

You will need to configure PHP-FPM pool for Nginx user:

Change the following lines:

Save the file and exit from the text editor.

Next, you will need to create a new directory for PHP session and socket file:

Next, start PHP-FPM and enable it to start at boot time using following commands:

Step 5. Installing Invoice Ninja.

First thing to do is to go to Invoice Ninja’s download page and download the latest stable version of Invoice Ninja:

You need to install composer:

Next, install all the Invoice Ninja dependencies using composer:

Once the installation is done, rename the .env file and make some changes:

Change the database values according to your database:

Save the file and exit from the text editor. Next, edit the database configuration in the config directory:

Change the following lines:

Save the file and exit from the text editor and prepare the database with following command:

You will be prompted for a run the command, type ‘yes’ and press Enter.

Next, seed the database with all records as shown below:

Run following command to generate the application key and note this application key:

Next, edit the app.php file with nano text editor:

Add the key as shown below:

Save and close the file also change some folders permissions:

Step 6. Configure Nginx for Invoice Ninja.

Create an SSL Certificate and create a new virtual host configuration for Invoice Ninja:

Next, create a new virtual host configuration file inside /etc/nginx/ directory:

Add the following lines:

Save and close the file. Restart the Nginx service for the changes to take effects:

Step 7. Configure FirewallD Invoice Ninja.

Before accessing Invoice Ninja web interface, you will need to allow http and https service through firewalld:

Step 8. Accessing Invoice Ninja.

Invoice Ninja will be available on HTTP port 80 by default. Open your favorite browser and navigate to or http://server-ip and complete the required the steps to finish the installation.

Congratulation’s! You have successfully installed Invoice Ninja. Thanks for using this tutorial for installing Invoice Ninja on CentOS 7 system. For additional help or useful information, we recommend you to check the official Invoice Ninja web site.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get a best deal!