Module 3 ยท Production
Lesson 6 โ€” Deploying on VPS + monitoring
โฑ 22 minutes๐Ÿ”’ Course final

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

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

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

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

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.

โ† Lesson 5To course program โ†’