Credential Rotation
NemoClaw uses different rotation paths for inference, messaging, and web search credentials. Inference credentials can normally be updated while reusing the existing sandbox. For an active Telegram, Discord, Slack, WeChat, or Microsoft Teams channel, onboarding runs the configured checks for a supplied replacement credential before it transfers the complete native home/workspace, recreates the sandbox, and restores the transfer. Some channels cannot prove that a non-empty credential is valid until the recreated runtime connects, so complete the post-recreation verification on this page before treating the rotation as successful. The transfer preserves durable content beneath the resolved native home/workspace root. It omits generation-local agent authority such as gateway credentials, PID files, and lock receipts that the replacement regenerates, and it does not copy OpenShell-owned host state outside that root. Web search settings require recreation because their configuration is applied when the sandbox image starts.
Before You Start
List the provider names registered with the OpenShell gateway.
The output is authoritative for commands that accept an OpenShell provider name.
An inference provider is commonly named nvidia-prod, while an onboarded web search provider is commonly named <sandbox>-brave-search or <sandbox>-tavily-search.
Provider names can differ with your selected inference route and sandbox configuration.
Per-sandbox messaging bridge names are not resettable credentials.
Use the onboarding rotation flow below to replace an active messaging credential.
Use channels add, channels remove, or channels stop to manage integrations instead of passing a bridge name to credentials reset.
Rotate an Inference API key
Supply the replacement key and rerun onboarding for the existing sandbox. Read replacement credentials silently on a trusted host so their values do not enter shell history or terminal scrollback. Unset each variable after the command finishes.
Onboarding updates the selected OpenShell inference provider and reuses the sandbox when its recorded configuration is still compatible. If onboarding detects other configuration drift, review the requested rebuild or recreation before continuing.
For an interactive rotation, export the replacement key and run nemoclaw onboard --name <sandbox> without the non-interactive flags.
Rotate a Messaging Credential
Supply the replacement credential and rerun onboarding for the existing sandbox.
Understand the Recreation Boundary
For each supported active-channel credential that you supply, NemoClaw compares the replacement with the SHA-256 hash in the sandbox registry. NemoClaw runs each changed value through the checks configured for that channel before it backs up or replaces the sandbox. It then transfers the complete native home/workspace, destroys and recreates the sandbox, and restores the transfer. The transfer preserves durable content beneath the resolved native home/workspace root. It omits generation-local agent authority such as gateway credentials, PID files, and lock receipts that the replacement regenerates, and it does not copy OpenShell-owned host state outside that root. If an available pre-recreation check fails, onboarding leaves the existing sandbox unchanged. Discord verifies the replacement token before recreation. Rejected, rate-limited, unreachable, or timed-out verification stops rotation and leaves the existing sandbox unchanged. Correct the token or host access, wait before retrying a rate-limited request, then rerun onboarding with the replacement. Microsoft Teams requires non-empty replacement input but cannot prove upstream credential validity before recreation. An invalid non-empty Teams replacement can surface only after recreation. For every channel, verify a live messaging request after onboarding finishes. If the recorded channel state changes during rotation, onboarding stops before it replaces the sandbox. Rerun onboarding so it uses the updated channel state.
Understand Credential Handling
Onboarding reads the replacement from the host environment and registers it with the sandbox-specific OpenShell messaging provider.
The sandbox registry stores the credential hash, not the credential value.
The unset command in each procedure removes the value from the current host shell after onboarding.
OpenShell retains the registered credential until a later rotation or channel removal replaces or removes it.
A channel stopped with channels stop remains inactive, and its replacement environment variable does not trigger recreation.
Run nemoclaw <sandbox> channels start <channel> before this rotation procedure when you intend to activate the replacement credential.
Slack
Slack requires both replacement tokens.
Telegram
Discord
The same onboarding flow evaluates active WECHAT_BOT_TOKEN and MSTEAMS_APP_PASSWORD bindings.
Supply the replacement credential together with any required channel configuration.
Rerun onboarding interactively when the channel uses a guided credential flow such as WeChat pairing.
For other channels add management, run the command from a terminal and omit NEMOCLAW_NON_INTERACTIVE=1 and token variables to be prompted for values and offered an interactive rebuild. A session without a terminal on stdin fails fast on a missing token instead of prompting for it. When token variables are set, that session queues the change for a manual rebuild.
Rotate a Web Search Key
Web search provider configuration and credential attachment are baked into the sandbox image. Select the provider again and recreate the sandbox so the replacement becomes active.
OpenClaw supports Brave or Tavily through NemoClaw onboarding.
To rotate a Tavily key instead, read and export TAVILY_API_KEY silently and select NEMOCLAW_WEB_SEARCH_PROVIDER=tavily.
Remove and Re-register a Provider Credential
Use credentials reset only when you need to remove an inference or web search provider before its replacement is available.
Run nemoclaw credentials list first, then pass the provider name from that output.
Native providers for NVIDIA Endpoints and supported fixed hosted selections cannot be reset while a sandbox records an attachment to them.
Use Rotate an Inference API key to replace the credential in place, supplying the credential variable for the selected provider.
To remove it completely, preserve required sandbox state, destroy every attached sandbox, and then reset the provider name reported by credentials list. For example, for NVIDIA Endpoints:
Removing a provider interrupts requests that depend on it. Re-register an inference provider with the inference rotation command above. For web search, repeat the matching web search onboarding flow and recreate the sandbox.
Do not pass a messaging bridge name to credentials reset.
Use the messaging rotation flow above to replace a credential, or nemoclaw <sandbox> channels remove <channel> to retire the integration.
Emergency Rotation After Key Compromise
If a credential was exposed, act in this order:
-
Revoke the exposed credential at the upstream provider before relying on any local cleanup.
-
For inference, keep the provider registered if you have a replacement or can issue one promptly. Issue a needed replacement in step 4, then use Rotate an Inference API key in step 5. If you cannot yet issue an inference replacement, follow Remove and Re-register a Provider Credential. For native inference in that removal path, preserve required state and destroy every attached sandbox before resetting the provider. For web search without a replacement, remove the provider shown by
nemoclaw credentials list. -
For messaging without a replacement, use
channels removeto retire the integration. Follow Remove a Channel to complete its cleanup. Review recent logs as in step 7. Then stop this procedure for the removed channel. If you obtain a replacement later, follow Add Channels After Onboarding to register it again. -
If you do not already have a replacement, issue one at the upstream provider.
-
Follow the matching rotation procedure on this page once. For messaging, onboarding runs the channel’s configured checks before automatic recreation.
-
Complete a real request through the affected inference, search, or messaging integration.
-
Review recent sandbox logs for unexpected authentication failures or use of the retired credential:
Rotate an Inference Key in CI/CD
Supply credentials through the CI system’s secret store and inject them as environment variables. Non-interactive onboarding must include the third-party software acceptance flag.
Do not commit credential values or host-side NemoClaw state to the repository. Plan for recreation downtime when automating messaging or web search rotation.
Verify the Replacement
nemoclaw credentials list confirms that a provider exists, but it does not reveal or validate the stored value.
nemoclaw status performs host-side reachability checks without sending cloud API keys, so even an HTTP 401 or 403 can count as reachable there.
On a normal read with verified gateway and sandbox state, nemoclaw <name> status checks the provider path and sends an inference request through the stored credential when the path is reachable. It reports unauthorized when the route rejects the request with HTTP 401 or 403 and does not retry that rejection.
If gateway or sandbox state is not verified, status reports Inference: not verified (gateway/sandbox state not verified) and sends no inference request.
If status reports Inference: not probed (another lifecycle operation is in progress), the credential was not checked; JSON output sets inferenceProbeSuppressed: true. Repeat status after the lifecycle operation completes before accepting it as credential evidence.
nemoclaw inference get reports the active route and does not authenticate a model request.
Complete a real request through the rotated integration before declaring the rotation successful.
Verify an inference key by running an isolated OpenClaw turn and confirming that it returns the requested content.
To verify messaging, send a test message from an allowed account and confirm the sandbox receives it and responds. To verify web search, ask the agent to perform a search and confirm that the tool returns current results without an authentication error.
Related Pages
- Credential Storage: how NemoClaw stores and protects credentials.
- Understand Runtime Changes: which changes take effect at runtime and which require recreation.
- Security Best Practices: recommended key scopes and operational hygiene.
- Switch Inference Providers: change the inference provider rather than rotate its key.