Skip to content

Linux Setup

Linux is ideal for running Clawdbot as a always-on service. This guide covers Ubuntu/Debian, Fedora, and Arch Linux.

Terminal window
# Update system
sudo apt update && sudo apt upgrade -y
# Install Python
sudo apt install python3.11 python3.11-venv python3-pip git -y
# Clone Clawdbot
git clone https://github.com/polvoazul/clawdbot.git
cd clawdbot
# Setup environment
python3.11 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Configure
cp .env.example .env
nano .env

Create /etc/systemd/system/clawdbot.service:

[Unit]
Description=Clawdbot AI Assistant
After=network.target
[Service]
Type=simple
User=clawdbot
WorkingDirectory=/home/clawdbot/clawdbot
Environment="PATH=/home/clawdbot/clawdbot/venv/bin"
ExecStart=/home/clawdbot/clawdbot/venv/bin/python -m clawdbot
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target

Enable and start:

Terminal window
sudo systemctl daemon-reload
sudo systemctl enable clawdbot
sudo systemctl start clawdbot
Terminal window
# Check status
sudo systemctl status clawdbot
# View logs
sudo journalctl -u clawdbot -f
# Restart
sudo systemctl restart clawdbot
# Stop
sudo systemctl stop clawdbot
ProviderMin SpecsPrice
DigitalOcean1GB RAM~$6/mo
Vultr1GB RAM~$6/mo
Linode1GB RAM~$5/mo
Hetzner2GB RAM~$4/mo
Terminal window
# Update system
sudo apt update && sudo apt upgrade -y
# Configure firewall
sudo ufw allow ssh
sudo ufw allow 443 # If using webhooks
sudo ufw enable
# Create dedicated user
sudo useradd -m -s /bin/bash clawdbot
sudo su - clawdbot

Service won’t start

Terminal window
# Check logs
sudo journalctl -u clawdbot -n 50
# Verify permissions
ls -la /home/clawdbot/clawdbot/

High memory usage

  • Reduce context length
  • Use lighter model (Haiku)