We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Learn how to – Install Crater Invoicing Solution on Debian 11 / Debian 10

Learn how to – Install Crater Invoicing Solution on Debian 11 / Debian 10.

This guide aims to demonstrate how to install Crater Invoicing Solution on Debian 11 / Debian 10. The Crater is an open-source PHP-based invoicing software used by individuals or small and medium businesses. It helps one track payments, expenses as well as create professional invoices. It has both a web application built on Laravel & VueJS and a mobile application built on React Native.

The Crater Invoicing Solution offers the features below:

  • Track Payment – helps in tracking transactions and payments
  • Estimates – make an estimate or offer a price
  • Invoice – used to create and send invoices to clients
  • Reports – makes a billing report
  • Taxes – set the type of tax
  • Exprenses – helps keep a record and track expenses
  • It has a mobile app for Android and iOS mobile versions.
  • Recurring Invoices – used to automatically create invoices on a given schedule & limit
  • Customers – the list of customers and their information.

Install Crater Invoicing Solution on Debian 11 / Debian 10

This guide aims to illustrate two methods one can use to install Crater Invoicing Solution on Debian 11 / Debian 10:

  • Manual installation.
  • Using Docker containers

Option 1 – Install Crater Invoicing Solution on Debian 11 / Debian 10 Manually.

For this method, we will require the following:

  • PHP: 7.4 and its extensions
  • Web Server: Apache
  • Database: MariaDB

1. Download Crater archive

Download the latest available version of Crater from the official Crater Downloads page. If using command line install wget and curl:

sudo apt update
sudo apt install wget curl unzip

Alternatively, you can use Wget to pull the archive.

VER=$(curl -s https://api.github.com/repos/crater-invoice/crater/releases/latest|grep tag_name | cut -d '"' -f 4)
wget https://github.com/crater-invoice/crater/archive/refs/tags/${VER}.tar.gz

Once successful, extract the archive.

tar xvf ${VER}.tar.gz

2. Install and Configure Apache on Debian 11 / Debian 10.

We will install the Apache webserver on our system as below.

sudo apt install apache2

Install composer:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer

Navigate to crater directory and perform composer installation of dependencies:

cd crater-${VER}
composer install

Copy .env.example to .env

cp .env.example .env

Edit .env file and update Database connection parameters and App URL:

APP_ENV=production
APP_KEY=base64:kgk/4DW1vEVy7aEvet5FPp5un6PIGe/so8H0mvoUtW0=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=//crater.ownyourlife.com.ng

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=crater
DB_USERNAME=crater
DB_PASSWORD="Passw0rd"

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_DRIVER=sync
SESSION_DRIVER=cookie
SESSION_LIFETIME=1440

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

#MAIL_DRIVER=smtp
#MAIL_HOST=
#MAIL_PORT=
#MAIL_USERNAME=
#MAIL_PASSWORD=
#MAIL_ENCRYPTION=
#
#PUSHER_APP_ID=
#PUSHER_KEY=
#PUSHER_SECRET=
#
#SANCTUM_STATEFUL_DOMAINS=crater.test
#SESSION_DOMAIN=crater.test
#
#TRUSTED_PROXIES="*"
#
#CRON_JOB_AUTH_TOKEN=""

Now move the extracted file to the Apache web directory.

cd ..
sudo mv crater-${VER} /var/www/crater

Grant ownership of the folder.

sudo chown -R www-data:www-data /var/www/crater
sudo chmod -R 775 /var/www/crater/storage/framework
sudo chmod -R 775 /var/www/crater/storage/logs
sudo chmod -R 775 /var/www/crater/bootstrap/cache

Proceed and create a virtual hosts file.

sudo vim /etc/apache2/sites-available/crater.conf

In the file, add the below lines, and replace your server name appropriately:

<VirtualHost *:80>
    ServerName crater.ownyourlife.com.ng    
    DocumentRoot /var/www/crater/public
 
    <Directory /var/www/crater/public>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>
    
    ErrorLog /var/log/apache2/crater_error.log
    CustomLog /var/log/apache2/crater_access.log combined
</VirtualHost> 

Save the file and enable the rewrite module.

sudo a2enmod rewrite

Enable the created site.

sudo a2ensite crater
sudo systemctl restart apache2

3. Install PHP and extensions.

We will use the below command to install PHP and all the required extensions.

sudo apt install libapache2-mod-php php-common php-bcmath php-mbstring php-mysql php-tokenizer php-zip php-curl php-xml openssl redis php-redis -y 

Verify the installed PHP versions.

$ php -v
PHP 7.4.25 (cli) (built: Oct 23 2021 21:53:50) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.25, Copyright (c), by Zend Technologies

Restart Apache web server.

sudo systemctl restart apache2	

4. Install MariaDB Database server

MariaDB is available in the default Debian repositories and can be installed using the command:

sudo apt install mariadb-server 	

Once the installation is complete, harden the instance:

sudo mysql_secure_installation 

Proceed as below.

Enter current password for root (enter for none): Press Enter
....
Switch to unix_socket authentication [Y/n] y
.......
Change the root password? [Y/n] y
New password: Enter Password
Re-enter new password: Re-Enter Password
......
Remove anonymous users? [Y/n] y
...
Disallow root login remotely? [Y/n] y
...
...
Remove test database and access to it? [Y/n] y
....
Reload privilege tables now? [Y/n] y
.....
Thanks for using MariaDB!

Now create a database for the Crater Invoicing Solution. First login to the shell using the created root password

sudo mysql -u root -p

Now create the database and user as below

create database crater;
create user 'crater'@'localhost' identified by 'Passw0rd';
grant all privileges on crater.* to 'crater'@'localhost';
flush privileges;
exit

Now from here, you can proceed to the Web installation wizard.

http://crater.ownyourlife.com.ng

Option 2 – Install Crater Invoicing Solution on Debian using Docker

This is the easiest way to run the Crater Invoicing Solution since the container contains all the required dependencies for Crater.

Ensure that the latest versions of Docker Engine and Docker Compose are installed on your Debian 11 / Debian 10. Below is a dedicated guide to help you install them.

After installation add the user to docker group:

sudo usermod -aG docker $USER
newgrp docker

Once installed, proceed and clone the Crater repository. Ensure that git is installed on your system.

sudo apt install git
git clone https://github.com/crater-invoice/crater

Navigate into the directory and copy the environment as below.

cd crater
sudo cp .env.example .env
sudo chmod 775 .env

Now start the Crater container.

docker-compose up -d

Sample Output:

[+] Running 11/15
 â ¿ nginx Pulled                                                                                                                        3.7s
   â ¿ cbdbe7a5bc2a Pull complete                                                                                                        0.8s
   â ¿ c554c602ff32 Pull complete                                                                                                        1.2s
 â ¿ app Error                                                                                                                           1.7s
 â ¦ db Pulling                                                                                                                         10.7s
   â ¿ ea362f368469 Pull complete                                                                                                        2.1s
   â ¿ adb9a1b1379d Pull complete                                                                                                        2.2s
   â ¿ ac5c95406850 Pull complete                                                                                                        2.5s
   â ¿ fa48d8b47ec1 Pull complete                                                                                                        6.7s
   â ¿ bcf1feb44ac3 Pull complete                                                                                                        6.9s
   â ¿ 8a5de7784a0f Pull complete                                                                                                        7.4s
   â ¿ b8724b8a281a Pull complete                                                                                                        7.6s
   â ¿ a8a7c3f612d6 Pull complete                                                                                                        7.8s
   â ¹ 39b09b59e889 Downloading     [===============================================>   ]  82.07MB/87.28MB                               8.2s
   â ¹ 14bc3a6b0a94 Download complete                                                                                                    8.2s
........
[+] Running 6/6
 â ¿ Network crater_crater     Created                                                                                                   0.1s
 â ¿ Volume "crater_db"        Created                                                                                                   0.0s
 â ¿ Container crater-app-1    Started                                                                                                   1.5s
 â ¿ Container crater-db-1     Started                                                                                                   1.7s
 â ¿ Container crater-nginx-1  Started                                                                                                   1.3s
 â ¿ Container crater-cron-1   Started                                                                                                   1.8s

Once successful, verify if the containers are running.

$ docker ps
CONTAINER ID   IMAGE               COMMAND                  CREATED          STATUS          PORTS                                         NAMES
4f728dcc93a3   nginx:1.17-alpine   "nginx -g 'daemon of…"   42 seconds ago   Up 40 seconds   0.0.0.0:80->80/tcp, :::80->80/tcp             crater-nginx-1
b88e2239c05a   mariadb             "docker-entrypoint.s…"   42 seconds ago   Up 39 seconds   0.0.0.0:33006->3306/tcp, :::33006->3306/tcp   crater-db-1
68a20e303d13   crater-php          "docker-php-entrypoi…"   42 seconds ago   Up 39 seconds   9000/tcp                                      crater-app-1
b95a02e7d805   crater_cron         "docker-php-entrypoi…"   42 seconds ago   Up 39 seconds   9000/tcp                                      crater-cron-1

Initiate the setup

sudo ./docker-compose/setup.sh

Proceed as below.

The links have been created.
**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > Press Enter

Set the right permissions.

chmod -R 775 ~/crater/storage/framework/
chmod -R 775 ~/crater/storage/logs/
chmod -R 775 ~/crater/bootstrap/cache/

Access the Crater Web installation wizard.

Now we will proceed and access the Crater web installation wizard using the URL http://IP_Address or http://domain_name. You will be granted the requirements check page.

Proceed and check the system requirements.

If all the requirements are met as below, continue and check the folder permissions as well.

Configure the database as below

For Docker:

Database port:3306
Database Name: crater
Database Username: crater
Database Password: crater
Database Host: db

For the Manual installation.

Database port: 3306
Database Name: crater
Database Username: crater
Database Password: Passw0rd
Database Host: 127.0.0.1

The details should be filled in as shown below.

Proceed to the domain verification.

Configure your mail service.

Create a Crater user account.

Enter the company information.

Set the preferences, remember the currency set cannot be altered later.

Now save the changes made and continue with the installation. Once successful, you should see the below dashboard:

Use Crater Invoicing Solution.

Now we are set to use our Crater Invoicing Solution. Begin by creating a customer as below.

With a customer added, create the items list.

Using the created item list, create an invoice for a customer as below.

Save the invoice and it will appear as below.

Here, you can download and print the invoice or send it to the recipient using mail as shown.

With the above activities, you will have your dashboard updated as below.

That was enough learning!

We have gone through how to install Crater Invoicing Solution on Debian 11 / Debian 10. We have also seen how to get started with Crater Invoicing Solution. I hope this was beneficial.

Related posts:

Install Invoice Ninja on CentOS 8 | Rocky Linux 8

Top 5 Bitcoin Investors, You Should Know About it

Payment solutions for hotels – everything you need to know

Can You Use Bitcoin as A Payment Method?

Cart

Your Cart is Empty

Back To Shop