# How to Install SolidInvoice on Ubuntu 22.04

> URL: https://www.atlantic.net/dedicated-server-hosting/how-to-install-solidinvoice-on-ubuntu-22-04/ | Published: 2024-06-20 | Updated: 2024-07-15 | Author: Hitesh Jethva

SolidInvoice is an open-source invoicing application designed for small to medium-sized businesses. It is a robust invoicing application that helps businesses streamline their invoicing and billing processes. It offers features such as client management, quote creation, payment tracking, and more, making it an ideal choice for businesses looking to improve their financial management.

In this tutorial, we will explain how to install and configure SolidInvoice on Ubuntu 22.04.

## Step 1 – Install LAMP Server

SolidInvoice requires a web server, a database server, and PHP with various extensions. We’ll use Apache as our web server and MariaDB as our database server.

Install Apache, MariaDB, PHP, and the necessary PHP extensions with the following command:

```bash
apt install apache2 mariadb-server mariadb-client php php-curl php-common php-mbstring php-json php-mysql php-opcache php-bcmath php-intl php-gd php-xml php-soap php-zip php-apcu unzip
```

Verify the PHP installation:

```bash
php -v
```

You should see output similar to this:

```bash
PHP 8.1.2-1ubuntu2.18 (cli) (built: Jun 14 2024 15:52:55) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.18, Copyright (c), by Zend Technologies
```

Open the PHP configuration file for Apache:

```bash
nano /etc/php/8.1/apache2/php.ini
```

Modify the following settings:

```bash
date.timezone = UTC
memory_limit=512M
upload_max_filesize=64M
post_max_size=120M
max_execution_time=120
```

Save and close the file, then restart Apache to apply the changes:

```bash
systemctl restart apache2
```

## Step 2 – Configure MariaDB Database

Log in to the MariaDB shell.

```bash
mysql
```

Create a database and user for SolidInvoice:

```bash
CREATE DATABASE solidinvoice;
CREATE USER solidinvoice@localhost IDENTIFIED BY 'securepassword';
```

Grant all the privileges to the SolidInvoice database.

```bash
GRANT ALL PRIVILEGES ON solidinvoice.* TO solidinvoice@localhost;
```

Flush the privileges and exit from the MariaDB shell.

```bash
FLUSH PRIVILEGES;
EXIT;
```

## Step 3 – Download and Install SolidInvoice

Download the latest version of SolidInvoice from the Sourceforge website.

```bash
wget https://master.dl.sourceforge.net/project/solidinvoice.mirror/2.2.6/SolidInvoice-2.2.6.zip
```

Unzip the downloaded file to the web root directory:

```bash
unzip SolidInvoice-2.2.6.zip -d /var/www/html/solidinvoice
```

Set the appropriate permissions:

```bash
chown -R www-data:www-data /var/www/html/solidinvoice
chmod -R 775 /var/www/html/solidinvoice
```

## Step 4 – Configure Apache

Create a new virtual host configuration for SolidInvoice:

```bash
nano /etc/apache2/sites-available/solidinvoice.conf
```

Add the following content:

```bash
<VirtualHost *:80>
 ServerName invoice.example.com
 DocumentRoot /var/www/html/solidinvoice/public
 <Directory //var/www/html/solidinvoice/public>
 AllowOverride All
 Order allow,deny
 Allow from All
 </Directory>
 ErrorLog /var/log/apache2/solidinvoice.error.log
 CustomLog /var/log/apache2/solidinvoice.access.log combined
</VirtualHost>
```

Save and close the file, then activate the new virtual host and enable the Apache rewrite module.

```bash
a2ensite solidinvoice.conf
a2enmod rewrite
```

Restart Apache to apply the changes:

```bash
systemctl restart apache2
```

## Step 5 – Set Up Cron Job

SolidInvoice requires a cron job to handle background tasks. Open the crontab file:

```bash
nano /etc/crontab
```

Add the following line:

```bash
* * * * * php /var/www/html/solidinvoice/bin/console cron:run -e prod -n
```

This cron job runs every minute and executes SolidInvoice’s background tasks.

## Step 6 – Complete the Installation Through the Web Interface

Open your web browser and navigate to **http://invoice.example.com.** You should see the SolidInvoice PHP requirement page.

![](https://www.atlantic.net/wp-content/uploads/2024/06/p1-8.png)
 Make sure all dependencies are installed, then click on **Next.** You will see the database setup page.

![](https://www.atlantic.net/wp-content/uploads/2024/06/p2-7.png)
 Define your database and click on **Next**. You will see the following page.

![](https://www.atlantic.net/wp-content/uploads/2024/06/p3-4.png)
 Click on **Next**. You will see the system settings page.

![](https://www.atlantic.net/wp-content/uploads/2024/06/p4-4.png)
 Define your admin user and password and click on **Next**. You will see the following page.

![](https://www.atlantic.net/wp-content/uploads/2024/06/p5-3.png)
 Click on **Log in** now. You will see the Solidinvoice login page.

![](https://www.atlantic.net/wp-content/uploads/2024/06/p6-2.png)
 Provide your admin credential and click on **Login**. You will see the following page.

![](https://www.atlantic.net/wp-content/uploads/2024/06/p7-2.png)
 Define your company name and click on **Create**. You will see the Solidinvoice dashboard.

![](https://www.atlantic.net/wp-content/uploads/2024/06/p8-1.png)

## Conclusion

Congratulations! You have successfully installed SolidInvoice on your Ubuntu 22.04 server. With SolidInvoice, you can efficiently manage your invoicing and billing processes, helping you to keep track of clients, quotes, and payments seamlessly. This installation provides a solid foundation for your business operations, ensuring you have a reliable and efficient system in place. Let’s try to deploy SolidInvoice on [dedicated server](https://www.atlantic.net/dedicated-server-hosting/) hosting from Atlantic.Net!
