Installing BHPanel
BHPanel installs on a server running AlmaLinux 9, x86_64 or ARM64.
The server must be fresh: a new AlmaLinux 9 with nothing else set up on it. BHPanel installs and manages the web server, PHP, databases, mail, DNS and the firewall itself, so it cannot share a server with another control panel, or with websites, databases or mail servers already set up by hand — they would clash. Reinstall the operating system first if the server has been used.
Moving from another panel? Install BHPanel on a new server and bring the accounts over: see Moving accounts in.
What you need
| Minimum | Recommended | |
|---|---|---|
| Light | 1 vCPU, 2 GB RAM, 20 GB disk | 2 vCPU, 4 GB RAM, 40 GB disk |
| Full | 2 vCPU, 4 GB RAM, 30 GB disk | 4 vCPU, 8 GB RAM, 60 GB disk |
The disk is mostly for your customers: a Light install itself uses about 5 GB with the operating system. If the server has no swap, the installer adds swap the size of its RAM, so a 2 GB server copes with a memory spike instead of stopping something. (A container VPS gets its swap from the host.)
- A server with AlmaLinux 9 and
root, or a user who can usesudo. - Your free license key from BiswasHost (optional at first: without one the panel works fully for 14 days).
Before you install
Three steps on a fresh server save most of the problems people run into. The
commands are shown for a user who can use sudo; as root, leave sudo out.
1. Give the server a real hostname
Pick a name such as server.example.com and add an A record for it (and an
AAAA record if the server has IPv6) that points to the server's IP address.
Then set it on the server:
sudo hostnamectl set-hostname server.example.com
Check that the name resolves to this server before you go on:
getent ahosts server.example.com
The installer uses this name for the panel's own Let's Encrypt certificate,
so the administrator, resellers and customers can sign in over a real,
trusted https:// address instead of clicking past a browser warning. The
same name is what your mail server introduces itself with, so a real name also
helps mail arrive.
No hostname, or DNS not ready yet? The install still finishes, and the panel
opens on the server's IP address — https://SERVER-IP:2087 — with a
self-signed certificate, so the browser shows a warning you have to click
past. Once the name resolves, open Domains ›
SSL and press Issue a certificate now.
2. Update the operating system
sudo yum update -y
sudo yum upgrade -y
This brings in the latest kernel and security fixes before anything else is installed.
3. Reboot, then install
sudo reboot
Sign in again once the server is back, and run the installer below. Rebooting first means the server is running the new kernel, so the installer does not set up disk quota and firewall rules against a kernel that is about to be replaced.
Light or Full
| Light | Full | |
|---|---|---|
| Web server | Nginx + Apache (or OpenLiteSpeed) | the same |
| PHP | one version | every version, 5.6 to 8.x |
| Databases | MariaDB, phpMyAdmin | + PostgreSQL, MongoDB |
| Postfix, Dovecot, Rspamd, Roundcube | the same | |
| Also | DNS, FTP, Redis, Memcached, firewall, scanners | + Node.js |
Not sure? Choose Light. Every component in Full has an install button on the panel's Services page later, and it runs the same step the installer would.
Install
One line, as a user who can use sudo:
curl -fsSL https://releases.bhpanel.net/install.sh | sudo BHP_LICENSE=YOUR-KEY bash -s -- --beta --light
As root, leave sudo out:
curl -fsSL https://releases.bhpanel.net/install.sh | BHP_LICENSE=YOUR-KEY bash -s -- --beta --light
For Full, use --full instead of --light. Without either, the installer asks.
No key yet? Leave BHP_LICENSE=YOUR-KEY out and add the key later in the panel
under Server › License.
--beta takes the newest beta release: BHPanel is in public beta. Every
release is signed; before anything runs, the command checks the signature
against the BHPanel release key, the download's checksum and every file in the
archive, picks the build for your server's processor, and then starts the
installer. The release stays unpacked in /root/bhpanel-install/.
Put BHP_LICENSE=... after sudo: written before it, sudo drops it. You
can also pass the key as --license=KEY, but then it shows in the process list
while the installer runs.
Options
| Option | What it does |
|---|---|
--light |
Everything needed to run WordPress and PHP sites. |
--full |
Light plus every PHP version, PostgreSQL, MongoDB and Node.js. |
--stack=ols |
OpenLiteSpeed instead of Nginx + Apache (the default). |
--admin-user NAME |
The first administrator's name (default bhpadmin). |
--license=KEY |
The license key (or BHP_LICENSE=KEY). |
-y |
Ask nothing; take Light if no profile was given. |
--beta |
Take the newest beta release (the one-line command only). |
Disk quota (one restart on most servers)
Each account's disk limit is enforced by the kernel's disk quota. On most
AlmaLinux servers /home sits on the main XFS disk, and quota there needs one
boot setting and one restart. The installer makes the setting itself, then
stops and asks:
Quota is set up. It starts working after ONE restart of the server.
...
Restart the server now? [y/N]
Answer y, wait 1-2 minutes, log in again and run the same install command
you ran first - the installer printed it just above, with your own options. It
carries on where it stopped and finishes with Done. It never restarts the
server without your y (and never with -y: then run reboot yourself).
If it stops for disk quota
Only if the automatic setting did not work - the installer then says so and
points here. Everything below is typed on the server as root (with sudo in
front if you log in as another user).
Step 1 - see which case your server is
findmnt -no TARGET,FSTYPE -T /home
It prints two words. Find yours:
| It prints | Your case |
|---|---|
/ xfs |
A - /home is on the main disk (most AlmaLinux servers and VPS) |
/home xfs |
B - /home is its own disk |
/ ext4 or /home ext4 |
C - the installer turns quota on by itself, no restart |
Case A - / xfs (one restart needed)
Run these three, one after the other:
1. Add the quota setting (this only changes a boot setting; nothing restarts yet):
bash "$(ls -td /root/bhpanel-install/bhpanel-*/ | head -n 1)installer/bhpanel-install.sh" quota-bootstrap --grub
(That picks the release the install command just unpacked.) It ends with Reboot required.
2. Restart the server:
reboot
Your SSH window closes. Wait 1-2 minutes, then log in again.
3. Run the same install command you ran first, for example:
curl -fsSL https://releases.bhpanel.net/install.sh | BHP_LICENSE=YOUR-KEY bash -s -- --beta --light
It carries on where it stopped and finishes with Done.
Case B - /home xfs
The installer has already written the setting. /home only has to be mounted
again:
umount /home && mount /home
If it answers target is busy, run reboot instead and log in again after
1-2 minutes. Then run the same install command again.
Case C - ext4
The installer turns quota on by itself. If it still stops, run the same install command once more; if it stops again, the last lines it printed say what is in the way.
Check that quota is on
After the install finishes:
bhpanelctl system.info | grep '"enforced"'
It shows "enforced": true. If your server is a container (OpenVZ,
LXC, Virtuozzo) quota cannot be turned on at all - BHPanel needs a VM (KVM,
VMware, Hyper-V) or a dedicated server.
When it finishes
The installer prints a one-time token. Open the admin panel in your browser and use the token to set the administrator's password.
- Administrator and resellers:
https://your-server:2087 - Customers:
https://your-server:2083
Turn on two-factor sign-in for the administrator straight away.
Lost the token?
The token is only needed until the administrator has a password. If it scrolled
away, or the window was closed, make a new one on the server as root:
sudo bhpanel-web-admin setup-token bhpadmin
It prints a fresh token for the administrator bhpadmin (use the name you gave
with --admin-user, if you changed it). Open https://your-server:2087 and
enter it. A new token replaces the one before it, and it is deleted
automatically once the account is created.
Once the administrator exists, setup is closed and no new token can be made. To set a new password for an existing administrator instead:
sudo bhpanel-web-admin add bhpadmin
It asks for the new password twice. sudo bhpanel-web-admin list shows the
administrator logins that exist.
Checking where it stands
sudo bash /root/bhpanel-install/bhpanel-*/installer/bhpanel-install.sh status
It reports what is done and what is not, and changes nothing.
Which address to use
BHPanel has two sign-in pages on two ports, plus webmail. Replace your-server
with your server's hostname, such as server.example.com.
Hostname not pointed at the server yet? Use the server's IP address
instead - for example https://203.0.113.10:2087. It works the same; the
browser only warns about the certificate, because a certificate is issued for
the hostname, not the IP. Once the hostname's DNS record points at the server,
switch to the hostname.
| Who | Opens | Port |
|---|---|---|
| Administrator | https://your-server:2087 |
2087 |
| Resellers | https://your-server:2087 - the same page as the administrator |
2087 |
| Customers (hosting accounts) | https://your-server:2083 |
2083 |
| Email in the browser (webmail) | https://your-server:2096 |
2096 |
- Resellers sign in on 2087, with their own username and password. The panel sees they are a reseller and shows them only their own customers and plans.
- Customers sign in on 2083. A team member a customer invited also signs in there, with their email address.
http://your-server:2095only sends visitors on to webmail at 2096.- All four ports are opened in the firewall by the installer.