Log inSign up

VPS for trading bots: fast cores in the right city

Most trading bots fit on F1-2 with 1 vCPU, 2 GB RAM, 64 GB NVMe; the bigger gains come from picking the city nearest your venue, keeping the clock in sync and locking down API keys.

Why run a trading bot on a VPS instead of at home?

A VPS stays online when your laptop sleeps, sits on a data centre network, and has a fixed IPv4 you can allow-list on the venue side. Home connections drop, change IP and route through consumer links. A bot that misses a websocket reconnect or a fill notice for ten minutes is a bot that behaves unpredictably. On a server, the process runs under systemd, restarts on failure and leaves logs you can read later.

The dedicated IPv4 is the quiet benefit here. Many venues let you restrict an API key to a list of addresses, and a static server IP makes that restriction practical. We write about infrastructure only; whether and how you trade is your own decision, and nothing here is investment advice.

Which plan line suits a bot?

High Frequency is the natural fit, because bots spend their time in short single-threaded bursts that reward clock speed. Parsing a JSON order book update, recalculating an indicator and signing an order are each small tasks, and a core above 3 GHz finishes them sooner. F1-2 with 1 vCPU, 2 GB RAM, 64 GB NVMe runs one or two Python or Node bots with room for a small SQLite or Redis store. Move to F2-4 when you run several strategies, a local database, or a dashboard next to the bot.

  • One bot, one venue: F1-2.
  • Several bots, a Postgres store, a web UI: F2-4 or F3-8.
  • Backtesting over long histories: F4-16, since backtests are memory and CPU hungry in a way live trading is not.

Plans for this workload

Smallest first, at the base city price. Order totals are the shortest prepaid term that reaches $40.

PlanWhySizeMonthlyOrder from
F1-2one or two bots with a small local store1 vCPU, 2 GB RAM, 64 GB NVMe$7.20/mo$43.20 for 6 months
F2-4several strategies plus a database and dashboard2 vCPU, 4 GB RAM, 128 GB NVMe$14.40/mo$43.20 for 3 months
F3-8many pairs, more indicators, local Postgres3 vCPU, 8 GB RAM, 256 GB NVMe$28.80/mo$86.40 for 3 months
F4-16heavy backtests and data collection next to live bots4 vCPU, 16 GB RAM, 384 GB NVMe$57.60/mo$57.60 for 1 month

How do you pick the city closest to your venue?

Measure, do not guess: resolve the API hostname, test the round trip from a few candidate cities, and deploy where the numbers are lowest. Crypto venues and brokers host their matching engines in a handful of regions, commonly Tokyo, Singapore, Western Europe around Frankfurt, London and Amsterdam, and the US East Coast near New Jersey. API hosts may sit behind a content network, so the IP you reach is not always the engine itself.

A quick way to compare is to deploy a small instance in two cities for the shortest allowed term and run, from each:

curl -o /dev/null -s -w 'connect %{time_connect}s  first byte %{time_starttransfer}s\n' https://api.your-venue.example/ping
mtr -rwc 50 api.your-venue.example

Typical internet round trips are usually only a few milliseconds within one metro area, roughly 70~90 ms across the Atlantic and around 100~180 ms between Europe and East Asia, so the right city can matter far more than the right plan. We sell in Tokyo, Singapore, Frankfurt, London, Amsterdam and New Jersey, among 32 cities.

How do you set up the bot so it survives restarts?

Create a dedicated user, keep secrets in an environment file only that user can read, and run the bot as a systemd service. A typical Python setup on Ubuntu 24.04:

adduser --disabled-password bot
su - bot -c "python3 -m venv ~/venv && ~/venv/bin/pip install -r ~/app/requirements.txt"
install -m 600 -o bot /dev/null /home/bot/app/.env

# /etc/systemd/system/bot.service
[Service]
User=bot
WorkingDirectory=/home/bot/app
EnvironmentFile=/home/bot/app/.env
ExecStart=/home/bot/venv/bin/python main.py
Restart=always
RestartSec=5

Start it now and at every boot via systemctl enable bot --now, then tail its log using journalctl -fu bot. Open-source frameworks such as Freqtrade or Hummingbot also ship Docker setups; the Docker image saves you the engine install.

Why does clock sync matter for a bot?

Every signed API call is stamped with the time, and an exchange throws out any call whose stamp drifts beyond its tolerance, often just a few seconds. A drifting clock shows up as random authentication errors at the worst moments. Install chrony and check it once:

apt install -y chrony
chronyc tracking

The offset should be a small fraction of a second. Log the server time next to each order so you can rule clock issues in or out quickly.

How should API keys and the server be locked down?

Give the bot a key that can trade but cannot withdraw, restrict that key to the IPv4 of your instance, and make the server itself boring to attack. Steps that matter:

  • Disable password SSH login and use keys only, as in the hardening tutorial.
  • Allow only port 22 inbound, or nothing at all if the bot never accepts connections, with rules from the firewall tutorial.
  • If you run a web dashboard, bind it to 127.0.0.1 and reach it through ssh -L.
  • Your account itself has no email or password: it is a private key starting with bvk_, so store that key in your password manager.

How much transfer does a bot use?

Far less than you might fear. A websocket feed of trades and book updates for a few pairs is often a few GB a month; even with dozens of pairs it stays well below the 2 TB on F1-2. Outgoing traffic from a bot is tiny, mostly order requests. Logging and shipping data off the server is usually the larger share.

Trading bots questions

Do you offer lower latency to specific venues?

We do not publish latency figures or private links. Test from two or three of our cities with curl and mtr, then keep the instance in the one that answers fastest.

Is backtesting a good fit for a small plan?

Live trading is light, backtesting is not. Run long backtests on F4-16 or on your own machine, and keep the live bot on a small plan.

Do multiple bots fit on a single instance?

Yes, one systemd unit or container per bot. Watch memory on the Usage graphs tab and move up a size before it fills.

Is this investment advice?

No. This page covers servers, networks and security only. Trading decisions and their risks are yours.

How do I pay for the server?

Each order is one crypto invoice. Stablecoins on low fee networks such as USDT on TRON are a common choice.