Automated, hardened installation of Clawdbot with Docker, Homebrew, and Tailscale VPN support for Linux and macOS.
pnpm install -g clawdbot@latestInstall the latest stable version from npm:
curl -fsSL https://raw.githubusercontent.com/pasogott/clawdbot-ansible/main/install.sh | bash
Install from source for development or testing:
# Clone the installer
git clone https://github.com/pasogott/clawdbot-ansible.git
cd clawdbot-ansible
# Install in development mode
ansible-playbook playbook.yml --ask-become-pass -e clawdbot_install_mode=development
After installation completes, switch to the clawdbot user:
sudo su - clawdbot
Then run the quick-start onboarding wizard:
clawdbot onboard --install-daemon
This will:
# Configure manually
clawdbot configure
# Login to provider
clawdbot providers login
# Test gateway
clawdbot gateway
# Install as daemon
clawdbot daemon install
clawdbot daemon start
# Check status
clawdbot status
clawdbot logs
pnpm install -g clawdbot@latestpnpm install -g clawdbot@latesthttps://github.com/clawdbot/clawdbot.gitpnpm build~/.local/bin/clawdbotclawdbot-rebuild - Rebuild after code changesclawdbot-dev - Navigate to repo directoryclawdbot-pull - Pull, install deps, and rebuildEnable with: -e clawdbot_install_mode=development
Verify: nmap -p- YOUR_SERVER_IP should show only port 22 open.
pnpm install -g clawdbot@latest# Install dependencies
sudo apt update && sudo apt install -y ansible git
# Clone repository
git clone https://github.com/pasogott/clawdbot-ansible.git
cd clawdbot-ansible
# Install Ansible collections
ansible-galaxy collection install -r requirements.yml
# Run installation
./run-playbook.sh
Build from source for development:
# Same as above, but with development mode flag
./run-playbook.sh -e clawdbot_install_mode=development
# Or directly:
ansible-playbook playbook.yml --ask-become-pass -e clawdbot_install_mode=development
This will:
~/code/clawdbotpnpm install and pnpm build~/.local/bin/clawdbot.bashrcAll configuration variables can be found in roles/clawdbot/defaults/main.yml.
You can override them in three ways:
ansible-playbook playbook.yml --ask-become-pass \
-e clawdbot_install_mode=development \
-e "clawdbot_ssh_keys=['ssh-ed25519 AAAAC3... user@host']"
# Create vars.yml
cat > vars.yml << EOF
clawdbot_install_mode: development
clawdbot_ssh_keys:
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGxxxxxxxx user@host"
- "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAB... user@host"
clawdbot_repo_url: "https://github.com/YOUR_USERNAME/clawdbot.git"
clawdbot_repo_branch: "feature-branch"
tailscale_authkey: "tskey-auth-xxxxxxxxxxxxx"
EOF
# Use it
ansible-playbook playbook.yml --ask-become-pass -e @vars.yml
Edit roles/clawdbot/defaults/main.yml before running the playbook.
| Variable | Default | Description |
|---|---|---|
clawdbot_user | clawdbot | System user name |
clawdbot_home | /home/clawdbot | User home directory |
clawdbot_install_mode | release | release or development |
clawdbot_ssh_keys | [] | List of SSH public keys |
clawdbot_repo_url | https://github.com/clawdbot/clawdbot.git | Git repository (dev mode) |
clawdbot_repo_branch | main | Git branch (dev mode) |
tailscale_authkey | "" | Tailscale auth key for auto-connect |
nodejs_version | 22.x | Node.js version to install |
See roles/clawdbot/defaults/main.yml for the complete list.
ansible-playbook playbook.yml --ask-become-pass \
-e "clawdbot_ssh_keys=['ssh-ed25519 AAAAC3... user@host']"
ansible-playbook playbook.yml --ask-become-pass \ -e clawdbot_install_mode=development \ -e clawdbot_repo_url=https://github.com/YOUR_USERNAME/clawdbot.git \ -e clawdbot_repo_branch=feature-branch
ansible-playbook playbook.yml --ask-become-pass \ -e tailscale_authkey=tskey-auth-xxxxxxxxxxxxx
MIT - see LICENSE