On a cPanel & WHM server, Golub installs as a plugin and shows up in cPanel webmail next to Roundcube. Users open it the same way they open Roundcube, already signed in. Administrators change its settings and update it in WHM.

How it works
Golub runs the way cPanel runs Roundcube:
- It opens at
https://your-server:2096/cpsess…/3rdparty/golub/on the webmail port, inside the user's cPanel webmail session. There is no extra port to open and no extra certificate. - It signs in to Dovecot and Exim with the temporary login cPanel gives every webmail app for that session. There is no master user and no stored password. When the user logs out of cPanel webmail, Golub's session ends too.
- The Golub service itself listens only on
127.0.0.1. A small PHP script that cpsrvd runs as the cPanel user passes each request on to it. - Mail, settings, contacts and PGP keys live in each mailbox on the IMAP server, as they do everywhere else Golub runs.
New mail shows up on the list's refresh interval (Settings > Preferences, every minute by default), not instantly: cPanel's webmail server can't hold a connection open for live updates.
Requirements
- cPanel & WHM with the Jupiter theme, and root access
- x86-64, the only architecture cPanel supports
- cPanel's own Dovecot and Exim (the default)
Install
As root:
curl -fsSLO https://github.com/stefanpejcic/Golub/releases/latest/download/golub-linux-amd64.tar.gz
tar xzf golub-linux-amd64.tar.gz
sh cpanel/install.sh
The plugin comes in the same archive as the golub binary.
The installer:
- puts the binary and plugin files in
/usr/local/golub; - creates the system user
goluband the systemd servicegolub; - writes its settings to
/etc/golub.env, with new random secrets; - adds Golub to cPanel's webmail apps and to the webmail home page;
- adds Plugins > Golub Webmail to WHM;
- adds Golub to WHM's Service Manager, which checks it every few minutes and restarts it when it stops answering.
Running it again upgrades Golub and keeps the settings already in /etc/golub.env.
Settings in WHM
WHM > Plugins > Golub Webmail edits the same settings you would set in Docker Compose (see Configuration): mail server, defaults for new users, branding and log level. Save and restart checks them with Golub first. If Golub refuses them, nothing changes. If Golub doesn't start with the new settings, the old ones are restored.

The page also shows whether the service is running and the installed version next to the latest release on GitHub. Below the settings is the service log.
Golub runs as the user golub, which can't read files under /home, so put a custom logo in /etc/golub/.
On the webmail page
Golub gets its own panel under Open your inbox, the same size as Roundcube's. Open my inbox when I log in under either panel makes that app open right after login, as cPanel does for Roundcube.
The panels come from the file /var/cpanel/customizations/webmail/jupiter/includes/home_banner.html.tt. If that file already exists and isn't Golub's, the installer leaves it alone. Golub is then only listed under Change your webmail client.
Updating
When a newer release is out, the WHM page shows an Update button. It downloads the release for this server, checks it against the release's SHA256SUMS and runs the installer from it. If any step fails, the installed version keeps running.
From the shell:
/usr/local/golub/cpanel/bin/golub-update --check # installed and latest version
/usr/local/golub/cpanel/bin/golub-update # update to the latest release
Uninstall
sh /usr/local/golub/cpanel/uninstall.sh # keeps /etc/golub.env
sh /usr/local/golub/cpanel/uninstall.sh --purge # removes the settings too
Mail, settings and contacts stay in the mailboxes either way.
Troubleshooting
- "Golub webmail is not available right now": the Golub service isn't answering. Run
systemctl status golubandjournalctl -u golub, or look at the log in WHM. - Settings Golub refuses: run
/usr/local/golub/cpanel/bin/golub-envrun /usr/local/golub/golub -check. It names the setting that is wrong. - Golub is missing from the webmail page: run
/usr/local/golub/cpanel/bin/golub-webmailas root to add it again. It does this after every save in WHM too.
More in Troubleshooting.



