DIY setup
How to run an OpenClaw trading bot on a $5 VPS
A bot that only runs while your laptop is open is a toy. This walkthrough covers a small Linux VPS so the process can stay up overnight — without turning the server into an open door.
This is an operations guide, not a promise that a bot will profit. A VPS only keeps the process alive. It does not make the strategy good.
What “$5 VPS” actually means
You want a tiny Linux box that stays on: 1 vCPU, 1 GB RAM is enough for a single Python bot plus a little headroom. Popular cheap options are Hetzner Cloud, DigitalOcean Basic, or Vultr. Pick a region close to the exchange if you care about latency. For a slow scanner every few minutes, region is not the main risk. Uptime and security are.
- OS: Ubuntu 22.04 or 24.04 LTS
- Access: SSH key only, no password login
- Budget: about $4–$7/month before backups
First 20 minutes on a new server
- Create the instance and download the SSH key.
- SSH in as root once.
- Update packages: apt update && apt upgrade -y
- Create a non-root user and give it sudo.
- Disable password SSH. Keep the key.
- Enable a firewall: allow 22, deny everything else inbound. A trading bot does not need port 80 unless you add a dashboard.
ufw default deny incoming ufw default allow outgoing ufw allow OpenSSH ufw enable
Python environment
Do not run the bot as root. Do not install random trading pip packages globally.
sudo apt install -y python3 python3-venv python3-pip mkdir -p ~/bots/openclaw && cd ~/bots/openclaw python3 -m venv .venv source .venv/bin/activate pip install -U pip # then install only what the guide lists
Keep secrets in .env with chmod 600 .env. Never commit that file.
Keep it running when SSH closes
Closing your laptop must not kill the bot. Use systemd.
[Unit] Description=OpenClaw trading bot After=network.target [Service] User=YOURUSER WorkingDirectory=/home/YOURUSER/bots/openclaw ExecStart=/home/YOURUSER/bots/openclaw/.venv/bin/python main.py Restart=on-failure RestartSec=10 EnvironmentFile=/home/YOURUSER/bots/openclaw/.env [Install] WantedBy=multi-user.target
Then: sudo systemctl enable --now openclaw and journalctl -u openclaw -f to watch logs.
Minimum “it is actually running” checks
- Process up after you disconnect SSH
- Log line every scan interval
- Telegram test message
- No API errors in the first hour
Backups and the boring stuff that saves you
- Snapshot the VPS once after a known-good deploy.
- Copy .env to a password manager, not a chat thread.
- Patch Ubuntu monthly.
- Keep a daily loss limit in the app and withdraw-disabled keys.
Get the full walkthrough
The paid guide includes the source, config template, and deploy script. 50% off: $19.99 (was $39.99). One-time.
Get the ebook — $19.99Educational product. Trading can lose money. Not financial advice.