Guide · running it · hosting

Should your trading bot run on a home PC or a cloud server?

Once a strategy is automated, it has to run somewhere. For most traders the first answer is the computer on their desk, and for some strategies that is fine. Here is how to tell when it is enough, when a cloud server is worth it, and what to plan for either way.

The short answer

A home PC is fine if you watch the bot during the session and it is not left holding positions while you are away. Once the bot has to run on its own, a small cloud server is usually the safer home: it does not sleep, lose power when your house does, or restart for updates in the middle of the session. In India, the rule that API orders come from a static IP address usually points to a server as well.

Home PC or cloud server at a glance

Home PCCloud server (VPS)
Runs while you are away or asleepOnly while the PC, the power and the internet all stay upYes, around the clock
Power cuts and internet dropsStop the bot, unless you have backup power and a second connectionRare: a data centre has steady power and a steady connection
Updates and restartsCan stop the bot in the middle of a session unless you control themStill needed, at a time you choose
Fixed IP address (required for broker API access in India)Usually not, unless your provider assigns a static IPYes, and you can register it with your broker
Operating systemWhatever your PC runs; desktop platforms such as MetaTrader and NinjaTrader need WindowsWindows for desktop platforms; Linux, usually cheaper to rent, for a bot that talks to the broker’s API directly
Distance to the brokerYour home connection; fine for strategies on bars of a minute or longerCan sit in the broker’s region; worth it only for strategies that act within seconds
CostThe PC you already haveA small monthly rent
Someone checks the bot is runningYesYes
Best forBots you watch during the session, and first testsBots that run on their own, or hold positions while you are away

When a home PC is enough

  • You start the bot when the market opens and watch it during the session.
  • It closes its positions before you switch off, or you are happy to manage them by hand.
  • The strategy trades on bars of a minute or longer, so a little extra internet delay makes no difference.
  • You use a desktop platform such as MetaTrader or NinjaTrader, which already runs on your PC.

This is how many first builds start, and it is a sensible way to see the system working before paying for anything else. Our starter trading bot is built for exactly this: one strategy, one broker, run while you watch.

What goes wrong at home

  • Power cuts and internet drops. A bot that loses its connection mid-trade has to reconnect without sending the same order twice. A bot that loses power can do nothing at all.
  • Sleep, updates and restarts. Computers install updates and restart, and laptops sleep when the lid closes. Each one stops the bot without warning.
  • The IP address changes. Most home connections are given a new address from time to time, which matters if your broker only accepts orders from an address you registered.
  • Shared computers. A family PC with a trading bot on it is one closed window away from a stopped system.

None of these is rare. Run a bot every trading day for a few months and most of them will happen at least once.

What a cloud server gives you

A cloud server, often called a VPS (virtual private server), is a computer in a data centre that you rent by the month. Large providers such as AWS, Microsoft Azure, Google Cloud and DigitalOcean offer them, as do many smaller hosts, including some aimed at traders that place servers near brokers’ data centres. We don’t recommend one over another; the right one depends on your platform, your broker and where you are.

  • It runs around the clock on steady power and a steady connection.
  • It has a fixed IP address, which you can register with your broker.
  • You can reach it from anywhere, and set it to start the bot again on its own after a crash or a restart.

A small server is inexpensive. What it does not do is look after itself: updates still have to be installed, at a time you choose, and someone still has to check that the bot is running.

Windows or Linux

The platform decides. MetaTrader, NinjaTrader and TradeStation are built for Windows, so they need a Windows machine or a Windows server. A bot that talks to the broker’s API directly, in Python for example, runs well on Linux, which is lighter and usually cheaper to rent because there is no Windows licence. If you trade through Interactive Brokers, the bot connects through IB Gateway, which restarts once a day; our Interactive Brokers page explains how a system handles that.

Does it need to be close to the broker?

For most retail strategies, no. A strategy that trades on bars of a minute or longer is not affected by the small delay between a server and the broker. Distance starts to matter for strategies that act within seconds or less, where a server in the same region as the broker, or co-location, can be worth the cost. Our guide to when you actually need co-location covers that end.

In India: the static IP rule

Under SEBI’s framework for retail algo trading, access to a broker’s API has to come from a static IP address your broker has whitelisted. Most home internet connections change their IP address from time to time, so a bot usually runs on a server or cloud machine with a fixed address, or on a connection where the provider has assigned a static IP. You then register that address with your broker, following its own process. Our guide to SEBI’s retail algo trading rules explains the requirement and the documents behind it.

A static IP is one part of the rules, not all of them. Your broker applies these rules to your account, so its terms decide the details, and a bot that places orders faster than 10 orders per second must also be registered with the exchange through your broker.

Wherever it runs

Home PC or cloud server, a bot that runs every day needs the same five habits:

  • It starts on its own when the machine starts, and reconnects without sending orders again.
  • It checks before it trades. On every start it reads positions and open orders from the broker rather than assuming them.
  • It tells you when it stops, loses the broker connection or hits a limit, with a message to your phone.
  • It has a kill switch you can reach from your phone.
  • Updates happen on your schedule, outside market hours.

Our guide to the edge cases of live trading systems goes through these in detail, and our trading bot checklist covers what to prepare before a build.

Where we fit

We build the system to run where it suits you: your own PC, your own server or a cloud server you rent. A bot you watch during the session is a starter build. One that runs on its own needs the reconnection, reconciliation and alerts above, which makes it a larger build; our guide to what a custom trading bot costs explains why.

Common questions

Do I need to leave my computer on for a trading bot?
Yes, for as long as the bot is meant to trade. A bot only trades while its machine is on and connected. If it only trades while you watch the session, a home PC is fine. If it has to run while you are away or asleep, a cloud server is the safer choice.
Windows or Linux server for algo trading?
The platform decides. MetaTrader, NinjaTrader and TradeStation are built for Windows, so they need a Windows machine or server. A bot that talks to the broker’s API directly, in Python for example, runs well on Linux, which is usually cheaper to rent because there is no Windows licence.
Does a trading bot server need to be close to the broker?
For most retail strategies, no. A strategy that trades on bars of a minute or longer is not affected by the small delay between a server and the broker. Location starts to matter for strategies that act within seconds or less.
start here

Tell us your market, your broker, and what you want automated.

Send us the requirement. We'll come back with the questions that turn it into a real scope, cost and timeline, usually within one working day.

Send us your brief

A few lines is enough to start: your rules in plain words, or a link to your script. We'll ask for the rest.