UbuntuUbuntu Based

How To Install InvoicePlane on Ubuntu 24.04 LTS

Install InvoicePlane on Ubuntu 24.04

InvoicePlane is a free, open-source invoicing and billing software that has gained popularity among freelancers and small to medium-sized businesses. Its user-friendly interface, coupled with features like client management, quote generation, invoice creation, and payment tracking, makes it an invaluable tool for financial management.

This article aims to provide a comprehensive, step-by-step guide to installing InvoicePlane on Ubuntu 24.04. By following these instructions, you’ll be able to set up a fully functional invoicing system on your Ubuntu server, enabling you to streamline your billing processes and improve your business efficiency.

Prerequisites

Before we dive into the installation process, let’s ensure you have everything needed to successfully set up InvoicePlane on your Ubuntu 24.04 server.

System Requirements

To run InvoicePlane smoothly, your server should meet the following minimum specifications:

  • Ubuntu 24.04 LTS (Long Term Support) installed
  • 1 GB of RAM (2 GB recommended for optimal performance)
  • 10 GB of free disk space
  • A stable internet connection

User Requirements

You’ll need a non-root user account with sudo privileges. This approach enhances security by avoiding the use of the root account for day-to-day tasks.

Domain Name Setup

A valid domain name pointing to your server’s IP address is essential. This allows you to access InvoicePlane through a user-friendly URL rather than an IP address. If you haven’t set up a domain name yet, consider registering one through a domain registrar and configuring its DNS settings to point to your server’s IP address.

Software Requirements

InvoicePlane relies on the LAMP stack (Linux, Apache, MySQL/MariaDB, PHP). We’ll install these components as part of the setup process.

Step 1: Update the System

Before installing any new software, it’s crucial to ensure your system is up-to-date. This step helps prevent compatibility issues and ensures you have the latest security patches.

Open your terminal and run the following commands:

sudo apt update && sudo apt upgrade -y

This command updates the package lists and upgrades all installed packages to their latest versions. The ‘-y’ flag automatically answers “yes” to any prompts, streamlining the process.

Step 2: Install Apache Web Server

Apache is one of the most popular web servers and will host your InvoicePlane application. To install Apache, execute:

sudo apt install apache2 -y

After installation, verify that Apache is running:

sudo systemctl status apache2

You should see output indicating that Apache is active and running.

Next, configure your firewall to allow HTTP and HTTPS traffic:

sudo ufw allow 'Apache Full'

This command opens ports 80 (HTTP) and 443 (HTTPS) in your firewall, allowing web traffic to reach your server.

Step 3: Install PHP and Required Modules

InvoicePlane is built with PHP, so we need to install PHP and several necessary extensions. Run the following command:

sudo apt install php libapache2-mod-php php-mysql php-curl php-gd php-mbstring php-xml php-zip -y

This command installs PHP along with modules required by InvoicePlane, such as MySQL support, cURL, GD graphics library, multibyte string support, XML processing, and ZIP handling.

To verify the PHP installation, check its version:

php -v

You should see output displaying the installed PHP version.

Step 4: Install MySQL/MariaDB Database Server

InvoicePlane requires a database to store its data. We’ll use MySQL for this guide, but MariaDB is a compatible alternative.

Install MySQL server with:

sudo apt install mysql-server -y

After installation, it’s crucial to secure your MySQL server. Run the security script:

sudo mysql_secure_installation

Follow the prompts to set a root password, remove anonymous users, disallow root login remotely, and remove the test database.

Now, let’s create a database and user for InvoicePlane. Access the MySQL prompt:

sudo mysql

Then, execute the following SQL commands:

CREATE DATABASE invoiceplane;
CREATE USER 'invoiceplaneuser'@'localhost' IDENTIFIED BY 'securepassword';
GRANT ALL PRIVILEGES ON invoiceplane.* TO 'invoiceplaneuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Remember to replace ‘securepassword‘ with a strong, unique password of your choice.

Step 5: Download and Configure InvoicePlane

Now that we have our LAMP stack set up, let’s download and configure InvoicePlane.

Downloading InvoicePlane

First, navigate to your home directory and download the latest version of InvoicePlane:

cd ~
wget https://github.com/InvoicePlane/InvoicePlane/releases/download/v1.6.1/v1.6.1.zip

Extracting Files

Unzip the downloaded file and move it to the web root directory:

sudo unzip v1.6.1.zip -d /var/www/html/
sudo mv /var/www/html/v1.6.1.zip /var/www/html/invoiceplane

Configuring Permissions

Set the correct ownership and permissions for security:

sudo chown -R www-data:www-data /var/www/html/invoiceplane/
sudo chmod -R 755 /var/www/html/invoiceplane/

Editing Configuration File

Rename the example configuration file and edit it with your database details:

sudo cp /var/www/html/invoiceplane/ipconfig.php.example /var/www/html/invoiceplane/ipconfig.php
sudo nano /var/www/html/invoiceplane/ipconfig.php

Update the database settings with the credentials you created earlier.

Step 6: Configure Apache Virtual Host

Creating a virtual host for InvoicePlane allows Apache to serve your application correctly.

Creating a Virtual Host File

Create a new configuration file:

sudo nano /etc/apache2/sites-available/invoiceplane.conf

Adding Configuration Details

Add the following content to the file, replacing ‘example.com’ with your domain name:

<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/html/invoiceplane/public

    <Directory /var/www/html/invoiceplane/public>
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/invoiceplane_error.log
    CustomLog ${APACHE_LOG_DIR}/invoiceplane_access.log combined
</VirtualHost>

Enabling the Site and Rewrite Module

Enable the new site configuration and the Apache rewrite module:

sudo a2ensite invoiceplane.conf
sudo a2enmod rewrite
sudo systemctl restart apache2

Step 7: Complete Web-Based Installation

With all components in place, it’s time to complete the installation through InvoicePlane’s web interface.

Accessing the Installation Wizard

Open a web browser and navigate to your domain (e.g., http://example.com). You should see the InvoicePlane setup wizard.

Install InvoicePlane on Ubuntu 24.04 LTS

Step-by-Step Wizard Instructions

1. Choose your preferred language for the installation process.
2. Enter the database credentials you configured earlier.
3. Set up your application settings, including your email address and admin account credentials.
4. Review the settings and complete the installation.

Step 8: Post Installation Tasks

After successfully installing InvoicePlane, there are a few important tasks to complete.

Securing Your Installation

Remove the setup directory to prevent unauthorized access:

sudo rm -rf /var/www/html/invoiceplane/setup/

Enabling HTTPS with Let’s Encrypt SSL Certificate (Optional)

For enhanced security, consider setting up HTTPS:

sudo apt install certbot python3-certbot-apache -y
sudo certbot --apache -d example.com -d www.example.com

Follow the prompts to obtain and configure your SSL certificate.

Testing Installation

Log in to your InvoicePlane dashboard using the admin credentials you set during the web-based installation. Verify that you can access all features and that everything is functioning correctly.

Troubleshooting Common Issues

Despite careful installation, you might encounter some issues. Here are solutions to common problems:

1. Permission errors: If you encounter “Permission denied” errors, double-check the ownership and permissions of your InvoicePlane directory:

sudo chown -R www-data:www-data /var/www/html/invoiceplane/
sudo chmod -R 755 /var/www/html/invoiceplane/

2. Database connection issues: Ensure that the database credentials in your ‘ipconfig.php’ file are correct. You can test the connection manually using:

mysql -u invoiceplaneuser -p invoiceplane

3. Apache misconfiguration: If you’re seeing a “404 Not Found” error, check your virtual host configuration file for typos or incorrect paths.

4. PHP module missing: If InvoicePlane complains about a missing PHP module, install it using:

sudo apt install php-[module_name]

Replace [module_name] with the required module (e.g., php-gd).

Congratulations! You have successfully installed InvoicePlane. Thanks for using this tutorial for installing the InvoicePlane on Ubuntu 24.04 LTS system. For additional help or useful information, we recommend you check the official InvoicePlane website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button