Back to the episode map

Evergreen

OpenClaw Security Checklist Before You Connect Anything

Secure an OpenClaw experiment with isolation, least privilege, pairing, protected secrets, restricted tools, logs, backups, audits, and a tested shutdown.

Aug 4, 20269 min readBy Dalton Anderson

OpenClaw Security Checklist Before You Connect Anything

Secure OpenClaw before adding a chat channel, API key, personal file, browser session, or tool. Begin with a separate trust boundary, local-only gateway, strong authentication, no unnecessary tools, protected secrets, one approved sender, observable logs, and a tested way to stop the service.

OpenClaw can execute commands, read and write files, access network services, control paired devices, and send messages when the operator enables those capabilities. A personal-agent runtime should be treated like an administrator-in-training, not a harmless chat client.

This checklist covers a personal experiment. OpenClaw's current security documentation says one gateway assumes one trusted operator boundary. It is not a hostile multi-tenant boundary for unrelated or adversarial users.

Preflight map

ControlFailure it limitsEvidence to retain
Separate host or OS userAccess to personal and work dataHost, account, and allowed data inventory
Supported runtime versionsUndefined or broken startup behaviorVersion output and release checked
Loopback gateway with authenticationUnintended network controlBind, auth mode, and live audit result
Pairing and allowlistsUnknown senders triggering the agentApproved identities and rooms
Per-sender sessionsConversation context crossing usersSession scope and test transcripts
Minimal tool profilePrompt injection becoming host actionEffective tool inventory
Sandboxing and filesystem limitsBroad file and process accessSandbox status and mounted paths
SecretRefs and restrictive permissionsCredential disclosureSecret audit and file-permission review
Protected logs and backupsSensitive history exposure or unrecoverable stateRetention, backup, and restore test
Kill switch and recovery planRunaway automation or compromised tokenTested stop, revoke, and rebuild steps
flowchart TD
    A["Isolated host or OS user"] --> B["Supported runtime and pinned release"]
    B --> C["Local authenticated gateway"]
    C --> D["No-tool or messaging-only agent"]
    D --> E["One paired or allowlisted sender"]
    E --> F["Direct text verification"]
    F --> G["Security and secret audits"]
    G --> H{"All evidence clean?"}
    H -->|No| I["Stop and remediate"]
    H -->|Yes| J["Add one bounded capability"]
    J --> G

The loop repeats every time the system gains a channel, plugin, tool, node, secret, or network surface.

1. Define one trust boundary

Decide who owns the gateway and which data that operator may expose to it. If two people do not trust each other with the same agent tools and history, they need separate gateways and ideally separate OS users or hosts.

Do not place a first experiment on a primary work machine, production server, or personal account profile. Use a disposable device, virtual machine, dedicated OS account, or isolated host with no production credentials.

Write down the approved directories, accounts, channels, and services. Everything else begins out of scope.

2. Pin the release and verify prerequisites

Record the OpenClaw release, source commit, Node.js version, package manager, operating system, and installation route.

The current getting-started guide lists explicit supported Node.js ranges. OpenClaw 2026.7.1 rejected the editorial test environment's Node 24.14 runtime because that release requires Node 24.15 or later in the Node 24 line. That is a useful fail-closed result.

Do not bypass a version gate to finish setup quickly. Upgrade through the supported Node path, then repeat the version check.

Keep automatic updates off until the operating policy defines who reviews a new release, how the change is tested, and how to roll back.

3. Keep the gateway local and authenticated

Start with loopback binding. Do not expose the gateway to a LAN, public address, tunnel, or reverse proxy during initial setup.

Use a long random gateway token or another supported authentication mode. Store the credential outside prompts and repositories. Protect the state and configuration directories so other local users cannot read or modify them.

Run OpenClaw's audit after the gateway configuration changes.

openclaw security audit
openclaw security audit --deep

Review each finding. The --fix option performs only named safe remediations. It is not a blanket security approval.

Remote access is a separate project. The gateway exposure runbook should control that work, including authentication, allowed origins, proxy identity, rate limits, rollback, and live probes.

4. Start without powerful tools

Use a messaging-only or stricter tool profile for the first channel test. Deny process execution, filesystem mutation, browser control, web retrieval, scheduled automation, cross-session control, gateway control, and node actions unless the specific test requires one.

OpenClaw's security guide recommends limiting the tool blast radius before relying on model behavior. System instructions are soft guidance. Tool policy, sandboxing, filesystem limits, and execution approvals are stronger controls.

List the effective tools as evidence. Do not rely on what a configuration file appears to say if plugins or agent-level overrides can add capabilities.

5. Restrict senders and rooms

Use pairing or an explicit allowlist for direct messages. Do not set the direct-message policy to open. Pair one operator and confirm that an unknown sender cannot trigger the agent.

Use a guild and channel allowlist for Discord. Keep mention gating on for shared rooms. A private server limits discovery but does not replace identity policy.

If several approved people can send direct messages, use per-channel and per-sender session isolation. OpenClaw's session guide warns that direct messages otherwise share the main session by default.

Test the denial path. Security is not verified until an unapproved identity and unapproved channel both fail in the expected way.

6. Store secrets outside agent reach

Treat bot tokens, API keys, gateway credentials, OAuth refresh material, service-account keys, and webhook secrets like passwords.

OpenClaw's secrets guide supports SecretRefs for many credential fields. A reference can resolve from an environment, protected file, or approved command provider. Plaintext remains supported, which means the operator must choose the safer path.

SecretRefs do not help if the agent can read the source file, environment, command output, or state directory. Limit filesystem and process tools so the agent cannot retrieve its own credentials.

Run the secret audit before and after migration.

openclaw secrets audit --check
openclaw secrets configure --apply
openclaw secrets audit --check

Do not paste a token into chat so the agent can configure itself. Set the secret from a trusted shell or secret manager, then give the agent only the reference.

7. Use least privilege in the external platform

A Discord bot should not receive Administrator merely to avoid troubleshooting. OpenClaw's current Discord guide lists a smaller text-channel baseline, and Discord's permissions documentation says apps should request only the permissions they need.

Use a dedicated bot application and a dedicated test server. Restrict its server and channel role. Do not automate a normal user account.

Enable only the required privileged intents. Message Content Intent is required for the documented OpenClaw flow. Server Members Intent is needed for certain member resolution and role-allowlist features. Presence is optional.

8. Treat all content as untrusted

An allowlisted operator can send a malicious web page, document, email, code sample, or forwarded message without realizing it. Prompt injection enters through content as well as unknown senders.

Keep web, browser, email, file, and attachment tools disabled until the agent has a narrow sandbox and the workflow requires them. Route untrusted content to a read-only agent with no secrets or host tools when possible.

Use a strong current model for tool-enabled work. OpenClaw's security guidance warns that smaller and heavily quantized models can be more susceptible to instruction hijacking. A small local model is safer when the job is trusted text conversation with no tools.

9. Isolate execution and files

Enable an appropriate sandbox before allowing process or filesystem tools. Verify that the sandbox mode is active, not merely configured.

Mount only the required workspace. Do not mount a home directory, credential directory, Docker socket, browser profile, cloud-sync directory, or production repository into a general agent sandbox.

Keep elevated execution disabled. Require approvals for commands that cross the known allowlist. A command-name allowlist cannot understand every script, interpreter argument, or code path.

Separate local inference from host administration where practical. A model server can run on a dedicated node without giving the conversational agent broad access to that node.

10. Protect logs, transcripts, and state

OpenClaw state can contain conversations, pairing approvals, identifiers, configuration, tool records, and operational history. Treat it as sensitive data.

Set restrictive file permissions. Keep state out of consumer sync folders unless that storage path has been reviewed. Define retention and deletion. Back up only what is necessary and encrypt the backup.

Test a restore in the disposable environment. A backup that has never been restored is a theory.

Redaction lowers risk but does not guarantee that prompts, tool results, URLs, filenames, or external content are safe to share.

11. Build the shutdown and incident path

Know how to stop the gateway, disable its background service, revoke the Discord bot token, rotate provider keys, remove a paired node, disable a plugin, and isolate the host from the network.

Perform a controlled stop before adding tools. Confirm that the bot goes offline and the process does not automatically restart through an unexpected supervisor.

If a secret appears in a prompt, log, screenshot, or transcript, treat it as exposed. Revoke or rotate it. Editing the visible record is not enough.

If the agent performs an unexpected action, preserve logs and state for review before wiping the test environment, unless continued operation creates greater harm.

12. Add one capability at a time

After the text-only path is stable, add one tool or integration with a named task and acceptance test. Re-run the security and secret audits. Recheck the effective tool inventory, filesystem access, network endpoints, and sender policy.

Do not add browser control, email, cloud drives, shell, and scheduled jobs in one step. When something fails, the operator should know which new authority caused the change.

The completion standard

The preflight is complete when the operator can identify every allowed sender, channel, tool, directory, endpoint, credential source, persistent service, and recovery action.

The system should reject an unknown sender, deny an unapproved tool, keep secrets out of readable files, survive a restart, produce useful diagnostics, and stop on command.

Only then is it reasonable to follow the [[How to Connect OpenClaw to Discord Without Guessing|OpenClaw Discord setup guide]]. For the architecture behind the checklist, read [[What Is OpenClaw]].

Verification and disclosure

This checklist was checked on July 27, 2026 against OpenClaw release 2026.7.1 at commit 2d2ddc4, current OpenClaw security, exposure, secrets, sessions, pairing, Discord, sandbox, and audit documentation, current Discord developer documentation, and both E111B transcripts.

It is a defensive setup framework, not a security certification. Configuration keys, defaults, threat models, and supported remediations can change. AI assisted with research organization and drafting; evidence boundaries and final editorial decisions remain Dalton Anderson's.

Sources

Follow the evidence.

  1. application quick startdocs.discord.com
  2. pairing guidedocs.openclaw.ai
  3. Gemma 4 model overviewai.google.dev
  4. OpenClaw release 2026.7.1github.com
  5. `2d2ddc4`github.com
  6. OpenClaw getting-started guidedocs.openclaw.ai
  7. OpenClaw security guidedocs.openclaw.ai
  8. Gemma documentationai.google.dev
  9. secrets guidedocs.openclaw.ai
  10. Developer Policysupport-dev.discord.com
  11. local-model guidedocs.openclaw.ai
  12. Ollama provider guidedocs.openclaw.ai
  13. OAuth2 and permissions guidedocs.discord.com
  14. official Discord guidedocs.openclaw.ai
  15. OAuth2 referencedocs.discord.com
  16. Gateway documentationdocs.discord.com
  17. Gemini API pricing pageai.google.dev
  18. Gemma 4 library recordollama.com
  19. session guidedocs.openclaw.ai
  20. Gemma 4 model cardai.google.dev
OpenClaw Security Checklist Before You Connect Anything