In this tutorial, we'll be walking you through the process of installing Crater, an open-source invoicing software, on an Ubuntu Server that is running the latest version. Before we continue, make sure you have root or sudo privileges on your server.
We'll be using GitHub to download the Crater source code, composer to download and install dependencies, and the Apache Web Server to host the software.
Before we begin, we must ensure that our Ubuntu server is up to date with the following commands:
sudo apt update
sudo apt upgrade
After that, verify that your server has Apache, PHP, and MySQL installed.
sudo apt install apache2 mysql-server php php-mysql libapache2-mod-php
Once these dependencies are installed, we can move on to the next step.
Composer will enable us to download Crater dependencies such as Laravel Framework and others. If Composer is not already installed on your server, run the following command:
sudo apt install curl php-cli php-mbstring git unzip
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
This will download and install Composer as well as its dependencies.
Crater site requires an empty databases set up on your server. Use these commands to configure the MySQL database and username:
sudo mysql -u root -p
CREATE DATABASE crater;
GRANT ALL PRIVILEGES ON crater.* TO 'crater'@'localhost' IDENTIFIED BY 'your_password';
FLUSH PRIVILEGES;
EXIT;
The next step is to download and install Crater using the following commands:
sudo mkdir /var/www/crater
cd /var/www/crater
sudo git clone https://github.com/bytefury/crater.git .
sudo composer install --no-dev --prefer-dist
sudo cp .env.example .env
sudo php artisan key:generate
sudo chmod -R 777 storage bootstrap/cache
Since we are using the latest version of Ubuntu, we are using the bytefury version of Crater.
Next up is configuring the Apache Web Server, creating a virtual host, and pointing it to our Crater's installation directory. We do this by running the following commands.
sudo nano /etc/apache2/sites-available/crater.conf
Add the following configuration block to the empty file and modify it as required:
<VirtualHost *:80>
ServerName example.com # Your Domain Name
ServerAlias www.example.com
DocumentRoot "/var/www/crater/public"
<Directory "/var/www/crater/public">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
After making those changes, close the file by pressing CTRL + X
, followed by Y and Enter to save.
We are now ready to test if we can access the Crater site using a web browser. Open your web browser and enter your domain name or server IP address. If Crater is successfully installed, you should see the login page.
We have successfully installed Crater on our Ubuntu Server. With this installation, we can now manage our invoices easily. We hope you found this tutorial helpful!
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!