What is FossBilling?

FossBilling is a free, open-source billing and client management system built for web hosting providers, freelancers, and service-based businesses. It offers tools for invoicing, client registration, support ticketing, domain integration, and payment processing. FossBilling is a modern fork and continuation of the now-abandoned BoxBilling project, with active development and community contributions.

Running FossBilling with Nginx on Ubuntu 24.04 provides a lightweight, fast, and secure solution for managing clients, services, and payments in a self-hosted environment.


Key Features of FossBilling

  • Client Management: Register and manage clients, send messages, and view history
  • Billing and Invoicing: Automate invoice generation, due reminders, and payment processing
  • Product Management: Sell web hosting, domains, and other digital or physical services
  • Support Tickets: Built-in ticket system with admin responses and client communication
  • Domain Integration: Compatible with registrars like Namecheap, ResellerClub, and more
  • Payment Gateways: Supports PayPal, Stripe, CoinGate, manual payments, and more
  • Multilingual Support: Interface available in multiple languages
  • Custom Themes: Admin and client area theming system
  • Modular Extensions: Easily add plugins or create your own modules

Why Use FossBilling with Nginx on Ubuntu 24.04?

Ubuntu 24.04 is an ideal platform for hosting FossBilling due to:

  • Long-Term Support through 2029
  • Access to PHP 8.2 or 8.3, required for FossBilling
  • Improved security defaults and systemd integration
  • Fast and resource-efficient performance with Nginx and PHP-FPM
  • Compatibility with MariaDB/MySQL, modern SSL, and caching tools

System Requirements

ComponentMinimum Requirement
OSUbuntu 24.04 LTS (64-bit)
Web ServerNginx (or Apache)
PHP VersionPHP 8.1 or higher (8.2+ recommended)
PHP Extensionspdo, curl, mbstring, openssl, json, xml, zip, gd, fileinfo
DatabaseMySQL or MariaDB
Memory512 MB (1 GB+ recommended)
Disk Space500 MB minimum

Common Use Cases

  • Web hosting companies managing domain and hosting subscriptions
  • Freelancers offering digital services or licenses
  • Resellers who need automated billing and customer management
  • Startups looking for an alternative to paid SaaS billing platforms
  • Agencies managing clients and subscriptions internally

Advantages of FossBilling

  • Free and open-source (MIT License)
  • No recurring license costs
  • Fully customizable backend and frontend
  • User-friendly interface for admins and clients
  • Active community and regular updates
  • Easy integration with external systems via API

Nginx-Specific Benefits

  • Faster performance with lower memory footprint compared to Apache
  • Better concurrency handling for high-traffic billing portals
  • Native compatibility with PHP-FPM
  • Simplified reverse proxy or SSL offloading setups
  • Easy integration with Let’s Encrypt SSL certificates

Security Best Practices

  • Enable HTTPS using a valid SSL certificate (Let’s Encrypt or commercial)
  • Move the admin panel to a custom URL path or restrict by IP
  • Regularly update FossBilling and PHP extensions
  • Set correct file and folder permissions (avoid 777)
  • Use UFW or iptables to restrict external access to the server
  • Enable fail2ban to prevent brute-force login attempts
  • Perform regular backups of the database and uploaded files

FossBilling vs Other Billing Systems

FeatureFossBillingWHMCSClientExecBoxBilling (legacy)
LicenseFree (MIT)Paid (commercial)PaidAbandoned
Open SourceYesNoPartiallyYes
Domain & Hosting SupportYesYesYesYes
Payment Gateways10+ integrations80+ integrationsLimitedFew
CustomizabilityHighLimitedModerateLimited
Community SupportActivePaid supportPaid supportNone
Ideal ForStartups, devsEnterprisesMid-size hostsNot recommended

FossBilling with Nginx on Ubuntu 24.04 is a powerful and flexible solution for anyone looking to run a self-hosted billing and client management platform. It combines the reliability of Ubuntu, the speed of Nginx, and the freedom of open-source software to provide an excellent alternative to expensive commercial systems.

Whether you’re a hosting provider, developer, or digital service agency, FossBilling gives you complete control over your billing workflow, customer data, and platform customization—without recurring fees or vendor lock-in.


Step 1: Create a VPS on Shape.Host

Before you begin, you need a server to host FossBilling. Here’s how to create one using Shape.Host:

Log in to https://shape.host.

Click “Create”, then choose “Instance”.

Shape.host Resources dashboard with Create > Instance highlighted.

Select a location close to you or your audience.

Shape.host instance form with the data center location selector highlighted.

Choose Ubuntu 24.04 (64-bit) as the operating system.

Pick a plan with at least 2 CPUs, 4 GB RAM, and 20 GB SSD (recommended for FossBilling).

Shape.host instance form with the operating system image selector highlighted.

Click “Create Instance”.

Shape.host instance form with the Create Instance button highlighted.

Once your instance is ready, note the IP address listed in the Resources section — you’ll need it to connect.

Shape.host Resources dashboard with the server IP address highlighted.

Step 2: Connect to Your Server

Open a terminal and connect using SSH:

ssh root@your_server_ip

Replace your_server_ip with the IP you got from Shape.Host.

If you’re on Windows, use a tool like PuTTY to connect.


Step 3: Install and Start Nginx Web Server

apt update

This refreshes the list of available packages.

Terminal showing APT package management commands and output.
apt install nginx

Installs the Nginx web server.

Terminal showing APT package management commands and output.
systemctl start nginx

Starts Nginx immediately.

systemctl enable nginx

Ensures Nginx starts automatically when the server boots.

systemctl status nginx

Displays Nginx’s current status. It should say “active (running)”.

Terminal showing systemd service management commands or output.

Step 4: Install MariaDB (MySQL-Compatible Database)

apt install mariadb-server

Installs MariaDB, a popular database system used by many PHP apps.

Terminal showing APT package management commands and output.
systemctl start mariadb
systemctl enable mariadb
systemctl status mariadb

Starts MariaDB and ensures it runs on boot.

Terminal showing systemd service management commands or output.

Step 5: Set Up the FossBilling Database

mariadb

Opens the MariaDB shell as root. Run the following commands inside:

CREATE DATABASE fossdb;

Creates a new database named fossdb.

CREATE USER fossdbuser@localhost IDENTIFIED BY 'type_new_password';

Creates a new database user. Replace 'type_new_password' with a secure password.

GRANT ALL ON fossdb.* TO fossdbuser@localhost WITH GRANT OPTION;

Gives the user full access to the fossdb database.

FLUSH PRIVILEGES;
exit

Saves the changes and exits the MariaDB prompt.

Terminal showing SQL database and user configuration commands.

Step 6: Install PHP and Dependencies

apt install software-properties-common ca-certificates lsb-release apt-transport-https
add-apt-repository ppa:ondrej/php

These commands prepare your system to install PHP 8.3 from a trusted external repository.

Terminal showing APT package management commands and output.
Terminal showing APT package management commands and output.
php -V

This checks the current PHP version.


Step 7: Install PHP 8.3 and Modules Needed by FossBilling

apt install php8.3-fpm php8.3-intl php8.3-mysql php8.3-curl php8.3-cli php8.3-zip php8.3-common php8.3-mbstring php8.3-xml
Terminal showing APT package management commands and output.

Installs PHP 8.3 and modules that FossBilling requires to work.

systemctl start php8.3-fpm
systemctl enable php8.3-fpm

Starts PHP-FPM (FastCGI Process Manager) and enables it at boot.

Terminal showing systemd service management commands or output.

Step 8: Download FossBilling

cd /tmp
apt install curl unzip

Moves to the temporary directory and installs tools to download and extract files.

Terminal showing APT package management commands and output.
curl https://fossbilling.org/downloads/stable -L --output FOSSBilling.zip

Downloads the latest FossBilling release.

Terminal showing curl commands or output during Download FossBilling.
mkdir -p /var/www/fossbilling
unzip FOSSBilling.zip -d /var/www/fossbilling

Creates a web folder and extracts the files into it.

chown -R www-data:www-data /var/www/fossbilling

Gives ownership of the FossBilling folder to the web server user (www-data).


Step 9: Configure Nginx for FossBilling

nano /etc/nginx/sites-available/fossbilling.conf

Creates a new site configuration file. Paste this (change domain name accordingly):

server {
    listen 80;

    set $root_path '/var/www/fossbilling';
    server_name fossbilling.example.com;

    index index.html index.htm index.php;
    root $root_path;
    try_files $uri $uri/ @rewrite;
    sendfile off;

    include /etc/nginx/mime.types;

    location ~* .(ini|sh|inc|bak|twig|sql)$ {
        return 404;
    }

    location ~ /\.(?!well-known\/) {
        return 404;
    }

    location ~* /uploads/.*\.php$ {
        return 404;
    }

    location ~* /data/ {
        return 404;
    }

    location @rewrite {
        rewrite ^/page/(.*)$ /index.php?_url=/custompages/$1;
        rewrite ^/(.*)$ /index.php?_url=/$1;
    }

    location ~ \.php {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/run/php/php8.2-fpm.sock;
        fastcgi_param PATH_INFO       $fastcgi_path_info;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors on;
        include fastcgi_params;
    }

    location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
        root $root_path;
        expires off;
    }
}

Enable the site and restart Nginx:

Terminal showing the GNU nano editor and configuration text.
ln -s /etc/nginx/sites-available/fossbilling.conf /etc/nginx/sites-enabled/
systemctl restart nginx
Terminal showing systemd service management commands or output.

Step 10: Install Additional PHP Modules

These are needed for image handling:

apt install php8.3-gd php8.3-imagick php8.3-bz2 -y
apt install imagemagick -y

Restart PHP and Nginx to apply all changes:

systemctl restart php8.3-fpm
systemctl restart nginx

Step 11: Secure the Installation

After completing the web-based setup in your browser:

rm -rfv /var/www/fossbilling/install

Removes the installer for security.

chmod 644 /var/www/fossbilling/config.php

Restricts the configuration file’s permissions.


Step 12: Set Up Cron Jobs

FossBilling uses cron to run automatic tasks like sending invoices.

crontab -u www-data -e

Paste the cron job recommended inside the FossBilling admin panel.

Terminal showing file ownership or permission commands.

Terminal showing the GNU nano editor and configuration text.

✅ Installation Complete!

Now go to:

http://your-server-ip

Or:

http://fossbilling.example.com

Follow the setup wizard in your browser to finish configuration.

FOSSBilling installer welcome screen with license acceptance and setup steps.

Click Next to continue.

FOSSBilling installation requirements checklist.

Type in the database name and user account created above and click Next.

FOSSBilling database configuration form.

Create an administrator account and click Next.

FOSSBilling account creation form.

FOSSBilling account creation form.

Finally, run the commands below to remove the installation directory and configure a cron job. Then click Finish.

sudo rm -rf /var/www/fossbilling/install
sudo chmod 0644 /var/www/fossbilling/config.php
sudo crontab -u www-data -e
*/5 * * * * php /var/www/fossbilling/cron.php
FOSSBilling installation completion screen and post-installation checklist.

Login to the dashboard using the credentials created above.

FOSSBilling sign-in form.
FOSSBilling dashboard.

With Shape.Host, you get:

  • Fast cloud instances with Linux SSD VPS
  • Full root access
  • Easy scalability
  • Perfect environment for FossBilling and other PHP apps

Launch your FossBilling instance today at https://shape.host