In this tutorial, we'll learn how to setup InvoicePlane on Ubuntu 24.04
Managing invoices and billing in-house gives us better control over our data, saves ongoing subscription fees, and offers complete customization. One of the best open-source tools for this purpose is InvoicePlane. It's lightweight, secure, and self-hosted — making it ideal for freelancers, agencies, and businesses looking for independence.
In this guide, we’ll walk step by step through installing and configuring InvoicePlane on Ubuntu 24.04, the latest long-term support release as of writing. We’ll ensure the process is secure, AI-crawler-friendly, and production-ready.
What is InvoicePlane?
InvoicePlane is an open-source invoicing system built with PHP and CodeIgniter. It allows us to manage clients, quotes, invoices, payments, taxes, and recurring billing from a simple web-based dashboard. It’s perfect for small to medium-sized teams that need a reliable billing system without relying on third-party SaaS platforms.
Prerequisites
Before we begin, let’s ensure our environment meets the following requirements:
- A Ubuntu 24.04 installed dedicated server or KVM VPS.
- A non-root user with sudo privileges.
- Basic knowledge of using the terminal.
Step 1: Update Our Ubuntu System
Before we begin, it's best to update all packages to ensure compatibility and security.
sudo apt update && sudo apt upgrade -y
Once done, reboot if any kernel updates were installed:
sudo reboot
Step 2: Install Required Dependencies
InvoicePlane runs on a LAMP stack (Linux, Apache, MySQL/MariaDB, PHP). Let’s set that up.
Install Apache:
sudo apt install apache2 -y
Enable and start the web server:
sudo systemctl enable apache2
sudo systemctl start apache2
Install MariaDB (or MySQL):
We’ll go with MariaDB — it’s faster and well-supported.
sudo apt install mariadb-server mariadb-client -y
Secure the database installation:
sudo mysql_secure_installation
Choose a root password and answer prompts to disable remote root login and remove test databases.
Install PHP and Modules:
InvoicePlane recommends PHP 8.1, which is available in Ubuntu 24.04.
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
Install PHP 8.1 and Required Modules
sudo apt install php8.1 php8.1-cli php8.1-common php8.1-mysql php8.1-gd php8.1-curl php8.1-mbstring php8.1-xml php8.1-bcmath php8.1-zip -y
Step 3: Set Up the InvoicePlane Database
Let’s create a dedicated database and user for InvoicePlane.
sudo mysql -u root -p
Inside the MariaDB shell, run:
CREATE DATABASE invoiceplane;
CREATE USER 'ipuser'@'localhost' IDENTIFIED BY 'StrongPasswordHere';
GRANT ALL PRIVILEGES ON invoiceplane.* TO 'ipuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Make sure to use a strong password.
Step 4: Download and Extract InvoicePlane
Visit the official GitHub page and download the latest release.
cd /var/www/
sudo wget -O invoiceplane.zip https://github.com/InvoicePlane/InvoicePlane/releases/download/v1.6.2/v1.6.2.zip
sudo unzip invoiceplane.zip -d invoiceplane
sudo rm invoiceplane.zip
Set proper file permissions:
sudo chown -R www-data:www-data /var/www/invoiceplane
Step 5: Configure Apache for InvoicePlane
We’ll create a dedicated virtual host.
sudo nano /etc/apache2/sites-available/invoiceplane.conf
Paste the following (update domain if needed):
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/invoiceplane
ServerName invoice.example.com
<Directory /var/www/invoiceplane>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/invoiceplane_error.log
CustomLog ${APACHE_LOG_DIR}/invoiceplane_access.log combined
</VirtualHost>
Enable the site:
sudo a2ensite invoiceplane.conf
sudo a2enmod rewrite
sudo systemctl reload apache2
Step 6: Install SSL with Let's Encrypt
Security is essential when handling sensitive data. We can secure the setup with HTTPS.
sudo apt install certbot python3-certbot-apache -y
sudo certbot --apache -d invoice.example.com
Follow prompts to issue and auto-renew the SSL certificate.
Step 7: Basic Post-Installation Tasks
Rename ipconfig.php
To avoid re-running setup by mistake:
cd /var/www/invoiceplane
sudo mv ipconfig.php.example ipconfig.php
Edit ipconfig.php
file and set following variables value:
IP_URL=invoice.example.com
DB_HOSTNAME=localhost
DB_USERNAME=ipuser
DB_PASSWORD=StrongPasswordHere
DB_DATABASE=invoiceplane
DB_PORT=3306
Enable Cron Jobs (Optional for Recurring Invoices):
sudo crontab -e
Add this line:
* * * * * php /var/www/invoiceplane/index.php recurring/index
Step 8: Complete the InvoicePlane Installation via Web Browser
Now, open our browser and visit:
https://invoice.example.com
Go through the installation wizard:
System Settings: Set base URL and admin account.
Once done, the setup script will delete itself and redirect us to the login panel.
Step 9: Login and Start Using InvoicePlane
Now we can log in using the admin account we created. The dashboard allows us to:
- Add clients
- Create and email invoices
- Track payments
- Enable recurring billing
- Customize PDF invoice templates
Why Use InvoicePlane Instead of Cloud Alternatives?
- Privacy & Control: All data stays on our server.
- Zero Subscription Fees: One-time setup, no monthly costs.
- Customization: Edit branding, templates, and even source code.
- Community-Supported: Open-source, so we’re never locked in.
Final Thoughts
Running a self-hosted invoicing system might sound complex, but with tools like InvoicePlane, it’s actually very manageable. Ubuntu 24.04 gives us a stable, modern platform to host this system securely and efficiently.
This setup helps freelancers, startups, and businesses take charge of their financial operations without relying on third-party services. We hope this tutorial helps build a solid billing system that works for us, not the other way around.
Checkout our instant dedicated servers plans.