How to Install InvoicePlane on Ubuntu 20.04 in Minutes
If you’ve been looking for a free, self‑hosted invoicing tool that won’t eat your bandwidth or require a subscription, InvoicePlane is the answer. In this post I’ll walk you through getting it up and running on an Ubuntu 20.04 server without tripping over PHP version quirks or missing modules.
1. Get Your Server Ready
First thing’s first – make sure you’re running a fresh install of Ubuntu 20.04, with root access or sudo privileges. The recipe below assumes you’ll use Apache, MySQL, and the default PHP 7.4 stack that ships with Ubuntu.
sudo apt update && sudo apt upgrade -y
sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql \
php-xml php-mbstring php-curl php-gd php-zip php-intl -y
Why all those PHP extensions? InvoicePlane relies on XML for its API, mbstring for handling UTF‑8 text, curl to make HTTP requests (think payment gateways), gd for optional image support, zip for backup utilities, and intl for locale‐aware formatting. Skip any of these and you’ll hit a wall later.
2. Create the InvoicePlane Database
Log into MySQL and give it a tidy little user:
sudo mysql -u root -p
CREATE DATABASE invoiceplane CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON invoiceplane.* TO 'invoiceuser'@'localhost'
IDENTIFIED BY 'YourStrongPassword';
FLUSH PRIVILEGES;
EXIT;
I’ve seen people set the password to “password” and then forget it, so pick something that won’t be your first‑try guess.
3. Pull InvoicePlane from GitHub
The easiest way is to clone the repo into Apache’s webroot:
cd /var/www/ sudo git clone https://github.com/InvoicePlane/invoicetools.git invoiceplane
If you don’t have git, install it first: sudo apt install git.
Change ownership so your user can edit files, but keep the web server’s eyes on them:
sudo chown -R $USER:$USER invoiceplane sudo chmod -R 775 invoiceplane
4. Configure Apache
Create a virtual host file for InvoicePlane:
sudo nano /etc/apache2/sites-available/invoiceplane.conf
Paste in:
<VirtualHost *:80>
ServerName invoiced.local
DocumentRoot /var/www/invoiceplane/public
<Directory /var/www/invoiceplane/public>
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 and rewrite module, then reload Apache:
sudo a2ensite invoiceplane.conf sudo a2enmod rewrite sudo systemctl restart apache2
I once tried to hit http://localhost after creating this file and got a “404 Not Found” – that was because I forgot the trailing /public. Small oversight, big headache.
5. Point Your Browser and Finish the Setup
Open a browser and go to http://invoiced.local. The installation wizard will pop up. Fill in:
- Database host: localhost
- Database name: invoiceplane
- Username: invoiceuser
- Password: your password from earlier
Click Install and let the script create tables, seed some defaults, and set up an admin account.
When it asks for a base URL, use http://invoiced.local/. If you’re running this on a real domain, replace that accordingly. The wizard will also suggest turning off file editing in production – go ahead with that if you can’t foresee a reason to tweak PHP files later.
6. Tighten Security (Optional but Recommended)
If you plan to expose this server to the internet:
1. Set up HTTPS: Use Let’s Encrypt with Certbot, e.g.:
sudo apt install certbot python3-certbot-apache -y sudo certbot --apache -d invoiced.yourdomain.com
2. Restrict database user: Keep the invoiceuser limited to localhost only – already done.
3. Keep the server updated: sudo apt update && sudo apt upgrade -y.
7. Common Pitfalls and Quick Fixes
- “Table does not exist” errors after the wizard? That usually means PHP couldn’t connect to MySQL because you used the wrong password or database name. Double‑check the credentials.
- Missing vendor folder (you’ll see 500 Internal Server Error)? You need Composer. Install it and run:
sudo apt install composer -y cd /var/www/invoiceplane composer install --no-dev
I ran into this after cloning on a fresh machine; the repo’s dependencies weren’t bundled.
- File permission errors when trying to create uploads or backups? Make sure /var/www/invoiceplane/uploads and /var/www/invoiceplane/backups are writable by Apache:
sudo mkdir -p /var/www/invoiceplane/uploads /var/www/invoiceplane/backups sudo chown -R www-data:www-data /var/www/invoiceplane/uploads /var/www/invoiceplane/backups
8. You’re Done!
Congratulations, you now have a self‑hosted invoicing solution that runs on Ubuntu 20.04. Log in with the admin account you created during installation and start adding clients, invoices, and payments. Feel free to tweak settings like currency, tax rates, or email templates.