When to Use
- Provisioning, hardening, or operating the infrastructure described in this skill within an authorized environment.
OpenClaw Security Hardening
Use this skill to reduce exposure in self-hosted OpenClaw deployments before opening access to teammates or external networks.
Build a Threat Model First
Map the highest-risk assets and paths:
- Admin/API endpoints for OpenClaw
- Provider API keys and model credentials
- Prompt/response logs containing sensitive business data
- Host-level access (SSH, local admin accounts, remote desktop)
Prioritize controls that reduce credential theft, remote code execution blast radius, and data exfiltration.
Apply Baseline Host Hardening
- Keep OS and package dependencies patched on a regular cadence.
- Run OpenClaw as a dedicated non-admin user account.
- Enable full-disk encryption and secure boot features where available.
- Remove unnecessary services and block inbound ports by default.
- Lock down remote admin (key-only SSH, no password login, limited source CIDRs).
Example Linux baseline checks:
id openclaw
sudo ss -tulpn
sudo ufw status verbose
sudo systemctl --failed
Harden Application Runtime
- Bind OpenClaw to localhost or private VLAN by default.
- Place a reverse proxy in front of OpenClaw for TLS, auth, and rate limits.
- Enforce authentication on every non-health endpoint.
- Disable debug/dev modes in persistent environments.
- Restrict outbound egress to only required providers (LLM API, telemetry sink, package mirror).
Example reverse proxy controls to enforce:
- TLS 1.2+ only
- strict transport security header
- request body size limits
- request timeout and upstream timeout guardrails
- per-IP and per-token rate limiting
Protect Secrets and Tokens
- Store secrets in a vault or platform secret manager, not committed
.env files.
- Rotate provider and admin tokens on a fixed interval and after any incident.
- Scope tokens minimally (least privilege, per-service keys).
- Scan repos and deployment artifacts for leaked credentials before release.
Rotation checklist:
- Generate replacement key.
- Update runtime secret store.
- Restart or reload OpenClaw.
- Validate request success with new key.
- Revoke old key.
Segment Network Access
Use layered access patterns:
- Tier 1 (private): OpenClaw service port reachable only from app/proxy subnet.
- Tier 2 (operator): Admin plane reachable only from VPN/Tailscale/WireGuard.
- Tier 3 (public): Expose only hardened reverse proxy with strict ACLs.
Do not publish raw OpenClaw service ports directly to the internet.
Add Detection and Recovery Paths
- Centralize auth, error, and audit logs.
- Alert on brute-force attempts, token failures, and unusual outbound traffic.
- Capture immutable backup snapshots of configs and prompt data retention settings.
- Test rollback and restore procedures every release cycle.
Minimum operational runbook:
- service restart path
- key revocation path
- incident isolation path (network block + token disable)
- known-good rollback version
Validation Checklist
- All sensitive endpoints require auth and are unreachable without VPN or gateway policy.
- Secrets are absent from repo history and plaintext shared directories.
- Host firewall default deny is active for inbound traffic.
- TLS termination and rate limits are active at ingress.
- Rollback drill can restore service within target RTO.
Related Skills
- openclaw-local-mac-mini (
openclaw-local-mac-mini) - Local OpenClaw hosting setup
- multi-tenant-llm-hosting (
multi-tenant-llm-hosting) - Multi-tenant AI isolation patterns
- zero-trust (
zero-trust) - Private access and identity-aware network controls
When to Use
- You are provisioning, configuring, or troubleshooting the infrastructure component covered by this skill (servers, storage, databases, networking, cloud, local AI).
Limitations
- Infrastructure commands can disrupt services: confirm target host/scope and have backups/snapshots before mutating state.
- Docs-only import: upstream scripts and templates not bundled.
1---2name: openclaw-security-hardening3description: Harden OpenClaw self-hosted environments with baseline host controls,4 auth tightening, secret handling, network segmentation, and safe update/rollback5 workflows.6category: devops7risk: critical8source: https://github.com/BagelHole/DevOps-Security-Agent-Skills9source_repo: BagelHole/DevOps-Security-Agent-Skills10source_type: community11date_added: '2026-09-20'12license: MIT13license_source: https://github.com/BagelHole/DevOps-Security-Agent-Skills/blob/main/LICENSE14compatibility: Requires the relevant OS/platform tooling and privileged access where15 noted. Docs-only; helper scripts and templates not bundled.16metadata:17 source: https://skillmd.com/skills/francostino/openclaw-security-hardening18 author: devops-skills19 version: '1.0'20---2122## When to Use2324- Provisioning, hardening, or operating the infrastructure described in this skill within an authorized environment.252627# OpenClaw Security Hardening2829Use this skill to reduce exposure in self-hosted OpenClaw deployments before opening access to teammates or external networks.3031## Build a Threat Model First3233Map the highest-risk assets and paths:3435- Admin/API endpoints for OpenClaw36- Provider API keys and model credentials37- Prompt/response logs containing sensitive business data38- Host-level access (SSH, local admin accounts, remote desktop)3940Prioritize controls that reduce credential theft, remote code execution blast radius, and data exfiltration.4142## Apply Baseline Host Hardening43441. Keep OS and package dependencies patched on a regular cadence.452. Run OpenClaw as a dedicated non-admin user account.463. Enable full-disk encryption and secure boot features where available.474. Remove unnecessary services and block inbound ports by default.485. Lock down remote admin (key-only SSH, no password login, limited source CIDRs).4950Example Linux baseline checks:5152```bash53id openclaw54sudo ss -tulpn55sudo ufw status verbose56sudo systemctl --failed57```5859## Harden Application Runtime6061- Bind OpenClaw to localhost or private VLAN by default.62- Place a reverse proxy in front of OpenClaw for TLS, auth, and rate limits.63- Enforce authentication on every non-health endpoint.64- Disable debug/dev modes in persistent environments.65- Restrict outbound egress to only required providers (LLM API, telemetry sink, package mirror).6667Example reverse proxy controls to enforce:6869- TLS 1.2+ only70- strict transport security header71- request body size limits72- request timeout and upstream timeout guardrails73- per-IP and per-token rate limiting7475## Protect Secrets and Tokens7677- Store secrets in a vault or platform secret manager, not committed `.env` files.78- Rotate provider and admin tokens on a fixed interval and after any incident.79- Scope tokens minimally (least privilege, per-service keys).80- Scan repos and deployment artifacts for leaked credentials before release.8182Rotation checklist:83841. Generate replacement key.852. Update runtime secret store.863. Restart or reload OpenClaw.874. Validate request success with new key.885. Revoke old key.8990## Segment Network Access9192Use layered access patterns:9394- **Tier 1 (private):** OpenClaw service port reachable only from app/proxy subnet.95- **Tier 2 (operator):** Admin plane reachable only from VPN/Tailscale/WireGuard.96- **Tier 3 (public):** Expose only hardened reverse proxy with strict ACLs.9798Do not publish raw OpenClaw service ports directly to the internet.99100## Add Detection and Recovery Paths101102- Centralize auth, error, and audit logs.103- Alert on brute-force attempts, token failures, and unusual outbound traffic.104- Capture immutable backup snapshots of configs and prompt data retention settings.105- Test rollback and restore procedures every release cycle.106107Minimum operational runbook:108109- service restart path110- key revocation path111- incident isolation path (network block + token disable)112- known-good rollback version113114## Validation Checklist115116- All sensitive endpoints require auth and are unreachable without VPN or gateway policy.117- Secrets are absent from repo history and plaintext shared directories.118- Host firewall default deny is active for inbound traffic.119- TLS termination and rate limits are active at ingress.120- Rollback drill can restore service within target RTO.121122## Related Skills123124- openclaw-local-mac-mini (`openclaw-local-mac-mini`) - Local OpenClaw hosting setup125- multi-tenant-llm-hosting (`multi-tenant-llm-hosting`) - Multi-tenant AI isolation patterns126- zero-trust (`zero-trust`) - Private access and identity-aware network controls127128## When to Use129130- You are provisioning, configuring, or troubleshooting the infrastructure component covered by this skill (servers, storage, databases, networking, cloud, local AI).131132## Limitations133134- Infrastructure commands can disrupt services: confirm target host/scope and have backups/snapshots before mutating state.135- Docs-only import: upstream scripts and templates not bundled.136