Hosting basics

Where Does a Bot Actually Run?

A bot needs a runtime somewhere. The right choice depends on whether it must stay alive continuously, receive public webhooks, maintain local state or depend on a desktop platform such as MetaTrader.

Remote VPS deployment session over SSH and SCP
Hands-on screenshot: long-lived processes need a machine or runtime that actually stays available.

Quick answer

If the bot runs on your own PC, that PC normally needs to stay on. If it runs on a VPS or serverless platform, your home PC can be off. MetaTrader EAs require a running MetaTrader environment somewhere; Cloudflare Workers run on demand rather than as a permanently open desktop process.

Home PC

The home PC is the easiest place to learn because you can see files, terminals and error messages directly. It is also the least reliable 24/7 option. Sleep mode, Windows updates, router restarts, power cuts and accidental application closure can stop the bot.

Good choice when

You are developing, backtesting, manually supervising or learning.

Weak choice when

You expect unattended operation for days or weeks.

Dedicated mini-PC

A small dedicated computer can be a good middle ground for local automation. It can stay on without tying up your main PC. You still own the electricity, networking, backups and physical reliability. For systems that need access to equipment on your local network, that can be an advantage.

Linux VPS

A VPS is a virtual computer in a data center. You typically connect through SSH, install Python or Node.js, store secrets as environment variables and use a service manager such as systemd. It is well suited to WebSocket connections, polling loops, databases and long-running processes.

Your home PC does not need to stay on after deployment. The VPS is the computer running the process.

Windows VPS

A Windows VPS is useful when the software requires Windows or a graphical terminal. MetaTrader + Python is a common example: the MT5 terminal and Python process can run together on a Windows VPS so the connection does not depend on your home computer.

Cloudflare Worker

A Worker is serverless. You deploy code, then Cloudflare runs it when a request or scheduled trigger arrives. It is excellent for webhook validation, API gateways, small transformations and short jobs. It does not behave like leaving a Python script open in a terminal forever.

MetaTrader terminal and MetaTrader VPS

An Expert Advisor executes inside MetaTrader. If MetaTrader runs on your home PC, the PC and terminal must keep running for the EA to keep working. MetaTrader's own VPS service can migrate a MetaTrader environment so the EA keeps operating without your home PC. It is specialized hosting, not the same as renting a normal Windows desktop server for arbitrary applications.

Decision table

RuntimeHome PC must stay on?Long-running process?Public webhook?Best fit
Home PCYesYesPossible, but awkwardDevelopment and supervised use
Mini-PCMain PC: noYesPossible with networking setupDedicated local service
Linux VPSNoYesYesPython/Node 24/7 bots
Windows VPSNoYesYesMT5 + Python / Windows software
Cloudflare WorkerNoEvent-drivenExcellentWebhooks and API logic
MetaTrader VPSNoMetaTrader workloadsNot its main purposeMT4/MT5 EAs

A hybrid setup is often easier

You do not have to choose only one platform. A public Worker can receive and validate webhooks while a private VPS runs the long-lived bot. This reduces what the VPS exposes to the internet and keeps the persistent logic separate from the public endpoint.

Internet / TradingView
      ↓
Cloudflare Worker
      ↓ authenticated internal event
VPS bot
      ↓
Broker / database / monitoring