Why VPS
Your laptop is closed = the bot is stopped. If it's on a server, it works 24/7. โฌ5/month = cheap compared to grid profits.
Choosing a VPS
- Hetzner CX22 โ โฌ4.79/month. Germany/Finland. Recommended.
- DigitalOcean โ $6/month. Simple UI, more expensive.
- Vultr / Linode โ $5-6/month. Similar to DO.
Step 1 ยท Creating a VPS
See AI Agents Module 6 Lesson 6.1 โ a detailed description of how to create a VPS Hetzner + SSH key + connection.
Step 2 ยท Deploying the grid bot
๐ค Prompt
Help me deploy my grid bot on Hetzner VPS (root@1.2.3.4).
Steps:
1. SSH connect, apt install python3.12.
2. git clone my grid-bot repo from GitHub.
3. python -m venv venv, pip install -r requirements.txt.
4. Copy .env from my local laptop (NOT through git!).
5. systemd service grid-bot.service:
- WorkingDir /root/grid-bot.
- Restart=always.
- Auto-start at boot.
6. Enable: systemctl enable grid-bot && systemctl start grid-bot.
7. Logs: journalctl -u grid-bot -f.
Test: is the Binance connection working? Can the bot see my account?
Step 3 ยท Monitoring stack
๐ค Prompt
On VPS, install monitoring:
1. **Logs** โ systemd logging + rotation 30 days.
2. **Telegram alerts** โ for critical events (see Lesson 5).
3. **Uptime monitoring** โ UptimeRobot free tier monitors HTTP /health endpoint of the bot. If ping fails 2 times in a row โ Telegram alert.
4. **Daily digest** โ every morning at 9:00 โ report in Telegram.
Also: SSH alert. If someone logs in to your VPS โ instant alert. Protection against hacking.
Step 4 ยท Backup and recovery
- SQLite trades.db โ backup to Backblaze B2 every day through restic or duplicacy.
- config + .env โ backup to your laptop through scp.
- VPS snapshot โ once a week through Hetzner Cloud Console.
If something breaks โ recovery in 30 minutes. Without backup โ recovery is impossible.
Step 5 ยท Security
โ ๏ธ Main VPS security rules
- SSH only by key. Disable password auth.
- SSH port is not 22. For example, 2222 or 22022.
- UFW firewall โ open only necessary ports (SSH + 8080 if health endpoint).
- Fail2ban against brute-force.
- Auto-updates security patches:
apt install unattended-upgrades.
- .env permissions chmod 600 (only owner).
Monthly cost
- Hetzner CX22: โฌ4.79.
- Backblaze B2 (backup): ~โฌ0.30 (for several GB).
- Domain (optional, if you want a web dashboard): โฌ10/year.
- UptimeRobot: free tier.
- Telegram: free.
- Total: ~โฌ5-6/month.
If the grid bot makes 3-8% per month on $1000 โ that's $30-80. Minus โฌ5 = net $25-75/month. Over time โ several hundred dollars.
What's next after the course
- Launch the bot on real money โ $200-500. First week โ monitoring.
- After 30 days of stable work โ you can increase capital.
- After 3 months โ consider expanding to other pairs or strategies.
Cross-sell upgrade:
๐ฏ Course final
Congratulations โ you have a production grid bot on a โฌ5/month VPS. Earns on the side market while you live. 5 evenings โ your own passive income tool.
Questions โ @nexus_algo_ru. Want to bundle several courses โ write, I'll give a discount.