Repository navigation
Installation
This page explains how to install WebPulse on a cPanel & WHM server with the installer script. If you cannot pipe a script into a shell, see Manual Installation.
WebPulse 0.2.0 (the Rust rewrite) was developed without a real cPanel server. The installer is tested against a fake cPanel root, but the calls to cPanel's own tools (
install_plugin,register_appconfig,manage_hooks) have not yet been verified on a live server. If a step fails, the installer undoes what it did and prints the failing command. Please report what you see.
| Requirement | Detail |
|---|---|
| Control panel | cPanel & WHM with the Jupiter theme. The documentation targets cPanel 110 or later. The installer does not check the cPanel version. |
| Operating system | AlmaLinux, Rocky Linux, CloudLinux or Ubuntu (the systems cPanel supports). |
| Web server | Apache (EasyApache 4) or ea-nginx, writing one access log per domain in the combined format (the cPanel default). |
| CPU | Linux x86_64 or aarch64. The prebuilt binary is statically linked and runs on every distribution. |
| Runtime | Nothing to install. WebPulse is a single binary; there is no PHP library, no interpreter and no SQLite package to add. cPanel's own PHP (/usr/local/cpanel/3rdparty/bin/php) runs the two small shims of the cPanel page, and the installer only warns when it is missing. |
| Privileges | You must run the installer as root. |
| Tools |
curl or wget, tar, sha256sum, cp, mv, ln, rm, mkdir, chmod, find, sed, grep, awk, diff. |
| Network | Outbound HTTPS to github.com and api.github.com, and to download.db-ip.com for GeoIP. Not needed for air-gapped installs. |
curl -fsSL https://raw.githubusercontent.com/inalto/webpulse/main/install.sh | bashWith flags, put them after bash -s --:
curl -fsSL https://raw.githubusercontent.com/inalto/webpulse/main/install.sh | bash -s -- --geoipTo read the script first, download it, read it, then run it:
curl -fsSLO https://raw.githubusercontent.com/inalto/webpulse/main/install.sh
less install.sh
bash install.sh --geoipThe installer downloads the release for your CPU (webpulse-<version>-x86_64-unknown-linux-musl.tar.gz or
...-aarch64-...), verifies its sha256 checksum and only then changes anything. From an unpacked
release tarball, bash install.sh installs the files next to it.
When stdin is not a terminal, as in curl | bash, the installer does not ask for confirmation.
-
No internet on the server. On another machine download the release tarball for the server's CPU
and its
.sha256from the releases page, check it withsha256sum -c, copy it over, thentar -xzfit and run./install.shinside. It findsbin/webpulsenext to itself and downloads nothing. -
Your own binary.
./install.sh --binary /path/to/webpulseinstalls that binary instead of the release's. -
Build on the server.
install.sh --builddownloads the source of--refand runscargo build --release --locked(needs the Rust toolchain, https://rustup.rs). The installer does the same on its own when a release has no binary for your architecture andcargois present; withoutcargoit stops with a message that names the three options.
| Flag | Meaning |
|---|---|
--geoip |
Set geoip.enabled and download the free DB-IP country database. A failed download is only a warning. |
--ref <tag> |
Install this release, v0.2.0 or 0.2.0. Default main, which means the latest release (env WEBPULSE_REF). A branch name is built from source (needs cargo). |
--repo <owner/name> |
Install from this GitHub repository. Default inalto/webpulse (env WEBPULSE_REPO). |
--build |
Build the binary from source with cargo instead of downloading it. Fails clearly when cargo is missing. |
--binary <file> |
Install this binary instead of the release's. |
--no-cron |
Do not write /etc/cron.d/webpulse. Nothing collects data until you schedule webpulse collect. |
--update |
Update an existing installation. See Updating and Uninstalling. |
--uninstall |
Remove WebPulse; statistics and configuration are kept. |
--purge |
With --uninstall: also delete /var/webpulse and /etc/webpulse. |
--standalone |
No cPanel: a full installation for a plain Apache/nginx server (sites from the web server configuration, cron, the Cockpit module when Cockpit is installed). See Standalone Install. |
--cockpit |
Install the Cockpit module (/usr/share/cockpit/webpulse, "Web analytics"), also on cPanel servers. See Cockpit Module. |
--serve |
Install and start webpulse-serve.service (the dashboard on 127.0.0.1:8099, token in /etc/webpulse/serve-token). |
--all-themes |
Install the cPanel plugin into every directory under /usr/local/cpanel/base/frontend/. By default every theme with a dynamicui.conf (Jupiter, Meridian) is installed. |
--theme <name> |
Also install into this theme. Repeatable. |
-y, --yes
|
Do not ask for confirmation. |
-h, --help
|
Print the options. |
--repo accepts owner/name only; --ref accepts letters, digits and . _ / + -.
-
Checks. Root,
/usr/local/cpanel/cpanel, the required tools. -
Download. The installer maps
uname -mtox86_64-unknown-linux-musloraarch64-unknown-linux-musl, finds the latest release (or the--reftag), downloadswebpulse-<version>-<target>.tar.gzand its.sha256from GitHub, verifies the checksum and unpacks the archive in a temporary directory. A mismatch, or an archive that does not look like WebPulse, stops the installer before anything is changed. -
Staging. The release goes to
/usr/local/webpulse-releases/<version>/;bin/webpulse(mode 0755) is started once with--versionto check that it runs on this machine. -
Setup.
webpulse setupcreates/etc/webpulse/config.json(mode 0600),/var/webpulse/(data/,log/,run/,geoip/), the registry database, and a data directory per cPanel account. -
Activation.
/usr/local/webpulsebecomes a symlink to the release, swapped atomically. The three newest releases are kept. -
cPanel plugin. The two small PHP shims are copied to
/usr/local/cpanel/base/frontend/jupiter/webpulse/and registered withinstall_plugin. The icon appears in the Metrics group. -
WHM plugin. The two bash CGI shims go to
/usr/local/cpanel/whostmgr/docroot/cgi/webpulse/, the icon to.../addon_plugins/webpulse.png, andregister_appconfigcreates/var/cpanel/apps/webpulse.conf.cpsrvdis restarted only if the registration says it must be. -
Hooks.
manage_hooks add scriptregistersstats_runall_pre.sh(Stats::RunAll) andstats_runuser_pre.sh(Stats::RunUser), stagepre. A hook that is already registered is skipped./var/webpulse/run/hookis created with mode 1777. -
Cron.
/etc/cron.d/webpulseis written (see Command Line for the schedule). -
GeoIP (only with
--geoip:webpulse config set geoip.enabled trueandwebpulse geoip-update) and a first collection started in the background. - Summary with the WHM and cPanel URLs, the config path and the uninstall command.
If a step fails, the installer prints Step failed, the command, its exit status and its output, then
rolls back. Fix the cause and run it again.
/usr/local/webpulse/bin/webpulse status
/usr/local/cpanel/bin/manage_hooks list | grep webpulse # two entries
cat /etc/cron.d/webpulse
ls -l /var/cpanel/apps/webpulse.confIn WHM, open Plugins » WebPulse Analytics. The Server tab has an Integration tile that shows whether the cron job, the Stats hook and GeoIP are in place.
The installer starts one collect in the background. After that, cron runs it every 5 minutes. A
domain has no database until its first log line has been processed, and until then the dashboard says
Collecting…. To see progress or force a run:
/usr/local/webpulse/bin/webpulse status
/usr/local/webpulse/bin/webpulse collect --verboseTo import history that already sits in /home/<user>/logs/*.gz:
/usr/local/webpulse/bin/webpulse backfill --user <user>By default collection is on for every account. Switch accounts off in WHM or with
webpulse accounts disable <user>. See WHM Administration.
Open cPanel » Metrics » WebPulse Analytics. If an account does not see the icon, tick the
On the Meridian theme the sidebar is a fixed list of built-in hubs, so account owners open WebPulse with Ctrl+K → "WebPulse" (or …/frontend/meridian/index.html#/webpulse); it renders inside the Meridian shell.
webpulse feature ("WebPulse Analytics") in WHM » Feature Manager for its feature list. See
Troubleshooting and FAQ.
Without GeoIP, countries show as unknown. To enable it after installation:
/usr/local/webpulse/bin/webpulse config set geoip.enabled true
/usr/local/webpulse/bin/webpulse geoip-updateOr run the installer again with --update --geoip. The database is a free DB-IP country file; the
cron job refreshes it on the 1st of each month. Countries appear only for hits collected after the
database is in place. Check the terms of the DB-IP free database for your use.
The plugin is installed into the jupiter theme by default. For another theme, add it:
curl -fsSL https://raw.githubusercontent.com/inalto/webpulse/main/install.sh | bash -s -- --update --theme paper_lantern
curl -fsSL https://raw.githubusercontent.com/inalto/webpulse/main/install.sh | bash -s -- --update --all-themesA theme that does not exist under /usr/local/cpanel/base/frontend/ is skipped with a warning.
jupiter is the only theme the project was written for.
WebPulse is open source under the MIT license. Source code and issues: github.com/inalto/webpulse.
Getting started
- Installation
- Updating and Uninstalling
- Manual Installation
- Standalone Install
- Cockpit Module
- Troubleshooting and FAQ
Using WebPulse
Reference
Project