Skip to content

Instantly share code, notes, and snippets.

@dabit3
Last active January 28, 2026 05:35
Show Gist options
  • Select an option

  • Save dabit3/42cce744beaa6a0d47d6a6783e443636 to your computer and use it in GitHub Desktop.

Select an option

Save dabit3/42cce744beaa6a0d47d6a6783e443636 to your computer and use it in GitHub Desktop.
How to set up Clawdbot on Digital Ocean

Clawdbot on DigitalOcean

1. Create a Droplet

Ubuntu 24.04 LTS, nearest region

2. Select Premium AMD

2 GB RAM / 1 AMD CPU / 50 GB NVMe

3. SSH into server

ssh root@YOUR_IP

4. Create sudo user

adduser clawd && usermod -aG sudo clawd && su - clawd

5. Install Clawdbot

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

Then run exec bash

6. Configure API keys

clawdbot setup --wizard

7. Start gateway

clawdbot gateway --bind lan --port 18789

8. SSH tunnel to access UI

ssh -L 18789:127.0.0.1:18789 clawd@YOUR_IP

Open http://127.0.0.1:18789

9. Dashboard

Run clawdbot dashboard if you are trying to connect and can't find the token.

@mpeshev
Copy link

mpeshev commented Jan 25, 2026

running Anthropic and a Telegram setup on a 1GB droplet will throw out of memory during the NPM install.

What could help:

export NODE_OPTIONS="--max-old-space-size=2048"

Alternatively, you may need to add swap if the above doesn't help:

sudo fallocate -l 2G /swapfile || sudo dd if=/dev/zero of=/swapfile bs=1M count=2048
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

@dabit3
Copy link
Author

dabit3 commented Jan 25, 2026

Hi @mpeshev thanks for chiming in, do you think I should just update to mention to provision 2GB instead of 1GB?

@mpeshev
Copy link

mpeshev commented Jan 25, 2026

@dabit3 2GB is a safer recommendation overall (a higher build), but 2x the cost may be prohibitive to some.

1GB with NODE_OPTIONS seems to bypass the setup limits and works fine for simple tasks after.

@shaohua
Copy link

shaohua commented Jan 26, 2026

clawdbot dashboard is your friend if you are trying to connect and can't find the token

to monkey patch and run gateway in the background without systemd, nohup clawdbot gateway --bind lan --port 18789 > clawdbot.log 2>&1 &

@0xcmd
Copy link

0xcmd commented Jan 26, 2026

The server setup guide for Clawdbot is fundamentally flawed and potentially dangerous, as it lacks essential security measures necessary to protect users from hacking vulnerabilities. Key omissions include critical steps like upgrading the server software, setting up SSH keys for secure access, closing unnecessary ports, and implementing fail2ban to guard against brute-force attacks. Following this guide without these precautions is akin to leaving your front door wide open, essentially inviting hackers to exploit your system. It is irresponsible to publish such a superficial guide that could mislead countless individuals into compromising their server's security. A thorough understanding of server management and security practices is crucial, and it would be wise for the author to revise the guide significantly or consult with experienced professionals before sharing further.

@onurburak9
Copy link

Curious why you didn't recommend binding gateway to localhost instead?

@cogniresolutions
Copy link

Bind somehow not working with the public IP address of the VM. I can see bind is for all interfaces with 0.0.0.0 still browser port is not responding, when access directly using public IP address of the VM and port.

@dsebastien
Copy link

Given the uncovered vulnerabilities so far, it's probably best to avoid binding clawd to the public IP of the VM / exposing it directly to the Internet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment