FOSSBilling is a fork of BoxBilling. It is a self-hosted billing web software with ticket support and knowledgebase mainly designed to be easy for clients and sellers of web hosting niches. However, anyone related to online business or freelancing can use this software. It is suitable for freelancers, small, medium or even large businesses. FOSSBilling comes with Apache 2.0 license, which means it is free software and you are allowed to do any modification for your business. As we have mentioned before, Apache 2.0 license and GNU GPL 3.0 license are similar. GNU GPL is a copyleft license.
It is quite easy to install FossBilling since it is PHP MySQL-based web app and the steps are essentially like that of installing WordPress.

Steps for Installing FossBilling on Ubuntu
To complete this guide, you will need a Ubuntu server with the hostname something like fossbilling-server
, a non-root user with sudo/root administrator privileges (See this guide). You need a sub-domain pointed to the server IP address.
---
Install MariaDB
Install the MariaDB server. When prompted, input y and press ENTER to proceed:
1 2 3 4 | apt update -y && apt upgrade -y sudo apt install mariadb-server # check sudo systemctl status mariadb |
Run the secure installation script:
1 | sudo mariadb-secure-installation |
These are the questions and answers:
Switch local authentication to unix_socket? N
Set up MariaDB root password? Y
Remove the default anonymous user? Y
Disable remote login for the root user? Y
Remove the default database test? Y
Reload table privileges and apply changes? Y
Now login to MySQL server and create a database and user:
1 2 3 4 5 6 | mysql -u root -p CREATE DATABASE billingdb; CREATE USER billingadmin@localhost IDENTIFIED BY ‘write-your-password-here’; GRANT ALL ON billingdb.* TO billingdb@localhost WITH GRANT OPTION; FLUSH PRIVILEGES; QUIT |
Install PHP and Apache2
1 2 3 4 5 6 7 8 9 10 11 | sudo add-apt-repository ppa:ondrej/apache2 # Press [ ENTER ] sudo apt update sudo add-apt-repository ppa:ondrej/php # Press [ ENTER ] sudo apt update apt-get -y install apache2 apache2-doc apache2-utils sudo a2enmod rewrite sudo systemctl restart apache2 sudo apt install php libapache2-mod-php php-mysql php-curl php -v |
Open apache2.conf
:
1 | sudo nano /etc/apache2/apache2.conf |
Find AllowOverride
and set to none
:
1 | AllowOverride None |
This is an example of /var/www
location:
1 2 3 4 5 6 | /etc/apache2/apache2.conf <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> |
Restart Apache:
1 | sudo systemctl restart apache2 |
Install FossBilling
Change directory to /var/www/html
and run the commands.
1 2 3 4 5 6 | cd /var/www/html curl https://fossbilling.org/downloads/stable -L --output FOSSBilling.zip apt install unzip -y unzip FOSSBilling.zip sudo chown -R www-data:www-data /var/www/html rm FOSSBilling.zip |
Now, you need to configure the Apache virtual host and install certbot. You can follow this guide for production server.
Open your web browser and visit the subdomain name of your FosssBilling installation. The FOSSBilling installer should now check and verify your system details. Click Next to continue and complete the wizard. This guide is written to match the points mentioned by the official guide:
1 | https://fossbilling.org/docs/getting-started/apache |
This guide is using Apache’s mod prefork
module. If you want, you can switch to mpm_event
(and PHP-FPM) by following this guide. I do not know why you’ll need mpm_event
(and PHP-FPM) for billing web software but I can see that zillion of sites have written guides with PHP-FPM (either with Nginx or Apache). mod_php
(with mod prefork
) is more stable and secure.