Clawdbot Setup Guide
Deploy your own AI assistant on a cheap VPS for under $5/month.
What is Clawdbot?
Clawdbot is an AI assistant that can:
- •Manage your Gmail with automated responses
- •Run Telegram/WhatsApp bots
- •Transcribe voice messages
- •Perform research and trend analysis
- •Remember context across conversations
- •Run 24/7 unattended on a server
Quick Start
Which platform are you on?
| Platform | Command |
|---|---|
| Linux | curl -fsSL --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/moinsen-dev/clawdbot-easy-setup/main/install.sh | bash |
| macOS | curl -fsSL --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/moinsen-dev/clawdbot-easy-setup/main/install-macos.sh | bash |
| Windows | iwr -useb https://raw.githubusercontent.com/moinsen-dev/clawdbot-easy-setup/main/install.ps1 | iex |
That's it! The wizard guides you through the rest.
Decision Tree
Do you have a VPS/server already?
- •Yes → Skip to Installation
- •No → Continue to Server Selection
Server Selection
Recommended: Hetzner Cloud (~$4.51/month)
Best value for European users. Steps:
- •Go to console.hetzner.cloud
- •Create an account (email verification required)
- •Create a new project
- •Click "Add Server" with these settings:
| Setting | Recommended Value |
|---|---|
| Location | Falkenstein, DE (cheapest) |
| Image | Ubuntu 24.04 |
| Type | CX22 (2 vCPU, 4GB RAM) |
| SSH Key | Add your public key |
| Price | ~4.51 EUR/month |
- •Note the server IP address after creation
Alternative Providers
| Provider | Plan | Price | Notes |
|---|---|---|---|
| DigitalOcean | Basic Droplet 2GB | $12/month | Easy UI |
| Vultr | Cloud Compute 2GB | $12/month | Many locations |
| Linode | Nanode 2GB | $12/month | Good support |
| Oracle Cloud | Always Free | $0/month | Complex setup |
SSH Key Setup
If you don't have an SSH key:
bash
# Generate new key ssh-keygen -t ed25519 -C "your@email.com" # View public key (copy this to Hetzner) cat ~/.ssh/id_ed25519.pub
Installation
Step 1: Connect to Your Server
bash
ssh root@YOUR_SERVER_IP
Step 2: Create Non-Root User (Recommended)
bash
# Create user adduser clawdbot # Grant sudo access usermod -aG sudo clawdbot # Switch to new user su - clawdbot
Step 3: Update System
bash
sudo apt update && sudo apt upgrade -y
Step 4: Run Installer
Linux (Ubuntu/Debian):
bash
curl -fsSL --proto '=https' --tlsv1.2 \ https://raw.githubusercontent.com/moinsen-dev/clawdbot-easy-setup/main/install.sh | bash
macOS:
bash
curl -fsSL --proto '=https' --tlsv1.2 \ https://raw.githubusercontent.com/moinsen-dev/clawdbot-easy-setup/main/install-macos.sh | bash
Windows (PowerShell as Administrator):
powershell
iwr -useb https://raw.githubusercontent.com/moinsen-dev/clawdbot-easy-setup/main/install.ps1 | iex
Install Options
bash
# Non-interactive (for automation/CI) curl ... | bash -s -- --no-onboard --no-prompt # Specific version curl ... | bash -s -- --version 1.2.3 # Beta version curl ... | bash -s -- --beta # Dry run (preview only) curl ... | bash -s -- --dry-run # Verbose output curl ... | bash -s -- --verbose
Configuration
API Keys Setup
Create the environment file:
bash
mkdir -p ~/.clawdbot nano ~/.clawdbot/.env
Add your API keys:
bash
# AI Provider (at least one required) ANTHROPIC_API_KEY=sk-ant-api03-... OPENAI_API_KEY=sk-... # Telegram Bot (optional) TELEGRAM_BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrsTUVwxyz # Gmail (optional) GMAIL_ADDRESS=your-bot@gmail.com GMAIL_APP_PASSWORD=xxxx xxxx xxxx xxxx
Verify Installation
bash
# Check version clawdbot --version # Run health check clawdbot doctor
Daemon Setup (24/7 Operation)
Using Built-in Daemon Manager
bash
# Install as system service clawdbot daemon install # Start the daemon clawdbot daemon start # Check status clawdbot daemon status # View logs clawdbot daemon logs # Restart (after updates) clawdbot daemon restart # Stop clawdbot daemon stop
Manual systemd Service
If the built-in daemon doesn't work:
bash
sudo nano /etc/systemd/system/clawdbot.service
ini
[Unit] Description=Clawdbot AI Assistant After=network.target [Service] Type=simple User=clawdbot WorkingDirectory=/home/clawdbot ExecStart=/usr/bin/node /usr/lib/node_modules/clawdbot/dist/entry.js daemon Restart=always RestartSec=10 Environment=NODE_ENV=production [Install] WantedBy=multi-user.target
bash
sudo systemctl daemon-reload sudo systemctl enable clawdbot sudo systemctl start clawdbot sudo systemctl status clawdbot
Integrations
Telegram Bot
- •Open Telegram and message @BotFather
- •Send
/newbot - •Choose a name and username for your bot
- •Copy the token (looks like
123456789:ABCdef...) - •Run:
bash
clawdbot integrations add telegram
- •Paste the token when prompted
Note: Requires display for QR code scanning.
Options:
- •SSH with X forwarding:
ssh -X user@server - •Use Hetzner web console
- •Set up VNC for remote desktop
bash
clawdbot integrations add whatsapp # QR code appears - scan with WhatsApp mobile app
Gmail
- •Enable 2-Factor Authentication on your Google account
- •Go to myaccount.google.com/apppasswords
- •Select "Mail" and your device
- •Copy the 16-character App Password
- •Run:
bash
clawdbot integrations add gmail
- •Enter your Gmail address and App Password
Maintenance
Updates
bash
# Check for updates clawdbot update --check # Update Clawdbot clawdbot update # Update and restart daemon clawdbot update --restart
Backup
bash
# Create backup tar -czvf clawdbot-backup-$(date +%Y%m%d).tar.gz ~/.clawdbot # Restore tar -xzvf clawdbot-backup-YYYYMMDD.tar.gz -C ~/
View Logs
bash
# Daemon logs clawdbot daemon logs # Follow in real-time clawdbot daemon logs -f # System logs (systemd) sudo journalctl -u clawdbot -f
Troubleshooting
"clawdbot: command not found"
bash
# Refresh shell cache hash -r # Check if installed which clawdbot || npm list -g clawdbot # Add to PATH export PATH="$HOME/.npm-global/bin:$PATH" echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc source ~/.bashrc
Permission Denied (npm)
bash
mkdir -p ~/.npm-global npm config set prefix '~/.npm-global' export PATH="$HOME/.npm-global/bin:$PATH"
Out of Memory (2GB VPS)
Add swap space:
bash
sudo fallocate -l 2G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Daemon Won't Start
bash
# Check diagnostics clawdbot doctor # Check port conflicts sudo lsof -i :3000 # View detailed logs clawdbot daemon logs --verbose # Manual start to see errors node /usr/lib/node_modules/clawdbot/dist/entry.js daemon
Firewall Issues
bash
# Check firewall status sudo ufw status # Allow required ports sudo ufw allow 22/tcp # SSH sudo ufw allow 3000/tcp # Clawdbot (if using web UI) sudo ufw enable
Security Checklist
- • Using SSH key authentication (not password)
- • Root login disabled (
PermitRootLogin noin sshd_config) - • Firewall configured (ufw)
- • fail2ban installed (
sudo apt install fail2ban) - • API keys stored in .env file (not in config)
- • Regular backups of ~/.clawdbot
- • Running as non-root user
Cost Summary
| Item | Monthly Cost |
|---|---|
| Hetzner CX22 | ~$4.51 |
| Domain (optional) | ~$1 |
| Total | ~$5.50 |
Comparison: Mac Mini M4 at $800 = 145+ months of VPS hosting.