ClawBolt is open-source, meaning you can host it yourself. This guide walks through the complete self-hosting process.
⏱️ Too Complex?
Self-hosting takes 45+ minutes. ClawBolt Hosting gets you running in 60 seconds for just $15/mo.
See Hosting PlansPrerequisites
Before you begin, you'll need:
- Server: VPS with 4GB+ RAM (Ubuntu 22.04 recommended)
- Domain: Optional but recommended for SSL
- Telegram Account: For interacting with the bot
- LLM API Key: OpenAI, Anthropic Claude, or Google Gemini
- Cloudflare Account: For tunnel connectivity
Step 1: Server Setup
Provision a VPS with at least 4GB RAM. We recommend:
- Hetzner Cloud (EU-based, good prices)
- DigitalOcean
- Linode
- AWS EC2 or GCP Compute Engine
Step 2: Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
Step 3: Install Docker Compose
sudo apt update
sudo apt install docker-compose-plugin
Step 4: Clone the Repository
git clone https://github.com/mozilla-ai/clawbolt.git
cd clawbolt
Step 5: Configure Environment
cp .env.example .env
nano .env
Fill in these required values:
- TELEGRAM_BOT_TOKEN — Get from @BotFather on Telegram
- OPENAI_API_KEY — Or Anthropic/Google key
- CLAWBOLT_TELEGRAM_ADMIN_ID — Your Telegram user ID
Step 6: Set Up Cloudflare Tunnel
ClawBolt needs a public URL for Telegram webhooks. Install cloudflared:
curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o cloudflared
chmod +x cloudflared
./cloudflared tunnel login
./cloudflared tunnel create clawbolt
Create a tunnel config:
mkdir -p ~/.cloudflared
cat > ~/.cloudflared/config.yml << EOF
tunnel: <your-tunnel-uuid>
credentials-file: ~/.cloudflared/<your-tunnel-uuid>.json
ingress:
- hostname: clawbolt.yourdomain.com
service: http://localhost:8080
- service: http_status:404
EOF
Step 7: Start the Tunnel
./cloudflared tunnel run clawbolt
Point your domain DNS to the tunnel.
Step 8: Start ClawBolt
docker compose up -d
Step 9: Configure Telegram Webhook
Set the webhook URL:
curl -X POST "https://api.telegram.org/bot<YOUR_BOT_TOKEN>/setWebhook" \
-d "url=https://clawbolt.yourdomain.com/webhook"
Step 10: Test Your Bot
Open Telegram and start chatting with your bot!
Maintenance Tasks
Once running, you need to:
- Monitor logs:
docker compose logs -f - Apply updates:
git pull && docker compose up -d - Back up data: Regular volume backups
- SSL certificates: Auto-renewed by Cloudflare
Troubleshooting
Bot not responding?
Check logs: docker compose logs clawbolt
Webhook errors?
Verify tunnel is running: cloudflared tunnel list
API errors?
Check your API key is valid and has credits remaining.
Why Not Use ClawBolt Hosting?
Self-hosting requires ongoing maintenance. With hosting:
- 60-second setup (not 45+ minutes)
- We handle updates and security patches
- 24/7 monitoring included
- Real support from engineers
Get Started with ClawBolt Hosting
Starting from $15/month. Less than the time you'll spend self-hosting.
Get Early Access