How to Install Blesta on Your Hosting or VPS

Blesta is a self-hosted billing and client management platform for hosting companies and agencies. Its licensing model stands out because it offers both monthly and owned licence options. This guide covers the current requirements from Blesta's installation documentation, plus the installation process on a TekLan shared hosting account and a TekLan VPS.

Licensing

Blesta offers monthly and owned licences. The official pricing page currently lists monthly branded, monthly unbranded, monthly flex, owned branded, owned unbranded, owned flex, and lifetime owned options. Prices and support renewal terms can change, so check Blesta's pricing page before ordering.

Blesta.club is our preferred reseller for Blesta licences because it is focused on the Blesta ecosystem and is a useful place to start when you also need modules, plugins, or practical Blesta-specific add-ons. Check the licence terms at checkout so you know exactly what support and update period is included.

Billing software processes payment data and holds client credentials. It should run in an isolated environment, not on the same account or server as the websites it manages. On shared hosting, use a completely separate account from your other sites. For production deployments, a VPS or dedicated server is the right choice.

System Requirements

PHP

Blesta's current installation documentation lists ionCube Loaders as a required PHP extension. Supported PHP versions in the current documentation are 7.2, 7.3, 7.4, 8.1, 8.2, and 8.3, with PHP 8.2 recommended. For a new install, avoid older PHP versions unless you have a specific compatibility reason.

Required PHP extensions: curl (7.10.5+), gd, gmp, iconv, imap, json, ldap, libxml, mailparse, mbstring, openssl (1.1.1a+), pdo, pdo_mysql, simplexml, soap, zlib.

Required PHP configuration from Blesta's documentation:

DirectiveRequired Value
memory_limit512M or higher
max_input_vars10000
mbstring.func_overload0 (off); if on, encryption breaks and your licence will not validate
open_basedirEmpty (no restriction) or must include all paths Blesta accesses
disable_functionsEmpty (none disabled)

Database

MySQL 5.7.7+ or MariaDB 10.2.2+. The following MySQL configuration values are required:

  • max_allowed_packet = 128M (or higher)
  • wait_timeout = 3600 (or higher)

MariaDB 10.5+ is recommended. On a shared hosting account these are set at the server level; on a VPS you configure them yourself.


Installing on TekLan Shared Hosting (Enhance)

Step 1: Set Up a Domain or Subdomain

Blesta should run under its own domain or subdomain, for example billing.yourdomain.co.uk. Add it to your Enhance account and note the document root path shown in the file manager. If you're pointing an existing domain, update its DNS A record to your hosting account's IP and wait for propagation to complete before continuing.

Step 2: Configure PHP

In Enhance, go to your website and open Advanced → Developer tools → PHP. Set the version to 8.2 unless your Blesta release or modules require a different supported version. In the extensions list, enable ionCube.

Blesta requires memory_limit = 512M and max_input_vars = 10000, which are above typical defaults. Open the php.ini editor in the same section and add:

memory_limit = 512M
max_input_vars = 10000

Save both the PHP version/extensions and the php.ini changes.

Step 3: Create a Database

Go to the Databases tab and click Add database. Note the full name including the account prefix. In the Users sub-tab, click Add user and create a dedicated user with a strong password. Grant that user full access to the new database. Keep a record of the database name, username (with prefix), password, and hostname (shown in the Databases tab, typically localhost).

Step 4: Upload Blesta

Download the latest release from your Blesta account. Extract the zip; the archive contains a blesta/ directory with the application files inside. Upload the contents of that directory (not the blesta/ folder itself) to your domain's document root using the Enhance file manager or FTP.

For security, Blesta recommends moving the uploads/ directory above your document root. On shared hosting, if you cannot place it above the web root, add a .htaccess file inside uploads/ after upload:

Options -Indexes
Deny from all

This prevents direct browser access to uploaded files while keeping them within the web root.

Step 5: Run the Web Installer

Visit your domain in a browser. Blesta detects it has not been configured and redirects you to the installer automatically. Work through the screens:

  1. Requirements check: all items must be green. If ionCube shows red, revisit Step 2. If memory_limit shows insufficient, confirm your php.ini changes saved.
  2. Licence key: enter the key from your Blesta account or your Blesta.club purchase. The hostname entered must exactly match the domain Blesta will run on.
  3. Database: enter the credentials from Step 3.
  4. Administrator account: use a strong unique password.
  5. Complete: installation is finished. There is no separate installer directory to delete.

Step 6: Set Up the Cron Job

Blesta's automation covers invoicing, payment reminders, provisioning, and domain renewals. It depends on a working cron job. Blesta's documentation says to copy the cron command from Settings → System → Automation and, in common installations, run it every five minutes. Newer Blesta versions also support more targeted task execution for larger installations.

In Enhance, go to Advanced → Developer tools → Cron jobs and click Add cron job. Use the schedule and command shown in Blesta. It will follow this format:

/usr/bin/php /var/www/[your-site-uuid]/public_html/index.php cron

The exact path for your site is shown in the Enhance file manager. After the cron fires for the first time, the Last Run time in Blesta's Automation settings will update; confirm this before going live.

Step 7: Force HTTPS

In Enhance, go to your website → Security tab → enable Force HTTPS. A Let's Encrypt certificate is issued automatically. Confirm the padlock is showing before doing anything else in the admin panel.


Installing on a TekLan VPS

Blesta can be installed on most Linux distributions that meet the PHP and database requirements. Blesta recommends installing on a fresh virtual machine using its bash installer where possible. If you are on a different distribution or already have a server provisioned, the manual steps below cover Ubuntu 22.04; adapt package names as needed for your distro.

Option A: Automated Install

On a fresh minimal AlmaLinux install, make sure your hostname resolves to the server's IP, then run:

dnf install curl -y
curl -o install-blesta.sh https://raw.githubusercontent.com/blesta/install-blesta/main/install-blesta.sh
chmod +x install-blesta.sh
./install-blesta.sh

The script is intended for a fresh server and automates the web stack, database, SSL, Blesta files, and cron setup. Check the script's current README before running it, because supported distributions can change.

If you're starting fresh and are happy to use the supported OS list, this is the simplest path. Skip to the post-installation checklist below.


Option B: Manual Install (Ubuntu/Debian)

Connect as root via SSH and follow these steps. The process is the same on other distros; substitute apt for dnf/yum and adjust PHP package names accordingly.

Step 1: Install the Stack

apt update && apt upgrade -y
apt install -y nginx mysql-server \
  php8.2 php8.2-fpm php8.2-curl php8.2-gd php8.2-gmp \
  php8.2-imap php8.2-ldap php8.2-mbstring php8.2-mysql \
  php8.2-soap php8.2-xml php8.2-zip \
  unzip certbot python3-certbot-nginx

The mailparse extension is not available as a standard Ubuntu package. Install it via PECL:

apt install -y php8.2-dev php-pear
pecl install mailparse
echo "extension=mailparse.so" > /etc/php/8.2/mods-available/mailparse.ini
phpenmod mailparse

Step 2: Install ionCube Loader

cd /tmp
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xfz ioncube_loaders_lin_x86-64.tar.gz

Find your PHP extension directory:

php -i | grep extension_dir
cp ioncube/ioncube_loader_lin_8.2.so $(php -i | grep extension_dir | awk '{print $NF}')

echo "zend_extension = ioncube_loader_lin_8.2.so" \
  > /etc/php/8.2/fpm/conf.d/00-ioncube.ini
echo "zend_extension = ioncube_loader_lin_8.2.so" \
  > /etc/php/8.2/cli/conf.d/00-ioncube.ini

systemctl restart php8.2-fpm

Confirm: php -v should include with the ionCube PHP Loader.

Step 3: Configure PHP

nano /etc/php/8.2/fpm/php.ini

Find and update:

memory_limit = 512M
max_input_vars = 10000
mbstring.func_overload = 0

Also confirm disable_functions and open_basedir are empty. Restart FPM after saving:

systemctl restart php8.2-fpm

Step 4: Configure MySQL

mysql_secure_installation
nano /etc/mysql/mysql.conf.d/mysqld.cnf

Add under [mysqld]:

max_allowed_packet = 128M
wait_timeout = 3600
systemctl restart mysql
mysql -u root -p
CREATE DATABASE blesta CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'blestauser'@'localhost' IDENTIFIED BY 'your-strong-password';
GRANT ALL PRIVILEGES ON blesta.* TO 'blestauser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 5: Set Up Directory Structure

mkdir -p /var/www/blesta/{public,uploads}
cd /tmp
# Upload your Blesta zip here, then:
unzip blesta*.zip
cp -r blesta/* /var/www/blesta/public/
# Move uploads above docroot
rm -rf /var/www/blesta/public/uploads
ln -s /var/www/blesta/uploads /var/www/blesta/public/uploads
chown -R www-data:www-data /var/www/blesta/

Configure the uploads path in Blesta after install under Settings → Company → General.

Step 6: Configure Nginx

nano /etc/nginx/sites-available/billing.yourdomain.co.uk
server {
    listen 80;
    server_name billing.yourdomain.co.uk;
    root /var/www/blesta/public;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?q=$uri&$args;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.2-fpm.sock;
    }
}
ln -s /etc/nginx/sites-available/billing.yourdomain.co.uk \
      /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx

Step 7: SSL Certificate

certbot --nginx -d billing.yourdomain.co.uk

Test renewal: certbot renew --dry-run.

Step 8: Run the Installer and Set Up Cron

Visit https://billing.yourdomain.co.uk. Blesta will redirect you to the installer automatically. Complete all steps as described in the shared hosting section. There is no installer directory to delete afterwards.

Add the cron job using the command and schedule shown in Blesta:

crontab -e
*/5 * * * * /usr/bin/php /var/www/blesta/public/index.php cron > /dev/null 2>&1

Post-Installation Checklist

  • HTTPS enforced, padlock confirmed with no mixed content warnings
  • Cron running on the schedule shown in Blesta, confirmed in Settings → System → Automation
  • Admin account using a strong unique password with two-factor authentication enabled
  • Uploads directory not directly web-accessible
  • Test invoice raised and test payment processed through your gateway before going live
  • Automated backups configured. Billing data is business-critical.

Recommended Hosting Setup for Blesta

For a small billing portal, Blesta can run well on managed application hosting when PHP, ionCube, database access, SSL, and cron are all configured correctly. Keep it on a dedicated hostname such as billing.example.co.uk and avoid mixing it with a public WordPress site.

Use a VPS if you want full root access, custom mail routing, extra queue tooling, or direct control over the web server. If you are building a hosting business, pair Blesta with reseller hosting so customer sites stay separated from the billing platform.

Licence and Launch Notes

We recommend Blesta.club as our preferred reseller for Blesta licences. Once the licence is active, configure your company details, invoice settings, support departments, order forms, payment gateway, and email templates before inviting customers.

Useful next reads: Blesta, WHMCS, and HostBill compared, client area security checklist, and professional email setup.

Sources Checked

If you run into issues with the environment, particularly ionCube or PHP configuration on shared hosting, open a support ticket and we'll help.

Related Posts