How to install InvoicePlane with Nginx on Fedora 29

How to install InvoicePlane with Nginx on Fedora 29

InvoicePlane is a free open source invoice application. Its source code can be found on this Github. This tutorial will show you how to install InvoicePlane on a brand new Fedora 29 system.


  • WebServer (Apache, NGINX). This tutorial will use Nginx.
  • MySQL 5.5 or higher or MariaDB equivalent.
  • PHP 7.0 or higher with the following PHP extensions installed and activated:
  • php-gd
  • PHP hash
  • php-json
  • php-mbstring
  • php-mcrypt
  • php-mysqli
  • php-openssl
  • PHP recoding
  • php-xmlrpc
  • php-zlib


  • A server running Fedora 29.
  • A non-root user with sudo privileges.

Preliminary steps

Check your Fedora system version:

cat /etc/fedora-release# Fedora release 29 (Twenty Nine)

Set time zone:

timedatectl list-timezonessudo timedatectl set-timezone 'Region/City'

Update your operating system package (software). This is an important first step because it ensures that you have the latest updates and security fixes for the operating system’s default packages:

sudo dnf upgrade -y

Install some basic packages that are required for basic management of the Fedora operating system:

sudo dnf install -y vim wget curl git socat unzip bash-completion

Step 1-install PHP and required PHP extensions

InovicePlane web application requires PHP 7.0 or higher.

Install PHP and necessary PHP extensions:

sudo dnf install -y php-cli php-fpm php-common php-gd php-json php-mbstring php-mcrypt php-mysqlnd php-xmlrpc php-recode

To display PHP compiled in the module, run:

php -mctypecurlexiffileinfo. . .. . .

Check PHP version:

php --version# PHP 7.2.16 (cli) (built: Mar  5 2019 11:05:59) ( NTS )# Copyright (c) 1997-2018 The PHP Group# Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Start and enable the PHP-FPM service:

sudo systemctl start php-fpm.servicesudo systemctl enable php-fpm.service

Step 2-install MariaDB

Install MariaDB:

sudo dnf install -y mariadb-server

Check MariaDB version:

mysql --version# mysql  Ver 15.1 Distrib 10.3.12-MariaDB, for Linux (x86_64) using readline 5.1

Start and enable MariaDB service:

sudo systemctl start mariadb.servicesudo systemctl enable mariadb.service

Run mysql_secure installation Script to increase MariaDB security and set a password for MariaDB root user:

sudo mysql_secure_installation

Answer all questions as follows:

Enter current password for root (enter for none):Set root password? [Y/n]: YRemove anonymous users? [Y/n]: YDisallow root login remotely? [Y/n]: YRemove test database and access to it? [Y/n]:  YReload privilege tables now? [Y/n]:  Y

Log in to the MariaDB shell as the root user:

mysql -u root -p# Enter password

Create the MariaDB database and user that will be used to install InvoicePlane, and remember the credentials:


Exit from the MariaDB shell:


Replace dbname, username and password with your own name.

Step 3-install NGINX

Install Nginx web server:

sudo dnf install -y nginx

Check NGINX version:

nginx -v# nginx version: nginx/1.14.2

Start and enable the Nginx service:

sudo systemctl start nginx.servicesudo systemctl enable nginx.service

Configure NGINX for InvoicePlane. Run sudo vim /etc/nginx/conf.d/invoiceplane.conf And populate the file with the following configuration:

server {
    listen 80;
    listen [::]:80;


    root /var/www/invoiceplane;

    index index.php index.html;

    location / {
        try_files $uri $uri/ /index.php?$query_string;

    location ~ .php$ {        include default.d/php.conf;
        fastcgi_index index.php;
        try_files $uri =404;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass /var/run/php-fpm/www.sock;

Test the NGINX configuration:

sudo nginx -t

Reload NGINX:

sudo systemctl reload nginx.service

Step 4-Install InvoicePlane

Download the latest stable version of InvoicePlane and unzip the archive:

sudo mkdir -p /var/wwwcd /var/wwwsudo curl -O -J -L unzip v1.5.9.zipsudo rm v1.5.9.zipsudo mv ip invoiceplane

Navigation /var/www/invoiceplane table of Contents:

cd /var/www/invoiceplane

Make a copy ipconfig.php.example File and rename the copy to ipconfig.php:

sudo cp ipconfig.php.example ipconfig.php

turn on ipconfig.php File and add your URL in it:

sudo vim ipconfig.php# Something like thisIP_URL=

Change ownership /var/www/invoiceplane Directory to nginx:

sudo chown -R nginx:nginx /var/www/invoiceplane

Run sudo vim /etc/php-fpm.d/www.conf And set users and groups to nginx. Initially, they will be set to apache:

sudo vim /etc/php-fpm.d/www.conf# user = nginx# group = nginx

Run sudo vim /etc/php.ini And set date.timezone:

date.timezone = Region/City

Restart the PHP-FPM service:

sudo systemctl restart php-fpm.service

Run the InvoicePlane installer from a web browser and follow the instructions:

After installation is complete, you can log in to InvoicePlane using the email address and password you selected during the installation process.

If you want to secure the installation, you can disable the installer. For this, please replace DISABLE_SETUP=false versus DISABLE_SETUP=true At your ipconfig.php file.

Step 5-Complete InvoicePlane setup

Now that InvoicePlane is installed and configured, it’s time to access its web installation wizard.

Open your web browser and enter the URL You will be redirected to the following page:

Now click set up Button. You should see the following page:

Choose a language

Next, select the language and click carry on Button. You should see the following page:

Prerequisite check succeeded

Next, click carry on Button. You should see the following page:

Database settings

Here, provide your database details and click try again Button. You should see the following page:

The database has been created.

Now click carry on Button. You should see the following page:

Create user

Now click carry on Button. You should see the following page:

The installation is complete

Now provide all the required details and click carry on Button. When the installation is complete, you will see the following page:

Sign in to InvoicePlane

Now click log in Button to access InvoicePlane Management.