Skip to content

Start-HarborHealthWeb

Harbor HealthNo sign-in neededGenerated from the codeDescribes Health 0.22.0

Launches the local Harbor Health web console – a zero-dependency HttpListener server (bound to 127.0.0.1 only) over the module’s functions.

Terminal window
Start-HarborHealthWeb [[-Port] <int>] [[-AllowedHostname] <string[]>] [[-ConfigProfile] <string>] [-NoBrowser] [-Https] [-Http] [-AllowRemote]

Serves the SPA from WebUI/wwwroot and dispatches /api/* to the module via Invoke-HealthApiRoute. No external modules. The OAuth secret is supplied in the browser (or via HARBOR_OAUTH_SECRET) and held only in module memory. Blocks until Ctrl-C, the window closes, or POST /api/_stop. The explicit 127.0.0.1 prefix normally needs no admin rights.

Phase 2: the edge itself – the Host/Origin guard, the CSRF token, the operator gate, role enforcement, cookie flags, the static sandbox, the CSP and the authenticated /api/_stop – lives ONCE in the vendored platform (Platform/Web/Start-HarborModuleWeb.ps1, canonical in harbor-platform). What stays here is only what genuinely differs from the Onboard console: this product’s router, its CSP position (Health is EMBEDDED by Harbor Home rather than embedding anything), the cross-origin reads the shell makes, and the three monitoring hooks below. WHICH routes exist – and which are long-running, admin-only or destructive – is declared once in Private/Web/HealthRoutes.ps1 and read from there by the platform.

Terminal window
Start-HarborHealthWeb
Terminal window
Start-HarborHealthWeb -Port 9000 -NoBrowser

Not described in the module help.

Type Required Position Pipeline input
String[] No 1 No

Default: @().

Opt-in bind beyond loopback (‘+’ prefix; needs a urlacl bound via netsh).

Type Required Position Pipeline input
SwitchParameter No Named No

Not described in the module help.

Type Required Position Pipeline input
String No 2 No

Not described in the module help.

Type Required Position Pipeline input
SwitchParameter No Named No

HTTPS is the default whenever a certificate is bound to the port (Initialize-HarborTls, elevated, once per machine); without one the console falls back to plain http on loopback with a warning. -Https requires TLS (refuses to start without it); -Http serves plain http on purpose.

Type Required Position Pipeline input
SwitchParameter No Named No

Not described in the module help.

Type Required Position Pipeline input
SwitchParameter No Named No

Not described in the module help.

Type Required Position Pipeline input
Int32 No 0 No

Default: 8788.

This command also accepts the PowerShell common parameters (-Verbose, -ErrorAction, and so on).

Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.