Deploy NemoClaw to a Headless Server
Run NemoClaw on a remote Linux server through SSH without exposing the OpenShell gateway or dashboard to the network. This guide covers unattended onboarding, verified readiness, routine updates, and manual recovery after a host reboot.
Headless Describes Operation, Not a Provider
A Linux VM that you provision through Brev is one example of a headless server. These instructions also apply to Linux hosts on other clouds, VPS services, or on-premises infrastructure. NemoClaw setup starts after server provisioning and does not depend on Brev or its web UI.
Host Reboot Recovery Is Manual
NemoClaw does not guarantee that Docker, the OpenShell gateway, sandboxes, tunnels, or host forwards start automatically after a host reboot. Use the manual recovery sequence after each reboot. Do not install an unofficial service unit as a substitute for this sequence.
Check the Server
Use a Linux host that meets the supported NemoClaw prerequisites. The primary tested server path is Linux with Docker.
The image build, Docker daemon, and OpenShell gateway can exhaust a smaller host during onboarding. If the host has less than 8 GB of RAM, configure at least 8 GB of swap before onboarding.
Run these checks from the remote host:
docker info must succeed for the same account that runs NemoClaw.
Membership in the docker group grants root-level control of the Docker daemon, so grant it only to trusted accounts.
The host firewall must allow the outbound DNS, HTTPS, image-registry, package-registry, and inference-provider traffic selected during onboarding. The OpenShell policy controls traffic from the sandbox and does not replace the host firewall. Keep inbound dashboard and OpenShell gateway ports closed when you use SSH forwarding.
Keep Remote Access on Loopback
The OpenShell gateway binds to 127.0.0.1 by default.
Dashboard and API forwards also stay on loopback outside WSL unless you explicitly change the bind setting.
Connect to the server from your workstation:
After onboarding, keep the server-side forward on loopback and create a second SSH tunnel from your workstation.
The default dashboard port is 18789, but NemoClaw can select the next free port through 18799.
Use the port printed by nemoclaw headless-agent dashboard-url.
Then open the loopback URL printed by nemoclaw headless-agent dashboard-url --quiet on your workstation.
Replace both 18789 values when NemoClaw selected another port.
Do not open port 8080 for remote access.
Do not bind the dashboard to every interface when an SSH tunnel meets the access requirement.
Protect a Long Onboarding Run
Run onboarding inside a tmux or screen session so an SSH disconnect does not terminate the host process.
To start a tmux session, run:
Detach with Ctrl-b, then d while onboarding continues.
After you reconnect through SSH, reattach to the session:
To use screen instead, start a session:
Detach with Ctrl-a, then d while onboarding continues.
After you reconnect through SSH, reattach to the session:
Do not enable shell tracing with set -x in a session that contains credentials.
Do not save the session transcript when it can contain a dashboard URL or token.
If the onboarding process exited after it saved a resumable session, export the same required credential variables and resume it:
--resume uses the provider, model, sandbox name, agent, and completed non-secret choices from the saved session.
Raw credentials are not stored in the onboarding session.
If resume reports a missing credential variable, inject that variable again and repeat the command.
Use --fresh only when you intend to discard the saved onboarding session and start again.
Run Unattended Onboarding
Select a reviewed NemoClaw commit and set its full 40-character SHA before unattended installation.
The example uses that SHA in both the immutable bootstrap URL and NEMOCLAW_INSTALL_REF, so the bootstrap and cloned installer payload come from the same repository state.
Do not use the mutable lkg or latest references as the primary install source for a persistent server.
Inject provider credentials from your secret manager into the host environment before you run this example.
The example fails before the network install if the commit SHA or NVIDIA_INFERENCE_API_KEY is missing or invalid.
Pass every onboarding NEMOCLAW_* value on the bash side of the pipeline so the downloaded installer can read it.
The commit pin also appears in the bootstrap URL so no mutable tag selects the code that enters the pipeline.
Do not put a credential before curl, in a command-line argument, or in a committed script.
Unset the credential from the interactive shell after onboarding completes:
Use the matching credential variable when you select another provider. Refer to the CLI commands reference for provider-specific variables and accepted values.
Verify Readiness
Do not use process presence as the sandbox-ready signal.
The authoritative OpenShell signal is the exact row for headless-agent in phase Ready or Running.
The substring NotReady is not a ready state.
Run each verification on the remote host:
nemoclaw headless-agent status exits nonzero when the sandbox, gateway, local container, or authoritative inference route is not verified.
Its main Inference line probes https://inference.local/v1/models from inside the sandbox.
HTTP 200 through 499 reports reachable, while HTTP 500 through 599 reports unhealthy.
connect --probe-only waits up to 300 seconds by default for a cold sandbox to become ready.
It then verifies or repairs the in-sandbox agent process and host forwards without opening a shell.
It does not restart or replace the shared host OpenShell gateway.
Readiness requires all of these results:
- The exact OpenShell sandbox row is
ReadyorRunning. nemoclaw headless-agent statusexits with status0and reports the inference route asreachable.nemoclaw headless-agent connect --probe-onlyexits with status0.
Access the Dashboard and API
Retrieve dashboard URLs and API tokens only when you need them. Do not write either value to logs, shell history, support bundles, or version control.
Print the complete authenticated dashboard URL:
Use the raw gateway token only for automation that cannot use the tokenized dashboard URL. This example authenticates the supported Control UI configuration endpoint on the server loopback interface:
An unauthenticated request to this endpoint returns 401.
The static path controlui.bootstrap.config.json does not exist and returns 404.
OpenClaw generates a new gateway token each time the sandbox container starts. Retrieve the dashboard URL or token again after the container restarts or a replacement sandbox is created.
Understand Credential and State Boundaries
NemoClaw separates provider credentials, host metadata, and sandbox state.
NemoClaw holds an environment-supplied provider credential in memory while it registers the value with OpenShell. The sandbox receives a resolver placeholder, and OpenShell substitutes the raw value at egress. For details, refer to Credential Storage.
Install a declarative agent skill through the supported host command:
The skill directory must contain SKILL.md with a name field in its YAML frontmatter.
Do not assume that packages, shell exports, or profile edits made by a skill survive a rebuild.
Add a Least-Privilege Policy
Use an additive custom preset when the sandbox needs a destination that the current policy does not allow. Scope the host, port, method, path, and executable to the smallest required set.
Save a reviewed preset as ./presets/internal-status.yaml, preview it, then apply it without a prompt:
--yes skips the confirmation prompt but does not skip schema, destination, or SSRF validation.
NemoClaw records the full validated YAML content in the sandbox registry.
Snapshot restore and rebuild replay that recorded preset even when the original host file is unavailable.
Keep the source YAML in your configuration repository so operators can review and change it.
For the preset schema and removal workflow, refer to Network Policies.
Plan for Updates and Rebuilds
Create a named snapshot before host maintenance or a manual update:
Use a newly reviewed commit SHA for each planned update instead of relying on the mutable installer default.
The installer requires current backups before it changes an existing managed installation.
Use nemoclaw headless-agent rebuild when you need the current agent image while preserving supported state.
Snapshot only the state that the current agent manifest declares. Download any required file outside that contract before a destructive operation. Refer to Understand Sandbox State and Create and Restore Snapshots for agent-specific exclusions.
Recover After a Host Reboot
Use this sequence after every reboot until NemoClaw documents an automatic boot-persistence contract.
Start Docker first:
Ask NemoClaw to select the sandbox’s recorded OpenShell gateway and report the current failure layer:
If status reports that the sandbox container exists but is stopped, start it:
Wait for authoritative readiness and repair sandbox-scoped processes and forwards:
If the sandbox is ready but the in-sandbox agent gateway or host forward remains unhealthy, run:
recover, start, and connect --probe-only do not restart the shared host OpenShell gateway.
If they report a host gateway RPC error, follow the printed openshell status, named gateway start, or onboarding guidance.
If the registry entry remains but the sandbox container is missing, rebuild from recorded metadata and the latest valid snapshot:
Do not destroy the registry entry before this recovery attempt because rebuild needs that metadata. If you intentionally deleted the sandbox and want a new installation, destroy the stale registry entry and run onboarding again. For failure-specific recovery boundaries, refer to Recover and Rebuild Sandboxes.
Restart any operator-managed SSH or cloud tunnel after the sandbox and forwards pass verification.
Troubleshoot a Headless Deployment
Use the failure layer from nemoclaw headless-agent status before you choose a recovery action.
Onboarding Was Interrupted
Reattach to the tmux or screen session first.
If the process exited with a resumable session, inject the required credentials and use onboard --resume.
Do not use --fresh unless discarding the saved choices and progress is intentional.
The Sandbox Is Missing or Not Ready
Run openshell sandbox list and inspect the exact row for headless-agent.
NotReady does not satisfy readiness.
Run nemoclaw headless-agent status, then use its start, connect --probe-only, or rebuild --yes guidance.
Inference Returns HTTP 5xx
An HTTP status from 500 through 599 makes the authoritative inference.local route unhealthy.
Check the configured provider and host egress, then run:
Do not treat a running agent process as proof that inference works.
Dashboard or Token Retrieval Fails
Run nemoclaw headless-agent status and connect --probe-only before retrieving the URL or token again.
The token command exits nonzero when the sandbox is not registered, not running, or cannot expose its agent-specific token.
Do not paste a token into diagnostics.
For Docker, DNS, port, memory, provider, and recovery errors, refer to Troubleshooting.
Related Topics
- Update Sandboxes explains the maintained-release update path.
- Credential Storage explains the OpenShell provider boundary.
- CLI Commands Reference lists every command and environment variable.