Minimal go-live on a remote Mac: official curl installer or npm global, loopback gateway on 18789, OPENCLAW_GATEWAY_TOKEN on /v1/health, then openclaw doctor and openclaw config validate in one script.
This removes Node versus launchd drift, PATH split-brain, and wrong-interface curls. Widen binds only after token auth hardening. Below: install matrix, loopback probe, daemon boot ritual, chained acceptance, error table, FAQ.
Node 22 or newer prerequisites on remote Mac
Use Node 22 LTS or Node 24; log node -v first in every bootstrap so CI artifacts prove the runtime line matches your internal standard operating procedure.
Export OPENCLAW_HOME and OPENCLAW_CONFIG_HOME per principal, chmod 700 the tree, and mirror the same PATH inside launchd that your operator shell used when validating openclaw --version. Interactive-only nvm shims are a frequent reason openclaw works in SSH but disappears for the daemon.
Install path choice: official curl installer versus npm global
Pick exactly one path per golden image and record the semver in your change-management ticket so security reviewers can diff release notes without guessing which binary landed on the host.
| Path | When it shines | Operational notes |
|---|---|---|
| Official installer (curl) | Fresh Mac quickstarts matching upstream copy-paste. | Capture verbose once; bake deps into golden images. |
| npm install -g (pinned range) | Fleets with npm mirrors and semver approvals. | npm install -g "openclaw@^2026.3.0"; then command -v openclaw and openclaw --version. |
Unattended runners should merge stdout and stderr from doctor and validate into one log file the way non-interactive onboard describes so secret scanners never see echoed tokens.
Loopback gateway on port 18789 with OPENCLAW_GATEWAY_TOKEN
Bind to loopback while learning defaults; the documented local listener sits on 18789. Map OPENCLAW_GATEWAY_TOKEN like a Kubernetes SecretRef into GitHub Actions env:, Azure DevOps secret variables, or plist EnvironmentVariables—never print it to build summaries or Slack.
Probe http://127.0.0.1:18789/v1/health with Authorization: Bearer …; expect HTTP 200 when the token matches and 401 when you omit the header so you know authentication is enforcing before you attach clients.
export OPENCLAW_GATEWAY_TOKEN="$(cat "${RUNNER_TEMP:-/tmp}/gw.token")"
curl -fsS -o /dev/null -w "%{http_code}\n" \
-H "Authorization: Bearer ${OPENCLAW_GATEWAY_TOKEN}" \
"http://127.0.0.1:18789/v1/health"
Daemon registration and boot continuity on macOS
Run openclaw onboard --install-daemon as the service account that will own production traffic, then openclaw gateway status so labels match what observability will scrape.
Reboot during a maintenance window, log back in, and immediately run openclaw gateway status followed by the curl health probe. Green in your shell but red in automation almost always means different OPENCLAW_CONFIG_HOME values between the interactive profile and the plist.
Dashboard workflows for skills belong in skills rollback and doctor; this page stays focused on gateway install acceptance.
Chain doctor, config validate, and health for go-live acceptance
Chain with && so failures short-circuit: openclaw doctor, openclaw config validate --config "$OPENCLAW_CONFIG_HOME/openclaw.json", then the bearer curl to 127.0.0.1:18789. Add openclaw gateway status when you need JSON for dashboards; merge streams per status plus doctor CI gate.
#!/usr/bin/env bash
set -euo pipefail
node -v
command -v openclaw
openclaw --version
openclaw doctor && \
openclaw config validate --config "${OPENCLAW_CONFIG_HOME}/openclaw.json" && \
curl -fsS -o /dev/null \
-H "Authorization: Bearer ${OPENCLAW_GATEWAY_TOKEN}" \
"http://127.0.0.1:18789/v1/health"
Common error fingerprints and rollback discipline
Diff stderr against the upstream troubleshooting page that matches your installed semver—wording shifts between minors. Roll back by restoring the last tarball of openclaw.json, reinstalling the prior npm range, and performing a single launchctl unload or load cycle so partial state cannot straddle two configs.
| Symptom or log cue | Likely cause | Stabilizing move |
|---|---|---|
| Process exits right after widening bind away from loopback | Empty OPENCLAW_GATEWAY_TOKEN while exposure is enabled. |
Populate the token from secrets, reload launchd, re-read upstream security text. |
HTTP 401 on /v1/health |
Header missing, wrong scheme, or newline-truncated secret. | Match the documented Authorization: Bearer spelling; rotate the token if copied incorrectly. |
EADDRINUSE on 18789 |
Duplicate gateway or stale CI smoke job. | Use lsof to identify the PID, stop the stray process, or move disposable tests to another host. |
command not found: openclaw under launchd |
Daemon PATH lacks global npm bin. | Point ProgramArguments at the absolute openclaw binary or export PATH in the plist. |
Validate paths: config validate gate.
FAQ
Should ephemeral PR runners install the daemon? Prefer CLI-only checks so parallel jobs never fight over the same 18789 listener; install launchd only on long-lived remote Mac nodes.
Why loopback first? It keeps accidental LAN exposure off the critical path while you still learn token rotation and plist wiring; widen only when upstream exposure rules and your edge proxy are both ready.
Can validate replace doctor? No—doctor surfaces filesystem and runtime warnings that validate alone will not catch; both commands are cheap compared with an outage.
Where to buy hardware time? Open pricing, complete purchase, and read help if provisioning questions block you.
Summary and purchase guidance
You now have a minimal reproducible checklist aligned with 2026 gateway documentation themes: Node 22+, a single install path, 127.0.0.1:18789 with OPENCLAW_GATEWAY_TOKEN, openclaw onboard --install-daemon for continuity, and a chained script combining openclaw doctor, openclaw config validate, and curl health.
When procurement approves a dedicated remote Mac, walk home for product context, compare pricing, finish purchase, and keep help open during first boot. Return to the technical blog index for deeper OpenClaw matrices once the gateway is green.
Leadership metric: mean minutes from reboot to green /v1/health—shrink that number and most operational arguments disappear.
Remote Mac for OpenClaw gateways
Apple Silicon, loopback-first checks, launchd-friendly paths—public pricing and help.