A portable, native Laravel local development engine and runtime orchestrator for Windows written in Rust, with an embedded React Web UI.
- Portable & Zero Host Pollution: All runtimes, binaries, configs, and logs live inside
~/.harborphp/. No global PHP installation, WSL2 VM, or heavy background Windows services. - Native FrankenPHP Runtimes: Download and switch between multiple FrankenPHP Windows versions per project. Each project runs on its own configurable localhost port (
127.0.0.1:<port>). - Win32 Process Isolation: Spawns child runtimes and workers inside a Windows Job Object (
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE), so exiting or crashing HarborPHP leaves zero orphan processes. - Built-in Worker Supervisor: Start, stop, and auto-restart
php artisan queue:workandphp artisan schedule:workper project. - Embedded Web Console (
127.0.0.1:9090):- Grouped project tree table (
Office→CMS,WEB) with live CPU/RAM telemetry. - Built-in PHP extension checkboxes (
pdo_mysql,pgsql,gd,intl,mbstring, etc.) generating per-projectphp.ini. - Real-time log viewer supporting both
laravel.logand daily logs (laravel-YYYY-MM-DD.log), plus proxy and worker logs. - Streaming
artisanandcomposercommand runner. - Native Windows folder picker when registering projects.
- Grouped project tree table (
- CLI & System Tray: Run
harbor php,harbor composer, andharbor artisanfrom any project directory, and manage the daemon from the Windows System Tray. - Localhost Security: Strict
127.0.0.1bind,Host/Originvalidation, and auto-generated session token to guard local execution APIs against CSRF/DNS rebinding.
- Download
HarborPHP-Setup-<version>.exefrom the GitHub Releases page. - Run the setup wizard (no Administrator privileges required; installs per-user and optionally adds
harborto yourPATH). - Launch HarborPHP from the Start Menu or run:
harbor upRequires Rust (stable) and Node.js 24+.
git clone https://github.com/andrraa/harbor-php.git
cd harbor-php
# 1. Build the embedded React UI
cd ui
npm install
npm run build
cd ..
# 2. Install `harbor.exe` to %USERPROFILE%\.cargo\bin
cargo install --path .
# 3. Start the daemon & open the dashboard
harbor upOpen the authenticated URL printed in the terminal (or right-click the HarborPHP icon in the Windows System Tray → Open Dashboard).
- Open Runtime Hub in the Web UI and click Install / Update Caddy & Composer, then download a FrankenPHP release.
- Click New Project, pick your Laravel folder using Browse, assign an optional group and port, and click Start.
- Run project-scoped CLI commands directly in your terminal:
cd E:\Projects\my-laravel-app
harbor php -v
harbor composer install
harbor artisan migrateConfiguration is stored in ~/.harborphp/config.toml:
| Key | Default | Description |
|---|---|---|
dashboard_port |
9090 |
Localhost port for the embedded Web UI (127.0.0.1). |
auth_token |
(auto-generated) | 48-character hex token used to authenticate dashboard sessions. |
projects[].port |
8001+ |
Direct HTTP port served by that project's FrankenPHP instance. |
projects[].group |
"" |
Optional tree group name displayed in the Projects table. |
projects[].php_version |
(selected) | Installed FrankenPHP runtime directory name under ~/.harborphp/runtimes/frankenphp/. |
Directory Structure & CLI Reference
~/.harborphp/
├── config.toml # Engine settings & registered projects
├── bin/ # caddy.exe, composer.phar, php.exe shim
├── runtimes/
│ └── frankenphp/
│ └── <version>/ # Extracted FrankenPHP Windows runtime + ext/
├── configs/
│ └── projects/<id>/ # Generated php.ini & per-project Caddyfile
└── logs/ # Per-project HTTP & worker logs
harbor init— Initialize~/.harborphp/and defaultconfig.toml.harbor up— Start the daemon, System Tray icon, and Web UI.harbor php [args...]— Runfrankenphp php-cliusing the active project's runtime andphp.ini.harbor composer [args...]— Run portable Composer using the active project's runtime.harbor artisan [args...]— Shortcut forharbor php artisan ....harbor project list/harbor project add <path> --group Office --port 8001 --php 1.4.4harbor runtime list/harbor runtime install <version>/harbor runtime install-tools
Building Releases & Windows Installer Locally
Pushing a version tag triggers .github/workflows/release.yml on windows-latest, which builds the UI, runs tests, packages a portable ZIP, compiles the Inno Setup .exe wizard installer, and publishes a GitHub Release with SHA256SUMS.txt:
git tag v0.1.0
git push origin v0.1.0Install Inno Setup 6 (winget install JRSoftware.InnoSetup) and run:
.\scripts\build-release.ps1 -Version 0.1.0Artifacts are written to dist-release/:
HarborPHP-Setup-0.1.0.exe— Windows setup wizard (per-user install, optional PATH & Desktop shortcut, uninstaller).harborphp-windows-x86_64-0.1.0.zip— Portable archive.
# Frontend type-check & production bundle
cd ui
npm run build
cd ..
# Rust unit & integration tests (includes Win32 Job Object & security middleware tests)
cargo testIssues and pull requests are welcome. Please keep changes focused, run npm run build (in ui/) and cargo test before opening a PR, and follow Conventional Commits (feat:, fix:, chore:, docs:).
This project is licensed under the MIT License. See LICENSE for details.