Benefits of VPS-based Moltbot deployment
Running Moltbot on a dedicated VPS rather than your laptop or desktop provides several practical advantages:
- 24/7 availability: AI assistant runs even when laptop is closed
- Security isolation: Keep powerful agent separate from main machine
- Access from anywhere: Connect via messaging apps from any device
- Consistent environment: No interruptions from system updates or restarts
Prerequisites
- VPS with at least 2 GB RAM and 20 GB disk space
- Ubuntu 22.04 or newer
- API key from Anthropic (Claude) or OpenAI
- Basic Linux command line familiarity
Step 1: Provision your server
Deploy a Linux VPS through ColossusCloud control panel. Ubuntu 24.04 LTS is recommended.
SSH into server:
ssh root@your-server-ip
Step 2: Initial server setup
Update system and create non-root user:
apt update && apt upgrade -y
adduser moltbot
usermod -aG sudo moltbot
su - moltbot
Step 3: Node.js runtime
Moltbot requires Node.js 18 or newer:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
node --version
Step 4: Install Moltbot
Install globally:
sudo npm install -g clawdbot
clawd onboard
Onboarding prompts for:
- Anthropic or OpenAI API key
- Messaging platform connections (WhatsApp, Telegram, etc.)
- Memory and preferences configuration
Step 5: Locking down network access
Critical: Never expose Moltbot’s gateway port (18789) to public internet.
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw enable
Step 6: Install Tailscale for secure remote access
Tailscale provides zero-trust network for secure access without exposing ports:
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
Follow authentication link to connect server to Tailscale network.
Step 7: Hardening configuration files
Set proper permissions:
chmod 700 ~/.config/moltbot
chmod 600 ~/.config/moltbot/config.json
Generate strong gateway token:
openssl rand -hex 32
Add to configuration at ~/.config/moltbot/config.json:
{
"gateway": {
"bind": "127.0.0.1",
"port": 18789,
"token": "your-generated-token-here"
}
}
Step 8: Run as service
Create systemd service:
sudo nano /etc/systemd/system/moltbot.service
Add:
[Unit]
Description=Moltbot AI Assistant
After=network.target
[Service]
Type=simple
User=moltbot
WorkingDirectory=/home/moltbot
ExecStart=/usr/bin/clawd
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable moltbot
sudo systemctl start moltbot
Monthly expenses
- VPS: Starting around $8/month at ColossusCloud
- Moltbot: Free (open source)
- API usage: Pay-per-use for Claude/OpenAI
- Tailscale: Free for personal use
Deploy a VPS and run your own secure Moltbot instance.