← All guides

AI trading bot deployment guide

Deploy AI trading bots on a VPS for autonomous 24/7 trading

VPSDockerPython

Short answer

One or more AI trading agents running 24/7 on a hardened VPS, connected to your exchange via restricted API keys, with auto-restart, monitoring alerts, and daily backups.

Why this matters

Running AI trading bots on your laptop risks downtime during critical market moves, exposes API keys to local security gaps, and limits your ability to run multiple strategies simultaneously.

Walkthrough

  1. 01

    Choose your trading stack

    Pick the right framework for your strategy complexity and AI requirements.

    • Freqtrade: best for rule-based strategies with backtesting and Telegram control.
    • OctoBot: AI-powered with OpenAI/Ollama integration, grid and DCA strategies.
    • ZenithGrid: full autonomous trading with Claude/GPT/Gemini multi-provider support.
    • Custom agentic: use LangChain or CrewAI with your own strategy logic.
  2. 02

    Provision a VPS for trading

    Trading bots need low latency to exchanges more than raw compute power.

    • Choose a VPS geographically close to your exchange's API servers (Tokyo for Binance, US-East for Coinbase).
    • Minimum specs: 2 vCPU, 4 GB RAM, 40 GB SSD. Hetzner CX22 at $4/month is sufficient for cloud-API agents.
    • For local LLM inference (7B+ models), upgrade to 16+ GB RAM or use cloud APIs.
  3. 03

    Secure API keys and exchange connections

    Your bot handles keys with access to your funds. Security is non-negotiable.

    • Generate exchange API keys with trade-only permissions: never enable withdrawals.
    • IP-whitelist your VPS address in exchange API settings.
    • Store keys in environment variables or Docker secrets, never in config files.
  4. 04

    Deploy with Docker and systemd

    Containerised deployment ensures reproducibility and easy recovery.

    • Use Docker Compose for the bot, database (if needed), and any supporting services.
    • Configure systemd or docker-compose restart policy for automatic recovery.
    • Set up a Telegram or Discord alert channel for trade notifications and error alerts.
  5. 05

    Monitor and iterate

    An unmonitored bot loses money. Build observability from day one.

    • Start in dry-run / paper trading mode before connecting real funds.
    • Monitor CPU, RAM, and disk usage with docker stats or htop.
    • Schedule weekly strategy reviews and backtest updates on a separate machine.

Where RepoAssistant fits

Trading bot deployment requires careful setup. RepoAssistant provisions your VPS, wires exchange APIs, deploys your chosen framework, and adds monitoring: fixed price, shipped in 24h.

Primary sources