VPS, Cloud and Bare-Metal Servers
Compare VPS, cloud and bare metal servers for running trading bots and systems. Learn costs, latency, reliability, choosing a region and basic server setup.
Sooner or later, anyone running an automated strategy needs it to run somewhere more reliable than a personal computer. The main options are a virtual private server (VPS), a cloud instance from a large provider or a dedicated bare metal server. All three are rented computers in data centres with stable power and internet, but they differ in cost, performance consistency, flexibility and how close they can sit to the markets you trade.
The options#
| Option | What it is | Typical cost | Best for |
|---|---|---|---|
| VPS | A virtual machine on a shared host from a hosting company | Low, a few dollars to tens of dollars a month | Simple bots, MetaTrader expert advisors |
| Cloud instance | A virtual machine from AWS, Google Cloud, Azure and others, with many extra services | Pay as you go; small instances are cheap, large ones expensive | Flexible setups, research clusters, managed databases |
| Bare metal | A whole physical server rented or owned | Higher, often hundreds per month and up | Consistent performance, latency sensitive systems |
| Co location | Your own hardware in the exchange's data centre | High, plus exchange fees | High frequency trading. See Co-Location |
Trade offs#
| Factor | VPS | Cloud | Bare metal |
|---|---|---|---|
| Performance consistency | Can vary with neighbours | Varies by instance type | Very consistent |
| Scalability | Limited | Very high | Manual |
| Managed services | Few | Many (databases, queues, monitoring) | None by default |
| Control over hardware | None | Limited | Full |
| Setup effort | Low | Moderate | Higher |
Choosing a location#
Latency depends mostly on physical distance. Pick a data centre near your broker's or exchange's servers:
| Market | Typical hubs |
|---|---|
| US equities and options | Northern New Jersey data centres (such as Secaucus, Carteret, Mahwah) |
| CME futures | The Chicago area (CME's data centre is in Aurora, Illinois) |
| European markets | London, Frankfurt, Amsterdam |
| Many crypto exchanges | Often hosted on major cloud regions such as AWS Tokyo; check each exchange's documentation |
| Forex (many brokers) | London, New York and Tokyo data centres |
Light in fibre travels roughly 200 kilometres per millisecond, so every 1,000 kilometres adds roughly 5 milliseconds one way, before any routing overhead.
Basic server setup#
- Choose Linux (such as Ubuntu LTS) unless you need Windows for a platform like MetaTrader. See Linux for Traders.
- Use SSH keys, disable password logins and enable a firewall.
- Keep the system updated.
- Run your bot as a service that restarts automatically on crash or reboot.
- Synchronise the clock with NTP. See Clock Synchronization and PTP.
- Set up monitoring and backups. See Monitoring and Logging Systems and Failover, Backups and Disaster Recovery.
- Store secrets securely, never in code repositories.
Costs to watch in the cloud#
- Data transfer out of the cloud can be charged per gigabyte.
- Always on instances add up; size them to actual needs.
- Managed services are convenient but priced per use.
- Storage snapshots accumulate if not pruned.
Reliability#
Even data centres have outages. For important systems, consider a standby server in a different zone or provider, and keep broker side stops on positions. See Fault Tolerance, High Availability and Redundancy.
Frequently asked questions#
Do I need a VPS for trading?#
If you run a bot or expert advisor that must stay online, a VPS or cloud server is more reliable than a home computer and usually costs little.
Is cloud or VPS better for trading bots?#
A VPS is simple and cheap for one bot; cloud providers offer more flexibility and services for larger or more complex setups.
Where should my trading server be located?#
As close as practical to your broker's or exchange's servers, since latency grows with physical distance.
Next, learn the operating system most servers run in Linux for Traders.
3 quick questions on this lesson. Get them all right to finish it.
Turn on JavaScript to take the quiz.
Mentioned in
- Networking for TradersTrading Infrastructure
- CPU Affinity, NUMA and Cache OptimizationTrading Infrastructure
- Building Trading BotsProgramming and Data
- Exchange vs Receive Timestamps and Latency MeasurementProgramming and Data
- MetaTraderThe Trading Industry
- NinjaTraderThe Trading Industry