From Zero to Hero: Setting Up Clawdbot on a DigitalOcean Droplet

x/techminute
· By: peterKing · Blog
From Zero to Hero: Setting Up Clawdbot on a DigitalOcean Droplet

What is Clawdbot?

Clawdbot is an open-source, lightweight framework for building a personal AI assistant that runs on your own hardware, bridging messaging apps like Discord, Telegram, or WhatsApp to AI models such as Claude, OpenAI, or local Ollama instances. It automates workflows privately without relying on cloud services, making it popular for developers, designers, and hobbyists—it's even reportedly driving Mac Mini sales due to its efficiency on compact hardware.[3]

Prerequisites for All Setups

Before starting, ensure:

  • Node.js (version 18+ recommended; 22+ for best performance).[2][3]
  • An AI API key (e.g., from Anthropic for Claude via apiyi.com, or OpenAI).[1][6]
  • A messaging account (Discord, Telegram recommended for beginners).[1][2]
  • Basic terminal familiarity; Git for source installs.

Option 1: Cloud Setup on DigitalOcean Droplet (Recommended for Always-On Access)

Deploy on a DigitalOcean Droplet for a 24/7 remote assistant. This uses a one-liner installer for quick setup (about 15 minutes).[4]

  1. Create Droplet: Sign up at DigitalOcean, launch an Ubuntu 22.04+ Droplet (1GB RAM minimum, $6/month basic plan). SSH in via browser terminal or ssh root@your-droplet-ip.[4]

  2. Install Clawdbot:

    curl -fsSL https://clawd.bot/install.sh | bash
    

    This handles Node.js, dependencies, and global install.[4]

  3. Run Onboarding Wizard:

    clawdbot onboard --install-daemon
    
    • Select AI model/provider (e.g., Claude).
    • Paste your API key.
    • Choose channel (e.g., Telegram for ease).[1][4]
  4. Connect Channel:

    clawdbot channels login
    

    Scan QR code or follow prompts for Discord/Telegram.[3]

  5. Start and Test:

    clawdbot gateway --port 18789
    

    Message your bot (e.g., "@ClawdBot Hi") in the app—it responds via AI.[1] Install as a daemon for persistence.[1][3]

Pro Tip: Restrict access in ~/.clawdbot/clawdbot.json (e.g., allow only specific WhatsApp numbers).[3] Monitor via clawdbot status.

Option 2: Local Install on Ubuntu

Ideal for Linux desktops/servers; supports local Ollama models for fully offline use.[5]

  1. Prep System: Update packages (sudo apt update && sudo apt install nodejs npm git curl -y). Ensure Node.js 18+.[2][5]

  2. Global Install (Quick):

    npm install -g clawdbot@latest
    

    Or pnpm: pnpm add -g clawdbot@latest.[1][3]

  3. Onboard:

    clawdbot onboard --install-daemon
    

    Configure AI key, directory (~/clawd default), and channel.[1]

  4. Optional: Local Ollama:

    • Install Ollama (curl -fsSL https://ollama.com/install.sh | sh).
    • Pull model: ollama pull llama3.
    • Set as default in Clawdbot config.[5]
  5. Channel Setup (e.g., Discord):

    clawdbot configure --section channels.discord
    

    Generate OAuth2 URL, invite bot, grant permissions (bot, commands, messages).[1] Test: "@ClawdBot introduce yourself".[1]

From Source (Advanced):

git clone https://github.com/check/clawdbot-public.git  # Or official repo[2][3]
cd clawdbot-public
npm install  # Or pnpm install
cp example.env .env  # Add API key
npm start

Option 3: Local Install on Mac Mini

Leverages Apple Silicon for low-power, always-on operation—perfect for its "AI intern" vibe.[3][7]

  1. Prep: Install Node.js via Homebrew (brew install node git).[3]

  2. Global Install:

    npm install -g clawdbot@latest
    clawdbot onboard --install-daemon
    

    Follow wizard for API key and channel (QR login).[3]

  3. From Source (Custom Builds):

    git clone https://github.com/clawdbot/clawdbot.git
    cd clawdbot
    pnpm install
    pnpm ui:build  # For web UI
    pnpm build
    clawdbot onboard --install-daemon
    ```[3]
    
  4. Test: Launch clawdbot gateway, chat via Telegram/Slack. Customize cron jobs or themes via CLI.[3][5]

Interesting Fact: Clawdbot's RPC mode creates per-user sessions with bundled Pi binaries, enabling multi-platform control without heavy config—it's why UX designers love it for private prototyping.[2][3]

Customization and Tips

  • Config File: Edit ~/.clawdbot/clawdbot.json for rules like mention-only responses ("requireMention": true).[3]
  • Channels: Start with Telegram (easiest), expand to Discord (OAuth invite) or WhatsApp.[1][2]
  • Security: Use .env for keys; never commit them.[2]
  • Communities: Join Clawdbot Discord for tips; it's rapidly evolving with open-source contributions.[1][4]
  • Limitations: Requires stable internet for cloud APIs; local models like Ollama need decent RAM (8GB+).[5]

This setup turns your hardware into a private AI operator—start small with Telegram, scale to automations!

Sources

Comments (0)

U
Press Ctrl+Enter to post

No comments yet

Be the first to share your thoughts!