Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
Ansible
Ansible Installation
Deploy OpenClaw to production servers with openclaw-ansible -- an automated installer with security-first architecture.
info
The [openclaw-ansible](https://github.com/openclaw/openclaw-ansible) repo is the source of truth for Ansible deployment. This page is a quick overview.
Prerequisites
Requirement
Details
OS
Debian 11+ or Ubuntu 20.04+
Access
Root or sudo privileges
Network
Internet connection for package installation
Ansible
2.14+ (installed automatically by the quick-start script)
Systemd service -- auto-start with security hardening
note
The gateway runs directly on the host (not in Docker). Agent sandboxing is
optional; this playbook installs Docker because it is the default sandbox
backend. See [Sandboxing](/gateway/sandboxing) for details and other backends.
Post-Install Setup
Switch to the openclaw user
```bash}
sudo -i -u openclaw
```
Run the onboarding wizard
The post-install script guides you through configuring OpenClaw settings.
VPN (Tailscale) -- gateway accessible only via VPN mesh
Docker isolation -- DOCKER-USER iptables chain prevents external port exposure
Systemd hardening -- NoNewPrivileges, PrivateTmp, unprivileged user
To verify your external attack surface:
bash
nmap -p- YOUR_SERVER_IP
Only port 22 (SSH) should be open. All other services (gateway, Docker) are locked down.
Docker is installed for agent sandboxes (isolated tool execution), not for running the gateway itself. See Multi-Agent Sandbox and Tools for sandbox configuration.
Alternatively, run directly and then manually execute the setup script afterward:
```bash}
ansible-playbook playbook.yml --ask-become-pass
# Then run: /tmp/openclaw-setup.sh
```
Updating
The Ansible installer sets up OpenClaw for manual updates. See Updating for the standard update flow.
To re-run the Ansible playbook (for example, for configuration changes):
bash
cd openclaw-ansible
./run-playbook.sh
This is idempotent and safe to run multiple times.
Troubleshooting
Advanced configuration
For detailed security architecture and troubleshooting, see the openclaw-ansible repo: