OpenClaw deployment preset
Deploy OpenClaw in Production
Deploy a secure, self-hosted OpenClaw AI agent in seconds. RunClawd provides a production-ready Docker Compose stack with Caddy, Cloudflare Tunnel, and automated backups.
Docker Compose
Caddy reverse proxy
Cloudflare Tunnel
Socket proxy
Persistence
Features
Opinionated defaults
Ships a ready-to-run stack: gateway, web terminal, reverse proxy, optional public tunnel, and persistence.
Production-minded
Avoids mounting Docker socket directly into the app; uses a Docker socket proxy with a limited API surface.
Fast onboarding
Installer prints the onboarding URL, gateway token, basic auth password, and tunnel URL when ready. Agent memory is enhanced via qmd.
Install
Linux host. Run as root.
curl -fsSL https://get.runclawd.sh -o get-runclawd.sh
sudo bash get-runclawd.sh
Options
Rebuild the runclawd image before starting services:
sudo bash get-runclawd.sh --build
Use a named Cloudflare Tunnel token (instead of quick tunnel):
export CF_TUNNEL_TOKEN=...
export SERVICE_FQDN_OPENCLAW=openclaw.example.com
sudo --preserve-env=CF_TUNNEL_TOKEN,SERVICE_FQDN_OPENCLAW bash get-runclawd.sh
Local development mode (run from the current directory):
bash get-runclawd.sh --local
What you get
A Compose stack that runs:
- OpenClaw Gateway (runclawd container)
- Web terminal (ttyd)
- Caddy reverse proxy routes: /, /term/, /openclaw/
- Optional ephemeral public access via Cloudflare Tunnel
- Persistent volume for OpenClaw state and workspace
- Web terminal (ttyd)
- Caddy reverse proxy routes: /, /term/, /openclaw/
- Optional ephemeral public access via Cloudflare Tunnel
- Persistent volume for OpenClaw state and workspace
Backup runtime data (not Git code)
Back up runtime state and user data from runclawd-data:/data.
cd /opt/runclawd
bash scripts/backup-volume.sh
Restore from a backup archive (stop the service first):
cd /opt/runclawd
docker compose stop runclawd
bash scripts/restore-volume.sh --backup-file /opt/backups/runclawd/runclawd-data-YYYY-MM-DD_HHMMSS.tgz
docker compose up -d
Install/update a scheduled backup cron job:
cd /opt/runclawd
bash scripts/backup-cron-install.sh
# Example: every 6 hours, keep 30 days
bash scripts/backup-cron-install.sh --schedule "0 */6 * * *" --retention-days 30
Repository
Device Approval
Required for first access
1. List devices to find the Request ID (UUID):
openclaw devices list
2. Approve using the Request ID:
openclaw devices approve <request_id>