Come hang with us on Discord and chat directly with the team!Discordtop-bar-close-icon

2024-10-10

How to Install InvoicePlane on Ubuntu Latest

tutorials
img

Introduction

InvoicePlane is a free, open-source, self-hosted application designed for managing invoices, clients, and payments. This guide will walk you through the installation process of InvoicePlane on the latest version of Ubuntu.

Prerequisites

Before starting, ensure your server meets the following requirements:

  • A server running the latest version of Ubuntu.
  • A LAMP (Linux, Apache, MySQL, PHP) stack installed on your server.
  • Access to a terminal with root privileges.

Step 1: Update Your System

Begin by updating your package list and upgrading all system packages to their latest versions. Open your terminal and execute these commands:

sudo apt update
sudo apt upgrade -y

Step 2: Install Required PHP Modules

InvoicePlane requires specific PHP modules to function correctly. Install these modules using the following command:

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

Step 3: Download InvoicePlane

Download the latest version of InvoicePlane from the official website or use wget to download directly to your server:

cd /var/www/html
wget https://github.com/InvoicePlane/InvoicePlane/releases/download/v1.5.11/InvoicePlane-1.5.11.zip

Extract the downloaded file:

sudo apt install unzip
unzip InvoicePlane-1.5.11.zip

Rename the extracted directory for convenience:

mv InvoicePlane-1.5.11 invoiceplane

Step 4: Set Permissions

Set the correct permissions to ensure InvoicePlane can write to the necessary directories:

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

Step 5: Configure Apache

Create a new Apache configuration file for InvoicePlane:

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

Add the following configuration:

ServerAdmin admin@example.com DocumentRoot /var/www/html/invoiceplane ServerName your_domain.com ServerAlias www.your_domain.com Options Indexes FollowSymLinks AllowOverride All Require all granted ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined

Enable the new configuration and rewrite module, then restart Apache:

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

Step 6: Set Up the Database

Log in to your MySQL shell and create a database for InvoicePlane:

mysql -u root -p

Enter the following commands in the MySQL shell:

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

Step 7: Complete the Installation

Open your web browser and navigate to your server’s domain (e.g., http://your_domain.com). Follow the on-screen instructions to complete the InvoicePlane installation, entering your database details when prompted.

Conclusion

You have successfully installed InvoicePlane on the latest version of Ubuntu. You can now use InvoicePlane to manage your invoices and client interactions efficiently.