This tutorial shall be exhibiting you methods to set up InvoiceNinja on Ubuntu 20.04 with Apache or Nginx internet server. InvoiceNinja is an open-source, self-hosted bill software program, a low-cost various to business on-line bill platforms comparable to Freshbooks. InvoiceNinja gives hosted bill service, however when you prefer to self host the software program, you may observe the directions under.

InvoiceNinja Options

  • With InvoiceNinja, you may ship invoices to your purchasers through the use of your individual area identify and model.
  • Handle invoicing for a number of companies all underneath one account.
  • Save time by mechanically billing long-term purchasers with recurring invoices.
  • Simply create and ship lovely proposals to your clients.
  • Connect third Get together Information to Invoices.
  • Create Mission Duties & Monitor Time.
  • Manage and plan your consumer work with a visible undertaking administration instrument.
  • Permit your purchasers to see all their transactions with you in a single look.
  • Zapier automation lets you switch information between your invoicing account and fashionable apps together with Gmail, Google Sheets, QuickBooks On-line, Slack, Pipeline, MailChimp, and tons of extra.
  • Request deposits & partial funds utilizing the identical bill many times.
  • Use a pre-written auto-reminder electronic mail sequence to remind purchasers your bill must be paid.
  • Obtain notifications when a consumer views and pays your bill.
  • And plenty of extra

Prerequsites

First, you want a Linux server with a minimum of 512MB RAM. You’ll be able to click on this particular hyperlink to get $100 free credit score on DigitalOcean. (For brand spanking new customers solely). In case you are already a DigitalOcean consumer, then you may click on this particular hyperlink to get $50 free credit score on Vultr (for brand new customers solely). After getting an account at DigitalOcean or Vultr, set up Ubuntu 20.04 in your server and observe the directions under.

InvoiceNinja requires PHP and MySQL/MariaDB. To observe this tutorial, you need to have already arrange a LAMP stack or LEMP stack. For those who haven’t already carried out so, please use one of many following guides.

And also you additionally want a website identify, so your purchasers can see the bill by way of your area identify. I registered my area identify at NameCheap as a result of the worth is low and so they give whois privateness safety free for all times.

Now let’s set up InvoiceNinja.

Step 1: Obtain InvoiceNinja Set up Zip File on Ubuntu 20.04 Server

Login into your Ubuntu 20.04 server by way of SSH. Then run the next command to obtain the most recent model of InvoiceNinja zip file onto your server.

wget -O invoice-ninja.zip https://obtain.invoiceninja.com/

As soon as downloaded, extract the archive to the /var/www/ listing with unzip.

sudo apt set up unzip

sudo mkdir -p /var/www/

sudo unzip invoice-ninja.zip -d /var/www/

The -d possibility specifies the goal listing. InvoiceNinja internet recordsdata shall be extracted to /var/www/ninja. To raised determine every listing, you may rename it to invoice-ninja.

sudo mv /var/www/ninja /var/www/invoice-ninja

Then we have to change the proprietor of this listing to www-data in order that the online server can write to this listing.

sudo chown www-data:www-data /var/www/invoice-ninja/ -R

We additionally want to vary the permission of the storage listing.

sudo chmod 755 /var/www/invoice-ninja/storage/ -R

Step 2: Create a Database and Person in MariaDB

Log into MariaDB database server with the next command. Since MariaDB is now utilizing unix_socket plugin to authentication consumer login, there’s no must enter MariaDB root password. We simply must prefix the mysql command with sudo.

sudo mysql

Then create a database for Bill Ninja. This tutorial names the database invoiceninja. You need to use no matter identify you want.

create database invoiceninja;

Create the database consumer. Once more, you should utilize your most well-liked identify for this consumer. Exchange your-password along with your most well-liked password.

create consumer [email protected] recognized by ‘your-password’;

Grant this consumer all privileges on the invoiceninja database.

grant all privileges on invoiceninja.* to [email protected];

Flush privileges and exit.

flush privileges;

exit;

Step 3: Set up PHP Modules

Notice that InvoiceNinja at present doesn’t assist PHP7.4. For greatest compatibility, it’s really helpful so as to add the PHP7.2 PPA and set up PHP7.2.

sudo add-apt-repository ppa:ondrej/php

Then run the next instructions to put in PHP modules required or really helpful by InvoiceNinja.

sudo apt set up php-imagick php7.2-fpm php7.2-mysql php7.2-common php7.2-gd php7.2-json php7.2-curl php7.2-zip php7.2-xml php7.2-mbstring php7.2-bz2 php7.2-intl php7.2-gmp

For those who use Apache internet server, then it is advisable to disable the PHP module for Apache.

sudo a2dismod php7.4

You additionally must disable the prefork MPM module.

sudo a2dismod mpm_prefork

Now it is advisable to run the next command to allow three modules with a purpose to use PHP-FPM, no matter whether or not mod_php is put in in your server.

sudo a2enmod mpm_event proxy_fcgi setenvif

Then restart Apache.

sudo systemctl restart apache2

Step 4: Setting Up Internet Server

We will use Apache or Nginx internet server.

Apache

For those who desire Apache, create a digital host file for Bill Ninja.

sudo nano /and so on/apache2/sites-available/invoice-ninja.conf

Put the next textual content into the file. Exchange bill.yourdomain.com with your individual sub-domain for Bill Ninja. Don’t neglect to set A report for the area identify in your DNS supervisor. (Notice that the webroot is about to /var/www/invoice-ninja/public/, not /var/www/invoice-ninja/)

ServerName bill.yourdomain.com
DocumentRoot /var/www/invoice-ninja/public

DirectoryIndex index.php
Choices +FollowSymLinks
AllowOverride All
Require all granted

ErrorLog ${APACHE_LOG_DIR}/invoice-ninja.error.log
CustomLog ${APACHE_LOG_DIR}/invoice-ninja.entry.log mixed

Embody /and so on/apache2/conf-available/php7.2-fpm.conf

Save and shut the file. Then allow this digital host.

sudo a2ensite invoice-ninja.conf

We have to allow the rewrite module.

sudo a2enmod rewrite

Restart Apache for the adjustments to take impact.

sudo systemctl restart apache2

Now go to bill.yourdomain.com and you can be redirected to the Bill Ninja setup wizard web page (bill.yourdomain.com/setup). For those who see the default Apache web page as a substitute of the setup wizard, then it is advisable to disable the default digital host.

sudo a2dissite 000-default.conf

And restart Apache.

Earlier than getting into any data within the setup wizard, we have to allow HTTPS, which is defined in step 4.

Nginx

For those who desire Nginx, create a invoice-ninja.conf file in /and so on/nginx/conf.d/ listing.

sudo nano /and so on/nginx/conf.d/invoice-ninja.conf

Put the next textual content into the file. Exchange bill.yourdomain.com with your individual sub-domain for Bill Ninja. Don’t neglect to set A report for the area identify in your DNS supervisor. (Notice that the webroot is about to /var/www/invoice-ninja/public/, not /var/www/invoice-ninja/)

server {
pay attention 80;
pay attention [::]:80;
server_name bill.yourdomain.com;

root /var/www/invoice-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.entry.log;
error_log /var/log/nginx/invoiceninja.error.log;

location ~ .php$

location ~ /.ht {
deny all;
}
}

Save and shut the file. Then take a look at Nginx configuration.

sudo nginx -t

If the take a look at is profitable, reload Nginx for the adjustments to take impact.

sudo systemctl reload nginx

Now go to bill.yourdomain.com and you can be redirected to the Bill Ninja setup wizard web page (bill.yourdomain.com/setup). Earlier than getting into any data within the setup wizard, we have to allow HTTPS.

Step 5: Enabling HTTPS

To encrypt the HTTP site visitors, we are able to allow HTTPS by putting in a free TLS certificates issued from Let’s Encrypt. Run the next command to put in Let’s Encrypt consumer (certbot) on Ubuntu 20.04 server.

sudo apt set up certbot

For those who use Nginx, then you definitely additionally want to put in the Certbot Nginx plugin.

sudo apt set up python3-certbot-nginx

Subsequent, run the next command to acquire and set up TLS certificates.

sudo certbot –nginx –agree-tos –redirect –hsts –staple-ocsp –email [email protected] -d bill.yourdomain.com

For those who use Apache, set up the Certbot Apache plugin.

sudo apt set up python3-certbot-apache

And run this command to acquire and set up TLS certificates.

sudo certbot –apache –agree-tos –redirect –hsts –staple-ocsp –email [email protected] -d bill.yourdomain.com

The place

  • –nginx: Use the nginx plugin.
  • –apache: Use the Apache plugin.
  • –agree-tos: Comply with phrases of service.
  • –redirect: Power HTTPS by 301 redirect.
  • –hsts: Add the Strict-Transport-Safety header to each HTTP response. Forcing browser to at all times use TLS for the area. Defends in opposition to SSL/TLS Stripping.
  • –staple-ocsp: Permits OCSP Stapling. A sound OCSP response is stapled to the certificates that the server presents throughout TLS.

The certificates ought to now be obtained and mechanically put in.

How to install InvoiceNinja on Ubuntu 20.04 Apache / Nginx server

Step 6: End Set up with the Setup Wizard

Now go to bill.yourdomain.com and enter the database data, SMTP settings and create an admin consumer.

How to install InvoiceNinja on Ubuntu 20.04 Apache / Nginx server

If you want to make use of your individual mail server to ship emails to purchasers, please take a look at the next article to arrange your individual mail server.

When utilizing your individual electronic mail server, there are two drivers to select from: SMTP and Sendmail.

  • Select SMTP in case your mail server and Bill Ninja runs on two totally different hosts.
  • Select Sendmail in case your mail server and Bill Ninja runs on the identical host.

For those who select SMTP, use settings like under.

  • host: mail.yourdomain.com  port: 587   Encryption: TLS. And enter your username and password.

For those who select Sendmail, use settings like under.

  • host: 127.0.0.1   port: 25    Encryption: none.  You don’t must enter username or password.

After creating the admin consumer, you may log into InvoiceNinja.

How to install InvoiceNinja on Ubuntu 20.04 Apache / Nginx server

Set Up Cron Jobs

We have to arrange Cron jobs to ship recurring invoices and electronic mail reminders. Edit the foundation consumer’s crontab file.

sudo crontab -e

Add the next strains on the finish of this file.

#InvoiceNinja
Zero 8 * * * /usr/bin/php7.2 /var/www/invoice-ninja/artisan ninja:send-invoices > /dev/null
Zero 8 * * * /usr/bin/php7.2 /var/www/invoice-ninja/artisan ninja:send-reminders > /dev/null

Save and shut the file. The 2 Cron jobs will run at Eight AM daily. It’s also possible to manually run a job like under.

sudo /usr/bin/php7.2 /var/www/invoice-ninja/artisan ninja:send-invoices

Eradicating the Bill Ninja branding

By default, your bill may have the Bill Ninja branding, you should buy a white label license for $30/per 12 months to take away the Bill Ninja branding from the bill and consumer portal. Go to settings -> Bill Design, click on the white-label hyperlink on the backside to buy.

Conclusion

I hope this tutorial helped you put in Bill Ninja on Ubuntu 20.04 server. As at all times, when you discovered this submit helpful, then subscribe to our free e-newsletter to get extra suggestions and tips. Take care 🙂

Fee this tutorial

[Total: 0 Average: 0]

invoice ninja self hosted install,install invoice ninja debian 10,invoice ninja download,invoice ninja documentation,invoice ninja tutorial,invoice ninja config file,invoice ninja api documentation,invoice ninja docker

You May Also Like

Calculation Number of Days Between Two Dates

Topic: Delphi Language charlene44 wrote: 18/08/2006 at 15h08 calculation of number of…

World of Warcraft Classic: Some Players Use Illegal Tools to Stay Connected

Earlier this week, Blizzard released World of Warcraft Classic. The launch was,…

Top Benefits of Social Media Marketing

We cannot deny the fact that when it comes to marketing, social…

Crash Team Racing Bientt Back on Ps4!

Activision seems not to have finished with the remastering of the Playstation…