Introduction

HestiaCP is an open-source web hosting control panel that simplifies server and website management. MariaDB is a powerful open-source database system compatible with MySQL, and FOSSBilling is an open-source billing system for hosting businesses. This guide will walk you through setting up HestiaCP, MariaDB, disabling HestiaCP’s built-in Nginx (if using Nginx Proxy Manager), and installing FOSSBilling on Ubuntu 24.04.


Step 1: Install HestiaCP

If you haven’t installed HestiaCP yet, follow these steps:

  1. Download the HestiaCP installation script:
    wget https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install.sh
  2. Run the installation script:
    sudo bash hst-install.sh --force
  3. Follow the on-screen instructions and complete the setup.

Recommended Selection for HestiaCP Installation

  1. NGINX Web / Proxy Server → ❌ Skip (Because Nginx Proxy Manager is already installed)
  2. Apache Web Server (as backend) → ✅ Keep (Required for hosting dynamic websites)
  3. PHP-FPM Application Server → ✅ Keep (Required for PHP-based applications like FOSSBilling)
  4. Bind DNS Server → ❌ Skip (Since Cloudflare is handling DNS)
  5. Exim Mail Server + ClamAV + SpamAssassin → ❌ Skip (You will use Mailcow later for email)
  6. Dovecot POP3/IMAP Server → ❌ Skip (No need, as Mailcow will handle email)
  7. MariaDB Database Server → ✅ Keep (Required for databases)
  8. Vsftpd FTP Server → ❌ Skip (Unless you need FTP access, which is rare)
  9. Firewall (iptables) + Fail2Ban Access Monitor → ✅ Keep (Important for security)

Final Installation Command (Custom Selection)

Run the following command to disable unwanted components during installation:

sudo bash hst-install.sh --nginx no --bind no --exim no --dovecot no --clamav no --spamassassin no --vsftpd no

This ensures that:

  • HestiaCP does not install NGINX, DNS (Bind), Mail Server (Exim, Dovecot, ClamAV, SpamAssassin), or FTP
  • It only installs Apache, PHP, MariaDB, and security tools

Next Steps After Installation

After HestiaCP is installed:

  1. Disable HestiaCP’s Nginx (if it is still active)
    sudo systemctl stop nginx

    sudo systemctl disable nginx

  2. Make sure MariaDB is running
    sudo systemctl start mariadb

    sudo systemctl enable mariadb

  3. Access HestiaCP GUI via
    https://your-vps-ip:8083

    and create your domains, users, and databases before proceeding with FOSSBilling installation.

After installation, access HestiaCP at:

https://your-server-ip:8083

Log in using your admin credentials.


Step 2: Disable HestiaCP’s Nginx (if using Nginx Proxy Manager)

If you have installed Nginx Proxy Manager (NPM) separately, you need to disable HestiaCP’s built-in Nginx to avoid conflicts.

Method 1: Using GUI

  1. Log in to HestiaCP.
  2. Navigate to Server Settings > Web Server.
  3. Disable Nginx Service.
  4. Click Save and Apply Changes.

Method 2: Using Terminal

  1. Stop and disable Nginx in HestiaCP:
    sudo systemctl stop nginx
    sudo systemctl disable nginx
  2. Ensure Nginx Proxy Manager is managing your domains.

Step 3: Verify MariaDB Installation

MariaDB should be installed with HestiaCP. To confirm:

  1. Check if MariaDB is running:
    sudo systemctl status mariadb
  2. If MariaDB is not running, start it:
    sudo systemctl start mariadb
  3. Secure MariaDB installation:
    sudo mysql_secure_installation
    • Enter current password for root : (this requires to change setting) then follow screen instruction but change following mentioned below
    • Set a strong root password.
    • Remove anonymous users.
    • Disallow remote root login.
    • Remove the test database.

Step 4: Create a Database for FOSSBilling

  1. Log in to HestiaCP.
  2. Navigate to Database > Add Database.
  3. Enter the following:
    • Database Name: fossbilling_db
    • Username: fossbilling_user
    • Password: your_secure_password
  4. Click Create and note down the credentials.

Alternatively, using CLI:

sudo mysql -u root -p
CREATE DATABASE fossbilling_db;
GRANT ALL PRIVILEGES ON fossbilling_db.* TO 'fossbilling_user'@'localhost' IDENTIFIED BY 'your_secure_password';
FLUSH PRIVILEGES;
EXIT;

Step 5: Install FOSSBilling

  1. Navigate to your web directory:
    cd /home/your_user/web/billing.gethostpro.com/public_html
  2. Download FOSSBilling:
    sudo wget https://github.com/FOSSBilling/FOSSBilling/releases/latest/download/FOSSBilling.zip
  3. Install unzip if not installed:
    sudo apt install unzip -y
  4. Unzip FOSSBilling:
    sudo unzip FOSSBilling.zip -d .
  5. Set correct permissions:
    sudo chown -R your_user:your_user .
    sudo chmod -R 755 .
  6. Restart Nginx and PHP:
    sudo systemctl restart nginx
    sudo systemctl restart php8.1-fpm
  7. Open your browser and visit:
    http://billing.gethostpro.com/install
  8. Follow the on-screen installation steps:
    • Enter Database Name, Username, Password.
    • Complete the setup and log in.

Conclusion

You have successfully: ✅ Installed HestiaCP & MariaDB ✅ Disabled HestiaCP’s Nginx (if using Nginx Proxy Manager) ✅ Installed FOSSBilling and set up the database

Your billing system is now live and ready for customization!

About EngineerHow

EngineerHow provides in-depth tutorials on server management, web hosting, and open-source software. Follow us for step-by-step guides to simplify complex IT setups!