cPanel Clean-Room: Open-Source MIT TypeScript Linux Hosting Control Panel (77 Tools + Live Sandbox).md
Systems Architecture

cPanel Clean-Room: Open-Source MIT TypeScript Linux Hosting Control Panel (77 Tools + Live Sandbox)

Author: Robert Baindourov•Published: November 26, 2026•Runtime: Node.js 26 & Linux Native
OPEN-SOURCE MIT RELEASE 100% TYPESCRIPT / NODE 22 LTS ZERO DOCKER OVERHEAD ZERO SHELL INTERPOLATION

Commercial per-account hosting licenses keep ratcheting upward, yet most open-source alternatives force an uncomfortable choice between legacy Perl/Bash root scripts, 60-second cron queues, or heavyweight container wrappers. Today we are open-sourcing cPanel Clean-Room (CleanPanel) under the permissive MIT License: a four-package TypeScript Linux hosting appliance implementing 77 hosting tools (all 68 baseline cPanel Jupiter tools plus 9 modern operational extensions), backed by 170 unit tests, 450 four-tier end-to-end assertions, and a 12-part clean-room specification.

Hosting Tool Coverage 77 Tools (97.1%)
Privilege Boundary NDJSON Unix Socket
Verification Suite 620 Automated Tests
Mail Anti-Spam Footprint ~60 MB Rspamd

1. Interactive Live Sandbox: Test-Drive CleanPanel in Your Browser

Rather than publishing static screenshots alone, we compiled @cpanel-clean-room/web with an in-browser Linux Appliance Sandbox (VITE_DEMO_MODE=true) mounted directly on RobertsCreations. Every screen below runs the actual React 18 Jupiter UI, Monaco Code Editor, and @xterm/xterm terminal emulator client-side with zero backend root exposure.

Interactive Control Panel Viewport: Press / inside the panel to filter all 77 tools, click Impersonate acme to test 3-tier RBAC, edit PHP or .htaccess in Monaco, or run panel-agentd --status inside the xterm.js shell.

Open CleanPanel Full-Screen ↗
Live @cpanel-clean-room/web SPA — Pre-authenticated as Appliance Root (admin) with 1-click impersonation into tenant acme. github.com/rbaindourov/cpanel-clean-room ↗

Five Workflows to Try Right Now in the Embedded Demo

  • Instant 77-Tool Search & 3-Tier Impersonation: Click Impersonate acme in the sandbox bar (or open Admin Accounts in the left rail) to watch the persistent amber impersonation banner engage while scoping filesystem, database, and DNS context to UID 1042 (example-store.com).
  • Native File Manager + Monaco Code Editor: Open File Manager, navigate into public_html, select index.php or .htaccess, and click Edit in Monaco. Modify the code, save it in-browser, or open the interactive chmod octal calculator.
  • Embedded @xterm/xterm Shell: Navigate to Terminal and type help, panel-agentd --status, ls -la public_html, cat public_html/index.php (which reflects edits you just saved in Monaco!), wp plugin list, or named-checkzone.
  • RFC 1035 BIND9 Zone Editor & Multi-PHP Switcher: Open Domains & DNS to add live A, MX, or TXT records and toggle HTTPS enforcement, then open MultiPHP & WP to switch domains across isolated PHP-FPM sockets (5.6 through 8.5) and clone WordPress installations.
  • 1-Click cpmove Migration & Restic Backups: Open Backups & cpmove to export a standard cpmove-acme.tar.gz archive, simulate streaming migration import, or trigger an encrypted restic snapshot.

2. Why Build Clean-Room? Auditing 11 Open-Source Control Panels

Before writing a line of production daemon code, we conducted a clean-room inventory of all 68 tools in a live HostGator cPanel Jupiter deployment and audited 11 open-source hosting repositories at the source-tree and GitHub Security Advisory (GHSA) level. Our objective was straightforward: find a permissive, memory-efficient, multi-tenant native Linux panel that runs directly on systemd without Docker virtual-networking tax.

Empirical 11-repository open-source control panel security and cPanel parity comparison table highlighting CleanPanel versus HestiaCP, Virtualmin, ISPConfig, Froxlor, and AcePanel
Empirical source-code audit comparing execution boundaries, published security advisories, and 68-feature cPanel parity across major open-source Linux panels.

The empirical audit exposed four systemic architectural traps across existing panels:

Architectural & Security Comparison Across Audited Linux Control Panels
Panel Primary Stack & License Privileged Execution Mechanism Key Operational Bottleneck cPanel Parity
CleanPanel (Ours) TypeScript / Node 22 LTS (MIT) Unprivileged API + Zod-validated NDJSON Unix socket (execFile argv arrays) Zero shell interpolation; dual PANEL_SYSROOT workstation & Linux mode 97.1% (77 tools)
HestiaCP Bash + PHP (GPL-3.0) PHP invoking sudo /usr/local/hestia/bin/v-* shell scripts 26 published GHSAs driven by shell argument concatenation & path quoting 79.4%
Webmin + Virtualmin ~733k LOC Perl (BSD / GPL) Persistent root-owned miniserv.pl CGI process tree Steep UX friction for cPanel users; legacy Perl maintenance burden 88.2%
ISPConfig 3 PHP 8 + MySQL (BSD) Root PHP cron worker polling database every 60 seconds Up to 60s latency on SSL, vhost, and DNS mutations; dated UI ergonomics 76.5%
Froxlor v2 PHP + Twig (GPL-2.0) Scheduled root cron config regeneration 30 published GHSAs; lacks built-in File Manager, web terminal, and cpmove 61.8%
AcePanel / 1Panel Go + Vue (BSD / GPL-3.0) Monolithic root daemon or Docker-coupled app containers Missing Linux multi-UID tenant isolation, authoritative BIND9, or native mail 51.5%

3. CleanPanel Three-Plane Privilege Separation Architecture

CleanPanel eliminates the root-web-server anti-pattern by splitting the appliance into four strictly typed monorepo packages (@cpanel-clean-room/shared, @cpanel-clean-room/server, @cpanel-clean-room/agentd, and @cpanel-clean-room/web) governed by 11 Architecture Decision Records (ADR-01 through ADR-11).

Three-plane systems architecture diagram of CleanPanel showing the unprivileged Express and SQLite WAL control plane, the root panel-agentd NDJSON Unix socket daemon, and native Linux hosting services
CleanPanel decouples the public HTTP/WebSocket control plane (uid=panelweb) from OS configuration mutations via a 0660 NDJSON Unix domain socket guarded by 39 Zod schemas.

Plane 1: Unprivileged Control Server & Unified Single-Port SPA

Unlike legacy cPanel—which splits administration across ports 2083, 2087, and 2096—CleanPanel serves the entire Jupiter-modernized React 18 interface, REST API, and authenticated WebSocket PTY multiplexers over a single TLS port running as unprivileged user panelweb. Session state, 3-tier role-based access control (Admin → Reseller → Customer), TOTP 2FA secrets, Argon2id/scrypt credentials, and immutable audit trails live inside a 19-table SQLite database operating in WAL (Write-Ahead Logging) mode.

Plane 2: Schema-Validated Root Daemon (panel-agentd)

Whenever a tenant provisions a domain, rotates a MariaDB grant, edits a file, or triggers an ACME certificate, packages/server dispatches a typed NDJSON request over /run/panel/agent.sock to panel-agentd. Every payload must pass a strict Zod schema in @cpanel-clean-room/shared before execution, and every OS binary call uses Node’s execFile(binary, argvArray)—guaranteeing zero shell string interpolation across all 8 subsystem handlers:

// Every privileged mutation crosses /run/panel/agent.sock as a Zod-validated NDJSON frame
const rpcRequest = AgentRequestSchema.parse({
  id: crypto.randomUUID(),
  action: 'dns.upsertZone',
  actor: { uid: 1042, username: 'acme', role: 'customer' },
  payload: {
    domain: 'example-store.com',
    records: [
      { name: '@', type: 'A', value: '203.0.113.10', ttl: 300 },
      { name: '_dmarc', type: 'TXT', value: 'v=DMARC1; p=quarantine', ttl: 3600 }
    ]
  }
});
// panel-agentd writes atomic temp zone, runs execFile('named-checkzone', [...]), then reloads BIND9

Plane 3: Dual PANEL_SYSROOT Engine & Native Linux Daemons

One of the hardest problems in control-panel engineering is testing privileged configuration generators safely without spinning up slow nested VMs on every commit. CleanPanel solves this via SysrootEngine (ADR-11):

  • Workstation Sandbox Mode (PANEL_SYSROOT=./scratch/sysroot): Generates real Nginx vhosts, per-UID PHP-FPM pool configs (5.6–8.5), RFC 1035 BIND9 zone files with automatic 255-octet TXT chunking, Postfix virtual maps, Dovecot passwd-file hashes, and 2048-bit RSA + Ed25519 DKIM keys inside an isolated local directory tree.
  • Production Linux Mode (PANEL_SYSROOT=/): Targets native Ubuntu 22.04/24.04 LTS and Debian 12 paths (/etc/nginx, /etc/php/*/fpm/pool.d, /etc/bind/zones, /etc/postfix, /etc/dovecot, /etc/rspamd) with atomic file replacement, pre-flight syntax checks (nginx -t, named-checkzone, sievec), and systemd service reloads.

4. Solving Real-World cPanel Migration Pain Points

Replacing cPanel on production shared and agency servers requires more than CRUD forms—it requires compatibility with the subtle behaviors existing PHP and WordPress workloads depend upon:

Deterministic .htaccess-to-Nginx Compiler + Hybrid Apache Fallback (ADR-04)

CleanPanel parses standard Apache .htaccess files (RewriteCond, RewriteRule, Redirect, Header, custom ErrorDocument) and compiles them deterministically into native Nginx directives. When a legacy app relies on exotic module rules, toggling use_apache_backend seamlessly proxies that single virtual host to a loopback Apache worker without penalizing modern sites on the box.

  • ~60 MB Rspamd Mail Stack vs. ~1.2 GB SpamAssassin/Amavis (ADR-06): Traditional Perl SpamAssassin + Amavis pipelines routinely consume over a gigabyte of resident RAM even on lightly loaded VPS nodes. CleanPanel pairs Postfix and Dovecot Maildir quotas with C-native Rspamd for high-throughput DKIM signing, SPF/DMARC alignment checks, per-user spam thresholds, and HMAC single sign-on into Roundcube Webmail.
  • Streaming 1-Click cpmove Archive Importer (ADR-09): Our CpmoveHandler streams standard cpmove-<user>.tar.gz and cPanel full-backup tarballs, automatically normalizing MySQL 8 / MariaDB 10.11 collations (such as translating utf8mb4_0900_ai_ci cleanly on MariaDB hosts), restoring Maildir trees and Dovecot password hashes without forcing password resets, and re-issuing Let’s Encrypt certificates.
  • 620 Automated Verification Checks: Every release is gated by 170 unit tests across all four packages, 450 four-tier end-to-end API and UI workflow tests, and a 44-check repository leak and artifact integrity verifier (npm run verify).

5. Clone, Run, and Contribute Under the MIT License

The complete monorepo—including all four TypeScript packages, systemd production unit files, the 43-screenshot clean-room reference library, and all 12 architectural & competitor-audit documents—is live now on GitHub under the MIT License:

git clone https://github.com/rbaindourov/cpanel-clean-room.git
cd cpanel-clean-room
npm install

# Run strict TypeScript build, 170 unit tests, and 44-check integrity audit
npm run build && npm test && npm run verify

# Launch CleanPanel locally in safe PANEL_SYSROOT sandbox mode on http://127.0.0.1:3000
npm start

Whether you are migrating WordPress and Multi-PHP workloads off rising per-seat licenses, auditing Linux privilege-separation patterns in TypeScript, or embedding modular hosting primitives into your own infrastructure, launch the live CleanPanel browser sandbox and explore the open-source repository on GitHub.

Robert Baindourov

Written by Robert Baindourov — Systems Architect

Senior systems architect, full-stack engineer, and creator of the multiDomainCMS web platform. Specializing in high-throughput React SSR, zero-downtime blue/green infrastructure, and native Linux telemetry.