Skip to content

Latest commit

 

History

History
125 lines (91 loc) · 5.39 KB

README.md

File metadata and controls

125 lines (91 loc) · 5.39 KB

BHServe for Linux — Ubuntu / Debian

A free local web server for Linux — the same app, features and sites as the macOS/Windows builds, as a GTK4 / libadwaita control panel + a bhserve CLI. Multiple PHP versions per site, nginx, Apache & OpenLiteSpeed, MariaDB / MySQL / PostgreSQL, Redis & Memcached, Node & Python apps, trusted HTTPS + *.test domains, one-click WordPress — all installed on demand, so the download stays small.

🐧 Linux exclusive: OpenLiteSpeed backend. Pick OpenLiteSpeed as a site's web server (add-site dialog, or bhserve site server <name> ols) for native .htaccess support with the LiteSpeed Cache plugin — and .htaccess changes apply live (~2 s), no restarts. nginx stays the front door; OpenLiteSpeed installs automatically on first use. Great for OpenCart / WordPress.

✅ Stable. Works end-to-end (verified on Ubuntu 24.04 and 26.04). Please report any issues.


Install

1. Download the latest .deb from the Releases page (the newest linux-vX.Y.Z release → bhserve_X.Y.Z_all.deb), then install it:

cd ~/Downloads     # wherever the .deb downloaded
sudo dpkg -i ./bhserve_*.deb
sudo apt-get -f install -y

Or grab it straight from the terminal. This resolves the current Linux .deb automatically, so it keeps working after every release (only the newest release of each OS is kept, so a hard-coded version URL goes stale as soon as the next build ships):

cd /tmp
curl -fsSL -o bhserve.deb "$(curl -fsSL https://api.github.com/repos/wpexpertinbd/BHServe/releases \
  | grep -oE 'https://[^\"]+/bhserve_[0-9.]+_all\.deb' | head -1)"
sudo dpkg -i ./bhserve.deb
sudo apt-get -f install -y

The second line pulls in any missing dependencies (only needed on a first install). Use dpkg -i, not apt install ./file.deb — on newer Ubuntu (25.04+/apt 2.9+) the latter fails with "Unsupported file … given on commandline".

2. Launch it — open “BHServe” from your applications menu, or run:

bhserve-gui        # the GTK control panel
bhserve --help     # the CLI

3. First run — the dashboard opens with nothing installed yet. Click Install for the core stack (nginx + PHP + MariaDB + mkcert), then Add site to create your first WordPress / PHP / Node / Python site. Server binaries are fetched on demand (PHP via the Ondřej Surý repo, distro packages otherwise).

⚠️ BHServe owns ports 80/443 and the *.test domain — quit any other local stack (a running Apache/nginx, XAMPP, etc.) before first run.


Update

bhserve self-update

Checks the latest release and installs it if you're behind — no version-tracking or manual re-download. (You can also just sudo dpkg -i ./bhserve_<newer>.deb over the top — it upgrades in place.)


Uninstall

sudo apt remove bhserve          # remove the app + CLI
rm -rf ~/.bhserve                # optional: also wipe BHServe's data (config, certs, servers, vhosts)

What it installs (on demand)

Web nginx (serves PHP directly), Apache & OpenLiteSpeed (.htaccess backends behind nginx; OpenLiteSpeed auto-reloads on .htaccess change + supports LiteSpeed Cache)
PHP 7.4 → 8.5 per site — distro packages, the Ondřej PPA, or a portable static build where neither has it
Databases MariaDB, MySQL, PostgreSQL
Cache Redis, Memcached
Runtimes Node.js (via fnm), Python (venv)
Tools phpMyAdmin, Adminer, Mailpit, trusted HTTPS (mkcert), *.test domains

*.test resolves via a managed /etc/hosts block by default (wildcard dnsmasq is opt-in).


Requirements

  • A Debian/Ubuntu-based distro (uses apt). Tested on Ubuntu 24.04 LTS and 26.04.
  • sudo access (BHServe elevates via pkexec/sudo only for install + service control).
  • ~200 MB for the app; server binaries add more as you install them.

Notes & troubleshooting

  • PHP version not available? On a brand-new release the Ondřej PPA may not have built yet — BHServe falls back to a portable static PHP for 8.0–8.5. PHP 7.4 is end-of-life, so it's only available on an LTS where Ondřej still ships it.
  • Native apt install bhserve (a signed apt repo, so apt upgrade handles updates) is wired up but opt-in — see apt-repo/README.md to enable it. Until then, use the .deb + bhserve self-update above.
  • No tray icon after closing the window? The top-bar icon uses GNOME's AppIndicator support, which ships enabled on Ubuntu. On a vanilla GNOME desktop, enable the "AppIndicator and KStatusNotifierItem Support" extension (or install gnome-shell-extension-appindicator). Without it, closing the window just quits normally.
  • RHEL / Fedora / openSUSE (dnf/zypper) aren't supported yet — this build is Debian/Ubuntu (apt) only.

For developers / contributors

The engine is the shared ../engine/bhserve (bash, same as macOS) plus a Linux delta layer (../engine/platform-linux.sh, sourced only on Linux — macOS untouched). The GUI is app/bhserve/ (Python + GTK4/libadwaita), driving the engine via its api JSON. Build the .deb with build.sh → dist/bhserve_<ver>_all.deb. Architecture spec: ../docs/LINUX-PORT.md; engine deltas: engine/DELTAS.md.