How to Host ClawBolt

Complete Guide to Self-Hosting the Mozilla.ai AI Assistant

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 Plans

Prerequisites

Before you begin, you'll need:

Step 1: Server Setup

Provision a VPS with at least 4GB RAM. We recommend:

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:

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:

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:

Get Started with ClawBolt Hosting

Starting from $15/month. Less than the time you'll spend self-hosting.

Get Early Access