How to host Invoice Ninja on Vultr Server - ServerAvatar

Published : Aug 17, 2023

Share This Post

cloud-platform

Vultr

Vultr is one of the simplest cloud platforms available. It is very easy to create and manage infrastructure in Vultr. You can create on-demand cloud instances or servers at 28 different locations world wide.

Get started with Vultr
application

Invoice Ninja

Invoice Ninja is an open-source application that simplifies invoicing and billing for entrepreneurs, freelancers, and small-to-medium businesses. With its intuitive interface and robust functionality, Invoice Ninja enables users to create and manage professional invoices effortlessly.

More info

Create a Cloud Instance in Vultr

To create a server in Vultr, follow the below given steps. If you want to learn How to use Vultr to manage your infrastructure in Vultr, You can refer our Vultr cloud guide.

Step 1: Go to Instance Creation Page

Vultr provides lots of different types of cloud instances. From the server creation page, you can create lots of different types of cloud instances, like Regular VMs, Dedicated, Bare Metal, Cloud GPUs and some managed services.

To access the server creation page, log in to your Vultr account and click on the Deploy New Server option from the + button given on the dashboard.

Create server in Vultr - Step 1

Step 2: Choose Server

You can create 4 different types of cloud instances. They are Optimised cloud compute, Cloud compute, Cloud GPU and Bare Metal. Select the one that fits your requirements.

Create server in Vultr - Step 2

Step 3: Choose Server Type

Based on your selection of the server in the second step, You will have to select a specific type of server. If you have selected Optimised cloud compute instance, You will see options like the following image.

Create server in Vultr - Step 3

Step 4: Select Server Location

Location is very important option. Make sure to select a server location closest to your major traffic source demographically. You can select locations in 5 different continents.

Create server in Vultr - Step 4

Step 5: Select Server Image

In simple terms, Server image is an operating system running on the server. So here, You have to select an OS for your server.

If you are managing your servers with ServerAvatar, Select Ubuntu 20.04 or Ubuntu 22.04.

Create server in Vultr - Step 5

Step 6: Select Server Size

Here, Select a server size according to your requirements. If you are just getting started with the project, You can start small and then upgrade according to the future requirements.

Create server in Vultr - Step 6

Step 7: Add Auto Backups and Additional Features

We recommend you to enable auto backups for important websites or apps. If you are creating a temporary server, You can skip the auto backups.

In additional features, You can enable DDOS Protection if needed. Enable other options according to your requirements.

Do not enable "No Public IPv4 Address" option. It will result in a server without IPv4, which is not possible to connect with ServerAvatar.

Step 8: Select an SSH Key

If you use SSH key to authenticate with the server, Select an SSH key in this section. If you haven't uploaded your key yet, You can do it by clicking on the Add New option.

SSH key is not mandatory. If you do not use SSH keys, Ignore this option. You can still connect with server using password.

Create server in Vultr - Step 8

Step 9: Firewall Group

If you are using Vultr firewall, You can select the firewall group from here.

If you do not have 43210 port enabled in your firewall group, you need to configure it to connect a server with ServerAvatar.

Create server in Vultr - Step 9

Step 10: Server Hostname and Label

You have to choose the hostname and the label for the server in this step. You can set the same hostname and label. They are used for identification purpose only.

Create server in Vultr - Step 10

Step 11: Deploy Now!

Finally, click on the Deploy Now button to create a server. It might take a minute or two to fully boot up your server. Once it is ready, You will see it in the Products section in Vultr.

Create server in Vultr - Step 11

Initial Server Configuration

The Initial server configuration includes installation and configuration of various packages required to host your website. Usually, You have to write commands and modify configuration files. Luckily, With ServerAvatar, Your full server configuration and optimisation can be automated.

Here are the three ways to automatically configure your server with ServerAvatar.

Install and Setup Invoice Ninja on Cloud Using ServerAvatar

Step 1. Create Database

Access the Databases tab on the ServerAvatar server panel to create a MySQL Database.

image

Enter the credentials and click on the Create Database button.

image

Step 2. Change PHP-CLI Version

Deploying InvoiceNinja on the server requires PHP-CLI Version 8.1 or above at the server level. To configure the PHP-CLI version, follow the Snapshot.

image

Step 3. Create PHP Application

Access the Applications tab from the server panel to create a new PHP application.

image

Fill up the required information, including the Application Name, Domain Name, and Advanced Options for more PHP settings.

image

Proceeds to next by clicking on the Next Step.

Now select method and service provider Git and GitHub, respectively (follow according to Snapshot)

image

Enter the required information as given below:

Repository Type: Public
Clone HTTPS URL: https://github.com/invoiceninja/invoiceninja.git
Branch: v5-stable
Deployment script:

git checkout v5-stable;
cp .env.example .env;
composer i -o --no-dev
php artisan key:generate

image

Move further by clicking on the Next Step.

Create a System User or choose a system user from an existing One.

Then choose PHP version 8.1 or above; the custom webroot should be Public as in the given Snapshot.

Custom Webroot: Public

image

Then, click on Create Application button.

Step 4. Connect Database

go to the File Manager tab from the sidebar of the application. And access the public_html folder

image

Now check the Show Hidden Files box to access the .env file to change to the origional database credentials.

image

Change the following configuration to establish a connection with the database.

DB_DATABASE= Database_Name
DB_USERNAME= Database_Username
DB_PASSWORD=Database_Password

to access database credentials, go to the Database tab from the sidebar of the server panel and click the database that we created in the first step.

image

that's all, open your application URL in web browser to access Invoice Ninja setup page.

image

Tip: ServerAvatar provides a one-click solution for installing an SSL certificate on your domain. To install SSL, go to the application panel and click the SSL Certificate button to install automatic SSL in your application domain.