๐Ÿ›ก๏ธ Security Checklist

Essential hardening for your OpenClaw installation

โš ๏ธ Don't Skip This

Shodan scans have found hundreds of OpenClaw gateways exposed to the internet with default settings. An exposed gateway gives attackers full access to your computer, files, and connected accounts.

1,987+

OpenClaw instances detected on the public internet โ€” many with security issues

๐Ÿ”” Latest: Update to 2026.2.1

Released Feb 2, 2026 โ€” includes multiple security fixes:

npm update -g openclaw && ocl gateway restart

๐Ÿ“ฐ Coverage: The Hacker News ยท The Register

Gateway Binding CRITICAL

By default, OpenClaw binds to all interfaces (0.0.0.0), making it accessible from the internet if your firewall allows it.

โœ“

Bind to loopback only

Unless you need remote access, bind to localhost so only local connections work.

# In your config.yaml or via CLI:
gateway:
  bind: "0.0.0.0"  # โŒ BAD - exposed to network
  bind: "loopback"  # โœ… GOOD - localhost only
  bind: "127.0.0.1" # โœ… GOOD - same as loopback
โœ“

Check current binding

Run this to see what your gateway is bound to:

openclaw config get gateway.bind
# Or check what's listening:
lsof -i :3000 | grep LISTEN
netstat -an | grep 3000

Authentication CRITICAL

Control who can interact with your gateway and through which channels.

โœ“

Set DM policy to "pairing"

Require manual approval before new devices/users can interact.

# In config.yaml:
gateway:
  dmPolicy: "pairing"  # โœ… Requires approval
  dmPolicy: "open"     # โŒ Anyone can message
โœ“

Whitelist allowed user IDs

Only allow specific user IDs to interact with your bot.

# In your channel config:
telegram:
  allowedUsers:
    - "123456789"  # Your Telegram user ID
    - "987654321"  # Family member, etc.
โœ“

Set a gateway token

If exposing API endpoints, require authentication.

gateway:
  token: "your-secret-token-here"

Tool & Shell Access HIGH

Control what the AI can do on your system.

โœ“

Enable sandbox mode for group chats

Limit tool access when in shared/group contexts.

# In AGENTS.md, add guidelines:
## Group Chat Rules
- Never run shell commands in group chats
- No file access outside designated folders
- Ask before any external actions
โœ“

Review tool allowlist

Check which tools are enabled and disable any you don't need.

openclaw config get tools
# Disable dangerous tools if not needed:
tools:
  exec: false  # No shell commands
  browser: false  # No browser control
โœ“

Use confirmation prompts for destructive actions

Configure OpenClaw to ask before deleting files or running certain commands.

Network Security HIGH

Secure your network access properly.

โœ“

Use Tailscale or Cloudflare Tunnel for remote access

Never expose your gateway port directly to the internet. Use a secure tunnel instead.

# โŒ DON'T: Open port 3000 on your router
# โŒ DON'T: Use ngrok without auth

# โœ… DO: Use Tailscale (encrypted mesh VPN)
tailscale up
# Access via: http://100.x.x.x:3000 (Tailscale IP)

# โœ… DO: Use Cloudflare Tunnel
cloudflared tunnel --url http://localhost:3000

โ†’ Full Tailscale setup guide

โœ“

Check firewall rules

Ensure your firewall isn't allowing external access to the gateway port.

# macOS:
sudo pfctl -sr | grep 3000

# Linux (ufw):
sudo ufw status

# Linux (iptables):
sudo iptables -L -n | grep 3000

API Keys & Credentials HIGH

Protect your API keys and credentials.

โœ“

Store API keys securely

Use environment variables or the system keychain, not plaintext files.

# โŒ DON'T: Put keys in config.yaml
anthropic:
  apiKey: "sk-ant-..."  # Bad!

# โœ… DO: Use environment variables
export ANTHROPIC_API_KEY="sk-ant-..."

# โœ… DO: Use macOS Keychain
security add-generic-password -a $USER -s anthropic-api-key -w "sk-ant-..."
โœ“

Use scoped API keys where possible

Create dedicated API keys with limited permissions for OpenClaw.

โœ“

Rotate keys if compromised

If you suspect your OpenClaw was accessed, rotate all API keys immediately.

Skill Security MEDIUM

Be careful when installing third-party skills.

โœ“

Audit skills before installing

Read ALL files in a skill, not just SKILL.md. Look for hidden scripts, curl commands, or external URLs.

# After installing, check the skill folder:
ls -la ~/.openclaw/skills/[skill-name]/
cat ~/.openclaw/skills/[skill-name]/*

# Look for red flags:
grep -r "curl\|wget\|bash -c" ~/.openclaw/skills/[skill-name]/
โœ“

Check skill source/author

Only install skills from trusted sources. Don't trust download counts โ€” they can be faked.

๐Ÿ” Quick Security Audit

Run this command to check your current security status:

openclaw doctor --security

# Or manually check key settings:
echo "=== Gateway Binding ==="
openclaw config get gateway.bind

echo "=== DM Policy ==="
openclaw config get gateway.dmPolicy

echo "=== Listening Ports ==="
lsof -i -P | grep openclaw

Related Guides

Next up: Tailscale secure access

Lock down your gateway, then set up private access with Tailscale.

Continue to Tailscale โ†’ Join Discord

Stay in the loop

The 5-minute weekly read that makes your OpenClaw smarter.