Free, open-source deployment for cPanel — Git push → build → deploy, like Vercel, but you own the server.
Hcpanel is built for developers who host on shared cPanel or a VPS: no SaaS subscription, no feature tiers, no vendor lock-in. Install once on your account, connect GitHub or GitLab, and ship.
This repo follows the cPanel Vercel-like deployment blueprint (webhook → build → daemon → proxy → optional preview DNS). See docs/BLUEPRINT_STATUS.md for what is implemented vs planned.
| Price | $0 forever — MIT licensed |
| Features | Everything in the repo is included (webhooks, dashboard, previews, rollback, SSE logs, CLI) |
| Hosting | Self-hosted on your machine — your code never has to leave your server |
| Future work | New capabilities land in open source for all users, not behind a paywall |
Contributing · Report a bug · Security
- GitHub & GitLab webhook deployments with signature verification
- Build runner with resource limits and 10-minute timeout
- Process daemon with port assignment on
127.0.0.1 - Apache
.htaccessreverse proxy generation - Preview subdomains via cPanel UAPI (optional)
- Real-time build logs (SSE)
- Web dashboard (React + Tailwind)
- Rollback, proxy test, environment probe
git clone https://github.com/gittare/Hcpanel.git
cd Hcpanel
npm install && npm run setup && npm run build:dashboard && npm startDeploy your app (one command — auto-detects Next.js, Express, Node, static, FastAPI):
hcpanel quick /home/you/public_html/my-app
# or from your project folder:
cd my-app && hcpanel upOpen the dashboard at http://127.0.0.1:9877, paste your api_key, or use Quick deploy with the same folder path.
After the first deploy, copy the webhook URL from the dashboard into GitHub/GitLab — every push redeploys automatically.
hcpanel quick [path] # Easiest — create + deploy from folder path
hcpanel deploy <name> # Redeploy an existing project
hcpanel projects # List projects
hcpanel status # Running apps
hcpanel probe # Environment checkAdd --wait to block until the build finishes.
Demo app: npm run deploy:demo
curl -fsSL https://raw.githubusercontent.com/gittare/Hcpanel/main/scripts/install.sh | bashOr from this repo:
bash scripts/install.shcp config.example.toml ~/.deployer/config.toml
# Edit secrets — see install.sh for keys
npm install
npm run build:dashboard
npm run start:daemon # terminal 1
npm run start:api # terminal 2Open http://127.0.0.1:9877 and sign in with api_key from ~/.deployer/secrets.json.
- Create a project in the dashboard (or
POST /api/projects). - GitHub → Settings → Webhooks:
- URL:
https://YOUR_DOMAIN/api/webhooks/github/{projectId} - Secret: project
webhook_secret - Events: Push
- URL:
- GitLab → Settings → Webhooks:
- URL:
https://YOUR_DOMAIN/api/webhooks/gitlab/{projectId} - Secret token: same
webhook_secret - Trigger: Push events
- URL:
POST /api/projects/:id/rollback— restore previous successful releasePOST /api/deployments/:id/rollback— redeploy a specific past release- Optional body:
{ "rebuild": true }to run install/build before restart
POST /api/system/test-proxy with { "projectId": "..." } — verifies .htaccess, port, and HTTP upstream.
Hcpanel is designed to run bound to localhost (127.0.0.1) on the API and process daemon. Put it behind your domain’s reverse proxy (Apache/nginx) for HTTPS; do not expose ports 9876/9877 or app ports 4000–5999 to the internet.
| Control | Description |
|---|---|
| API auth | Authorization: Bearer <api_key> only (query-string keys are rejected) |
| Secrets file | ~/.deployer/secrets.json should be mode 600 |
| Webhooks | HMAC (GitHub) / token or signature (GitLab); 256 KB body limit + rate limit |
| Paths | Project root_path / docroot must stay under the cPanel user home |
| Build commands | JSON argv arrays only — no shell metacharacters |
| Notify URLs | SSRF guard blocks loopback and private IPs |
| Git | HTTPS or git@host:path only; shallow clone |
| Rate limit | Configurable via [security] rate_limit_max in config.toml |
After npm install, run npm audit and keep dependencies updated.
- Run as the cPanel user, not root.
- Whitelist
apachectl -k gracefulin sudoers if using userdata vhosts. - Ensure
mod_proxyis enabled or rely on.htaccesswhere allowed. - Block ports
4000-5999from external access in the host firewall.
GitHub → API (webhook) → SQLite job queue → deploy orchestrator
→ git pull → npm build → process daemon → .htaccess proxy
MIT — use, modify, and distribute freely. Commercial use is allowed.
Hcpanel is free to use. If it helps your workflow, you can support ongoing development: