Run Your Python Trading Bot 24×7: VPS + Static IP Setup Guide

Run Your Python Trading Bot 24×7: VPS + Static IP Setup Guide

Deploy a Python algo trading bot on a VPS with a dedicated static Indian IP — systemd service, proxy configuration, pre-market checks and monitoring included.

Architecture overview

The reliable pattern used by serious retail desks: your strategy runs on a small Linux VPS (any provider, any region), and all broker traffic exits through your dedicated static Indian IP via proxy. The VPS gives you 24×7 compute; the static IP gives you a fixed, whitelisted, low-latency Indian identity. The two are decoupled — you can rebuild or move the VPS anytime without touching your broker whitelist.

Step 1 — Provision the VPS

A 1 vCPU / 1 GB RAM Ubuntu VPS (₹300–₹500/month) comfortably runs a couple of Python strategies. Install your stack:

Step 2 — Wire the static IP into the environment

Keep proxy credentials out of code. Put them in an environment file:

Step 3 — Pre-market sanity check

Step 4 — Run it as a systemd service

Step 5 — Monitoring basics

Why not just buy a VPS in Mumbai and use its IP?

You can, but VPS IPs are recycled between customers — the previous tenant may have burned its reputation. VPS providers also swap IPs on resize/rebuild, forcing broker re-whitelisting. A purpose-run dedicated static IP with clean provenance, held independent of your compute, is the more durable setup.