Contents

Moltbot (formerly Clawdbot) Beginner's Full Installation Guide: Purchasing, Installation & Security Config

In the previous article, we discussed how to choose a suitable VPS for Clawdbot (now named Moltbot). Today, we will officially get our hands dirty and teach you step-by-step how to deploy this powerful AI assistant to your server and interact with it anytime, anywhere via Discord.

This article is compiled based on practical sharing from AppSail, covering the complete “one-stop” process from server purchase to security hardening.

What is Moltbot?

Moltbot (formerly Clawdbot) is an open-source AI assistant developed by Peter Steinberger. Unlike commercial products like Claude Code, Moltbot runs on hardware (or VPS) controlled by you, connecting browsers and messaging platforms (such as WhatsApp, Telegram, Discord, Lark) via WebSocket architecture.

Core Advantages:

  • Privacy Control: Data is in your own hands.
  • All-Platform Access: Not limited to the terminal; call it from any chat software.
  • Powerful Features: Supports complex context understanding and multi-step task execution.

Step 1: Prepare VPS Environment

If you don’t have a VPS yet, you can refer to our previous buying guide.

For Moltbot, the recommended minimum configuration is:

  • CPU: 2 vCPU
  • RAM: 2GB (Recommend 4GB for better performance)
  • OS: Ubuntu 24.04 LTS (Recommended) or Debian 12

After getting the server root password, first login via SSH and update the system:

ssh root@your_server_ip
apt update && apt upgrade -y

Step 2: Install Moltbot

Moltbot provides a relatively complete Docker deployment scheme, which is the most worry-free way.

1. Install Docker & Docker Compose

curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

2. Clone Project

(Note: Please ensure utilizing the official latest repository address; below is an example)

git clone https://github.com/pspdfkit-labs/moltbot.git
cd moltbot

3. Configure Environment Variables

Copy example configuration file:

cp .env.example .env
nano .env

In the .env file, you need to fill in core API Keys (such as Anthropic API Key) and the messaging platform Token we are about to configure.

Step 3: Configure Messaging Platform (Example: Discord)

The coolest feature of Moltbot is control via Discord.

  1. Create App: Go to Discord Developer Portal, click “New Application”.
  2. Create Bot: Select “Bot” in the left menu, click “Add Bot”.
  3. Get Token: Click “Reset Token” to get your Bot Token, fill it into the .env file on VPS (DISCORD_BOT_TOKEN).
  4. Enable Permissions: Under “Privileged Gateway Intents”, enable “Message Content Intent”.
  5. Invite to Server: In “OAuth2” -> “URL Generator”, check bot scope and necessary permissions (like Send Messages, Read Message History), generate invite link and invite to your server.

After configuration, start Moltbot:

docker compose up -d

If everything goes well, you should see your Bot online in Discord! Try mentioning it and say “Hello”.

Step 4: Security Configuration (Very Important!)

Since Moltbot is essentially an Agent capable of executing code, security configuration must not be careless, otherwise your VPS might become a zombie for hackers.

1. Enable Firewall (UFW)

Only open necessary ports (SSH and potentially Webhook ports needed by Moltbot):

ufw allow 22/tcp
ufw allow 80/tcp  # If there is a Web interface
ufw enable

2. Disable Root Password Login

Create a new user, disable Root password login for SSH, and switch to key-based login.

3. Restrict Bot Response Permissions

In .env or configuration file, be sure to set ALLOWED_USER_IDS to allow only your own Discord User ID to trigger commands. Never let the Bot be open to everyone on the public internet!

Step 5: Practical Experience and Summary

After deployment, you can try asking Moltbot to:

  • Summarize the content of a long article.
  • Write a Python script and explain the code logic.
  • Monitor an RSS feed and push to Discord.

The power of Moltbot lies in its extensibility and “personalized customization” feel. With a VPS cost of a few dollars and simple deployment, you own a 24-hour online private AI expert.