{"slug": "how-to-deploy-an-ai-crypto-trading-bot-on-your-vps", "title": "How to Deploy an AI Crypto Trading Bot on Your VPS", "summary": "A developer has published a tutorial for deploying an open-source AI crypto trading bot on a VPS. The bot, powered by Anthropic's Claude and Binance testnet, analyzes BTC and ETH, sends Telegram alerts, and costs about $6–$10/month to run. The developer warns users to start on testnet and never use live keys until the bot has been observed for weeks.", "body_md": "In this tutorial you’ll **deploy an AI crypto trading bot** to your own VPS — the open-source Claude-powered bot from [Part 1](https://dineshstack.com/en/ai-crypto-trading-bot-claude) — and have it analysing BTC and ETH on Binance testnet, messaging you on Telegram, in about 20–30 minutes. I’ll give you the exact steps, a complete list of the API keys you need, an honest running-cost breakdown, and every gotcha I hit so you don’t lose an evening to them.\n\n⚠️\n\nStart on testnet.Everything below uses Binance testnet (fake money). Never point live keys at a bot you haven’t watched run for weeks. This is educational content, not financial advice.\n\nBefore you deploy the AI crypto trading bot, get these ready:\n\nThis trips people up, so here’s everything in one place:\n\n| Key | Where to get it | Notes |\n|---|---|---|\n| Anthropic API key | console.anthropic.com |\nEnable billing — the free tier won’t sustain continuous calls. |\n| Binance API key + secret | Binance testnet: testnet.binance.vision | For live later: spot-only, no withdrawal, IP-restricted. |\n| Telegram bot token |\n|\n\nSSH into your VPS and install the essentials:\n\n```\nsudo apt update && sudo apt install -y python3.12 python3.12-venv python3-pip mysql-server libomp-dev\n\n  \n  \n  Create the database\n```\n\nClone the repo and run the install script, which sets up the Python virtual environment, installs dependencies, and registers a systemd service that auto-restarts on crash:\n\n```\ngit clone https://github.com/dineshstack/crypto_bot.git\ncd crypto_bot\nbash deploy/install.sh\n```\n\nCopy the example environment file and fill in the keys from the table above. **Never commit this file** — it’s git-ignored for a reason.\n\n```\ncp .env.example .env\nnano .env\nANTHROPIC_API_KEY=sk-ant-...\nBINANCE_API_KEY=your_testnet_key\nBINANCE_SECRET=your_testnet_secret\nTELEGRAM_BOT_TOKEN=your_bot_token\nTELEGRAM_CHAT_ID=your_chat_id\nMYSQL_PASSWORD=your-strong-password\nTESTNET=true          # keep this true\n```\n\nThe bot ships without a trained model — you train it once on historical data. This is the only CPU/RAM-heavy step:\n\n``` python\nsource venv/bin/activate\npython3 -c \"import ml_signal, market_data as md; ml_signal.train_model(md.get_exchange())\"\n```\n\n💡\n\nLow-RAM VPS?Run this same command on your laptop, then copy the generated`ml_models/`\n\nfolder to the server with`scp`\n\n. The bot’s runtime is light; only training is hungry.\n\n```\nsudo systemctl start crypto-bot\nsudo systemctl enable crypto-bot   # auto-start on reboot\n```\n\nNow open Telegram, find your bot, and send `/start`\n\n. Within a few minutes you’ll get your first analysis message. Useful commands: `/status`\n\n, `/analyze`\n\n, `/performance`\n\n, `/history`\n\n.\n\nThe bot is fully functional headless, but the **Next.js dashboard** is where you see why it does everything. It’s a separate app (plus a Laravel API for auth and role-based access) served behind nginx. The full stack is: bot → Laravel API (php-fpm) → Next.js dashboard (PM2) → nginx reverse proxy with SSL. It’s more involved than the bot itself, so I’m keeping the deep detail in the repo’s deployment docs rather than bloating this post.\n\n🛠️\n\nWanted:a one-command`docker compose up`\n\nfor the whole stack is on the roadmap. If you’d enjoy building it, it’s the single highest-impact contribution right now —[open an issue]and let’s talk.\n\nNobody tells you this, and it’s the reason people abandon self-hosted bots. Realistic monthly cost:\n\nThe takeaway: cheap to run in testnet, but the Anthropic bill scales with how often you trigger the heavy AI features — so keep an eye on it.\n\n`deploy/update.sh`\n\nreinstalls and restarts but doesn’t `git pull`\n\n— run `git pull`\n\nyourself first.`DB_CONNECTION=mysql`\n\npointed at the bot’s database, or the dashboard shows no data.`php artisan migrate`\n\n+ `db:seed`\n\n— skip it and login breaks.You’ve deployed an AI crypto trading bot that analyses the market every four hours, explains its reasoning, and asks before it trades. Let it run on testnet for a couple of weeks and watch the `/performance`\n\nnumbers accumulate before you even think about real money.\n\nFirst contact: the deployed bot’s analysis message arriving in Telegram.🎉\n\nGot it running?I’d love to see it — drop a comment or a screenshot. And if this guide saved you time:\n\n⭐Star the repo on GitHub\n\n☕[(it covers the API and server costs that keep it running)]Support the project on Ko-fi\n\n**Tags:** AI Crypto Trading Bot, VPS Deployment, Self-Hosting, Binance, DevOps\n\nDisclaimer: For educational and research purposes only. Not financial advice, not a solicitation to trade. Cryptocurrency trading carries substantial risk of loss. Always start on testnet and never trade money you can’t afford to lose.", "url": "https://wpnews.pro/news/how-to-deploy-an-ai-crypto-trading-bot-on-your-vps", "canonical_source": "https://dev.to/dineshstack/how-to-deploy-an-ai-crypto-trading-bot-on-your-vps-59a4", "published_at": "2026-07-24 19:45:04+00:00", "updated_at": "2026-07-24 20:33:45.293134+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-tools", "developer-tools"], "entities": ["Anthropic", "Binance", "Telegram", "Claude", "Next.js", "Laravel", "nginx", "Dinesh Stack"], "alternates": {"html": "https://wpnews.pro/news/how-to-deploy-an-ai-crypto-trading-bot-on-your-vps", "markdown": "https://wpnews.pro/news/how-to-deploy-an-ai-crypto-trading-bot-on-your-vps.md", "text": "https://wpnews.pro/news/how-to-deploy-an-ai-crypto-trading-bot-on-your-vps.txt", "jsonld": "https://wpnews.pro/news/how-to-deploy-an-ai-crypto-trading-bot-on-your-vps.jsonld"}}