Warning
This article is old, and some of the information may be outdated or no longer valid today.
If you have any questions or need to confirm any details, we recommend contacting our support team for up-to-date information and personalized assistance.
InvoicePlane is a self-hosted, free software web system written in the programming language PHP and requires an SQL database. The application provides management similar to a CRM for your customers. You can enter contact details, notes, or add custom fields.
It is a fairly robust application for managing your entire billing cycle, including quotes, invoices, and payments. It is highly customizable to suit your needs, as it is developed in PHP.
You can use amount formats, email templates, and PDF templates by configuring them from the web panel itself. It also accepts online payments using PayPal to pay invoices.
Here are some links about Invoice Plane:
Prerequisites
- An Ubuntu 20.04 LTS server with a root user or permissions to run sudo su.
- A DNS A record with the server's public IP address to obtain a certificate.
Installation
In this article, we explain how to install InvoicePlane, first installing NGINX with PHP and MariaDB and obtaining a Let's Encrypt certificate with Certbot. Connect to the server using an SSH client and follow these steps.
First, update the repository and install the updates:
# apt update && apt upgradeThen install NGINX, MySQL, PHP (some packages are optional), and Certbot:
# apt install nginx mariadb-server php-cli php-fpm php-common php-curl php-dompdf php-gd php-zip php-apcu php-yaml php-xdebug php-mbstring php-gd php-xml php-json php-mysql certbot python3-certbot-nginxYou can check the PHP installation by checking the version:
# php -vNext, access the temporary directory and download InvoicePlane from the official website (you can check the latest version at https://www.invoiceplane.org/downloads):
# cd /tmp && wget https://www.invoiceplane.org/download/v1.5.11Unzip the downloaded file:
# apt install -y unzip && unzip v1.5.11 -d /var/www/html/Create a user and a database for InvoicePlane by following these steps. First, start and enable MariaDB:
# systemctl start mariadb && systemctl enable mariadbNext, configure MySQL:
# mysql_secure_installationAnd access MariaDB to create the user and database:
# mysql -u rootCreate the database and user, and grant permissions on it:
MariaDB .. > create database invoicedb;
MariaDB .. > create user 'invoiceuser'@'localhost' identified by 'password';
MariaDB .. > grant all privileges on invoicedb.* to 'invoiceuser'@'localhost';
MariaDB .. > flush privileges;
MariaDB .. > quit;Once finished, copy the sample configuration file to configure InvoicePlane:
# cp /var/www/html/ipconfig.php.example /var/www/html/ipconfig.phpEdit it and add the record or domain you will use as the URL:
# nano /var/www/html/ipconfig.phpYou must edit the IP_URL line to add it:
IP_URL=https://invoiceplane.ejemplo.comRecursively change the owner and group of the entire web directory:
# chown -R www-data:www-data /var/www/html/Also change the permissions:
# chmod -R 755 /var/www/html/Edit the site file:
# nano /etc/nginx/sites-available/defaultChange the server_name in the file to the subdomain or domain record:
server_name invoiceplane.ejemplo.com;Add index.php to the index line:
index index.php;Replace the try_files line with:
try_files $uri $uri/ /index.php?$args;Also uncomment the lines for using PHP and deny access to .htaccess (not used by NGINX). It should look like this:
# pass PHP scripts to FastCGI server
location ~ \.php$ {
# include snippets/fastcgi-php.conf;
include fastcgi.conf;
# fastcgi_index index.php;
# With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
# With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
fastcgi_param HTTPS on;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
Save and exit the file editor. Then check the modified configuration with:
# nginx -tIf no errors appear, restart the web service to reload the changes:
# systemctl restart nginx.serviceFinally, obtain a certificate with Certbot with redirect:
# certbot --nginx --redirect -d invoiceplane.ejemplo.comWith this last action, you can access the InvoicePlane Wizard directly to finish the installation from a browser using the assigned URL:
Click Setup and select the desired language for InvoicePlane:
Click continue and verify that you meet all the requirements:
If you meet the requirements, you can continue with the installation and specify the database created earlier:
Test the connection:
Click the continue buttons to create the tables and records. Then, once you have finished with the database, you must create a user and add the billing information:
Once completed, the following message will appear:
As the warning indicates, disable setup as a precaution by running the following command:
# sed -i 's/DISABLE_SETUP=false/DISABLE_SETUP=true/g' /var/www/html/ipconfig.php
Next, click the sign-in button and enter the email and password you created to access the InvoicePlane Dashboard:
Congratulations! You have completed the installation and configuration of the Invoice Plane billing system on an Ubuntu 20.04 LTS server.
You can now easily deploy Invoice Plane in a production environment for your billing.