Atlantic.Net Blog

How to Install Invoice Ninja on Debian 10

Hitesh Jethva
by Atlantic.Net (468 posts) under Tutorials, VPS Hosting

Invoice Ninja is a free, open-source, self-hosted application for invoicing and billing customers. It is written in PHP with a Laravel framework. Invoice Ninja is specially designed for freelancers & businesses for invoicing, accept payments, track expenses, create proposals, and time tasks. It allows you to create and send invoices to clients with your own domain name and brand. Invoice Ninja supports 40+ payment gateways including WePay, GoCardless, PayPal,, 2Checkout, and more.

In this post, we will show you how to install Invoice Ninja with Nginx on Debian 10.


  • A fresh Debian 10 server on the Atlantic.Net Cloud Platform
  • A valid domain name pointed with your virtual private server
  • A root password configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Debian 10 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in to your Debian 10 server, run the following command to update your base system with the latest available packages.

apt-get update -y

Step 2 – Install LEMP Server

First, you will need to install Nginx, MariaDB, PHP, and other PHP extensions on your server. You can install all of them with the following command:

apt-get install nginx mariadb-server php php-fpm php-cli php-common php-curl php-gd php-mysql php-xml php-mbstring unzip -y

Once all the packages are installed, start the Nginx and MariaDB service if not started.

systemctl start nginx
systemctl start mariadb

Step 3 – Create a Database

Next, you will need to create a database and user for Invoice Ninja. First, log in to MariaDB with the following command:


Once connected, create a database and user with the following command:

GRANT ALL PRIVILEGES ON ninja.* TO 'ninja'@'localhost' IDENTIFIED BY 'password';

Next, flush the privileges and exit from the MariaDB with the following command:


Step 4 – Download Invoice Ninja

Next, download the latest version of Invoice Ninja with the following command:

wget -O

Once the download is completed, unzip the downloaded file to the Nginx root directory:

unzip -d /var/www/html

Next, change the ownership of the ninja directory to www-data:

chown -R www-data:www-data /var/www/html/ninja

Step 5 – Configure Nginx for Invoice Ninja

Next, you will need to create an Nginx virtual host configuration file for Invoice Ninja.

You can create it with the following command:

nano /etc/nginx/conf.d/ninja.conf

Add the following lines:

server {
    listen 80;

    root /var/www/html/ninja/public/;
    index index.php index.html index.htm;
    charset utf-8;

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

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    access_log  /var/log/nginx/invoiceninja.access.log;
    error_log   /var/log/nginx/invoiceninja.error.log;

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/run/php/php7.3-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;

    location ~ /\.ht {
        deny all;

Save and close the file, then verify the Nginx for any syntax errors with the following command:

nginx -t

Finally, restart the Nginx service to apply the changes:

systemctl restart nginx

Step 6 – Access Invoice Ninja

Now, open your web browser and access the Invoice Ninja web interface using the URL You will be redirected to the following page:

Provide your Invoice Ninja URL, database details, and administrative user information, and click on the Next button. You will be redirected to the Invoice Ninja login page:

Provide your admin username and password and click on the Login button. You should see the Invoice Ninja dashboard on the following page:


Congratulations! You have successfully installed and configured Invoice Ninja on Debian 10. You can now implement Invoice Ninja in your organization and start invoicing and billing customers with your VPS from Atlantic.Net.

Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year

Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

Best Cloud Consultancy or MSP in 2022
BAA Red Flags: What Should Your HIPAA-Compliant Hosting Company Be Willing to Accommodate?
HIPAA Compliance for Remote Workers: How to Maintain HIPAA Compliance with a Remote Team
How to Make the Best Use of the Cloud in the Internet of Things (IoT)
How to Make the Best Use of Artificial Intelligence in Cloud Computing

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year

New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2008 Lookout Dr,

Garland, Texas 75044

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4


London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom