openclaw-infra: Instructions file for Claude Code

CLAUDE.md

openclaw-infra CLAUDE.md is an instructions file for Claude Code, Codex from pandysp/openclaw-infra. It costs 7,404 tokens per session, scanned B, original, MIT.

A set of deployment instructions for OpenClaw, a self-hosted AI assistant gateway running on a Hetzner server. It uses Tailscale, a private network tool, so access does not require exposing public server ports.

In plain words
What is it for?
Use it when deploying or maintaining OpenClaw infrastructure, including the Hetzner server, firewall, Tailscale access, Docker sessions, authentication, and encrypted configuration.
Why use it?
It explains the infrastructure and security rules needed to operate the gateway while keeping access, secrets, processes, and network entry points controlled.

Instructions file for Claude CodeCodex

Written for Codex and Claude Code: reads ~/.codex or $CODEX_HOME, but also the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is pandysp/openclaw-infra's own configuration. It tells Claude Code and Codex how to work on openclaw-infra itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything openclaw-infra configures →

Reuse

Borrowing it

Nothing to install: this file belongs to pandysp/openclaw-infra. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/pandysp/openclaw-infra/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/pandysp/openclaw-infra

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openclaw-infra CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/pandysp/openclaw-infra/claude-md.svg)](https://agentmods.dev/instructions/pandysp/openclaw-infra/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/pandysp/openclaw-infra/claude-md"><img src="https://agentmods.dev/badge/instructions/pandysp/openclaw-infra/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 7,404 This file is loaded in full into every session.
When invoked 7,404 The same file — it is already loaded in full.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.07404 $0.07404
Opus 5 $0.03702 $0.03702
Sonnet 5 $0.01481 $0.01481
Haiku 4.5 $0.00740 $0.00740

Measured 8d ago against content hash a7c1461deb16, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

openclaw-infra CLAUDE.md scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codemediumSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

ssh ubuntu@openclaw-vps.<tailnet>.ts.net 'OPENCLAW_NO_ONBOARD=1 OPENCLAW_NO_PROMPT=1 curl -fsSL https://openclaw.ai/install.sh | bash'

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

ssh ubuntu@openclaw-vps.<tailnet>.ts.net 'OPENCLAW_NO_ONBOARD=1 OPENCLAW_NO_PROMPT=1 curl -fsSL https://openclaw.ai/install.sh | bash'
CLAUDE.md · 573 lines

How it starts

The opening of the file, as written. The whole thing — 573 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenClaw Infrastructure

AI assistant guide for deploying and managing OpenClaw on Hetzner Cloud with Tailscale.

What This Project Is

OpenClaw is a self-hosted AI Agent gateway deployed on a Hetzner VPS with zero-trust networking via Tailscale. All access is through Tailscale—no public ports exposed.

Repository

This repo is pandysp/openclaw-infra. Personal deployment config (Pulumi secrets, group_vars/openclaw.yml) stays gitignored or in Pulumi encrypted state.

Architecture

Your Machine (Tailscale) → Hetzner VPS → Gateway (systemd, localhost:18789) via Tailscale Serve. No public ports. Hetzner firewall + UFW block all inbound except Tailscale.

Security Model

Layer Measure
Network (infrastructure) Hetzner cloud firewall blocks ALL inbound
Network (host) UFW: deny incoming, allow only tailscale0 interface
Access Tailscale-only (no public SSH, no public ports)
Process Runs as unprivileged ubuntu user; all sessions sandboxed in Docker (custom image with dev toolchain)
Auth Tailscale identity + device pairing
Secrets Pulumi encrypted config (never in git)
Gateway Binds localhost only, proxied via Tailscale Serve

For the full threat model, see docs/SECURITY.md.

Gateway runs via systemd (not Docker) as unprivileged user. Docker is used only for sandbox sessions (openclaw-sandbox-custom:latest). Auth: Tailscale identity + device pairing; no token needed. Fallback tokenized URL: pulumi stack output tailscaleUrlWithToken --show-secrets.

Directory Structure

openclaw-infra/
├── CLAUDE.md           # This file - AI assistant guide
├── README.md           # Human overview
├── package.json        # Node.js dependencies
├── tsconfig.json       # TypeScript config
│
├── pulumi/
│   ├── Pulumi.yaml     # Project definition
│   ├── Pulumi.prod.yaml  # Stack config (non-secrets)
│   ├── index.ts        # Main entrypoint (infra + Ansible trigger)
│   ├── server.ts       # Hetzner server resource
│   ├── firewall.ts     # Security rules (no inbound!)
│   └── user-data.ts    # Cloud-init (Tailscale-only bootstrap)
│
├── ansible/
│   ├── ansible.cfg         # Ansible config (pipelining, no host key check)
│   ├── requirements.yml    # Ansible Galaxy collections
│   ├── playbook.yml        # Main playbook
│   ├── group_vars/all.yml  # Non-secret defaults (model, agent types, server templates)
│   ├── group_vars/openclaw.yml        # Deployment-specific overrides (gitignored)
│   ├── group_vars/openclaw.yml.example  # Template for openclaw.yml
│   ├── inventory/
│   │   └── pulumi_inventory.py  # Dynamic inventory (Tailscale IP from Pulumi)
│   └── roles/
│       ├── system/    # apt packages, unattended-upgrades
│       ├── docker/    # Docker install, ubuntu→docker group
│       ├── ufw/       # Firewall rules
│       ├── openclaw/  # Binary install, onboard, daemon
│       ├── config/    # All `openclaw config set` commands
│       ├── agents/    # Create non-default agents, set bindings (conditional)
│       ├── telegram/  # Telegram channel config, cron jobs (conditional)
│       ├── whatsapp/  # WhatsApp channel config (conditional)
│       ├── obsidian-headless/  # Obsidian Sync daemon per workspace (conditional)
│       ├── qmd/       # qmd semantic search: install, per-agent watchers
│       ├── plugins/   # MCP adapter, Codex/Claude Code/Pi/qmd servers, deny rules
│       ├── sandbox/   # Pull base image, build custom Docker image
│       └── workspace/ # Deploy key, git sync timer (conditional)
│
├── scripts/
│   ├── provision.sh          # Ansible wrapper (reads secrets from Pulumi)
│   ├── setup-mac-node.sh     # One-time Mac node host installation
│   ├── setup-workspace.sh    # Create workspace repo + deploy key + Pulumi config
│   ├── get-telegram-id.sh    # Discover Telegram user/group IDs
│   ├── verify.sh             # Post-deployment checks
│   └── backup.sh             # Data backup
│
└── docs/
    ├── AUTONOMOUS-SAFETY.md         # Multi-agent safety architecture design
    ├── BROWSER-CONTROL-PLANNING.md  # Future browser automation approaches
    ├── DOCS-REVIEW.md               # Official docs review tracking
    ├── INTEGRATIONS.md              # Telegram, WhatsApp, Discord, Obsidian setup detail
    ├── NODE-EXEC.md                 # Remote Mac node host: setup, config, operations
    ├── SECURITY.md                  # Threat model
    └── TROUBLESHOOTING.md

Read the full file on GitHub · 573 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 573 lines · 7,404 tokens per session scan B a7c1461deb16

Subscribe to this mod's changes

openclaw-infra CLAUDE.md is an instructions file published in the GitHub repository pandysp/openclaw-infra (22 stars, last pushed 1mo ago), licensed MIT. It adds 7,404 tokens to every session, about $0.0370 per session on Opus 5. A static security scan graded it B with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories