Step 2 · about 15 minutes
Do you need a VPS to run an EA on MT5?
No, not to start. You can complete this entire path, and weeks of demo observation, on your own computer. A VPS, a small rented computer that stays on around the clock, becomes worth adding before you go live, because an EA can only trade while MetaTrader 5 is actually running and connected.
An Expert Advisor is ordinary software: it only works while the computer running MetaTrader 5 is switched on and online. The currency market trades continuously from Sunday evening to Friday night, so serious EA users usually run the platform on a VPS, short for virtual private server, which is a small computer you rent inside a professional data centre and control remotely. This guide explains what a VPS gives you, what specification you actually need, and, honestly, when your own PC is good enough. Because you are starting on a demo account, the answer for now is simple: your home computer is fine, and a VPS is a decision to make later, before real money is involved.
Decide whether you need a VPS yet
While you are on a demo account, a missed trade costs nothing, so run everything on your normal computer and skip the expense. The time to add a VPS is before you switch to a live account, when a disconnection during an open trade sequence could genuinely matter. Read the rest of this guide now so the decision is easy later, then carry on to step three of the path.
vps-decision-flowchart.webpScreenshot slot — see SHOT-LIST.mdFlowchart showing that demo users can use a home PC and live users should consider a VPS- On demo: home PC is fine
- Before going live: add a VPS
Understand why uptime matters for an EA
If MetaTrader 5 closes, loses internet, or the computer sleeps, the EA stops managing its positions until the connection returns. Any trades already open remain open at the broker, unmanaged, which is the risk a VPS removes. A data centre has redundant power and internet, so the platform simply stays running for the whole trading week. This is what people mean when they say an EA benefits from 24/5 uptime.
mt5-connection-status-bar.webpScreenshot slot — see SHOT-LIST.mdMetaTrader 5 status bar showing the connection indicator and data transfer figures in the bottom corner- Connection indicator, green when connected
- No connection message when the link drops
Choose a VPS region close to your broker's server
Latency is the time an order takes to travel from your platform to the broker's server, and distance is the main cause: the further apart, the slower. Find out which city hosts your broker's trade servers, commonly London or New York, and rent your VPS in the same region. Cutting latency from hundreds of milliseconds to a handful means orders fill closer to the price the EA asked for. It will not make a strategy profitable, but it removes an avoidable cost.
vps-latency-region-map.webpScreenshot slot — see SHOT-LIST.mdWorld map showing latency in milliseconds from several VPS regions to a broker data centre in London- Broker data centre location
- VPS in the same region, single-digit latency
- Distant VPS with much higher latency
Pick the minimum specification for one MT5 instance
One copy of MetaTrader 5 running one EA is a light workload. Look for at least 2 GB of RAM, one or two vCPUs, which are shares of a processor, around 40 GB of storage, and a Windows Server operating system, because MT5 is a Windows program. Paying for more than this only makes sense if you plan to run several platforms at once. Cheaper Linux-only plans will not run MT5 without awkward workarounds, so avoid them as a beginner.
vps-spec-minimums-table.webpScreenshot slot — see SHOT-LIST.mdTable of minimum VPS specifications for a single MetaTrader 5 instance- 2 GB RAM minimum
- 1 to 2 vCPUs
- Windows Server operating system
Compare the three types of VPS provider
There are broadly three options. Forex-specialist VPS hosts come pre-configured for MT5 and sit in the right data centres, but cost more per month. General cloud providers are cheaper and very reliable, but you set up Windows and MT5 yourself. Broker-provided VPS services are the most convenient and are sometimes free above a trading volume threshold, though you accept whatever specification the broker offers. Concretely: the simplest route for a beginner is the built-in MetaTrader 5 VPS from MetaQuotes, rented in a couple of clicks from inside the terminal itself and automatically placed near your broker's server; forex specialists such as ForexVPS.net and FXVM come pre-configured for MT5 in London and New York; and general providers such as Contabo or Vultr offer cheap Windows servers if you are comfortable doing the setup yourself. We have no affiliate relationship with any provider named here.
vps-provider-types-comparison.webpScreenshot slot — see SHOT-LIST.mdComparison chart of forex-specialist VPS, general cloud providers and broker-provided VPS options- Specialist host: pre-configured, dearer
- General cloud: cheap, more setup
- Broker VPS: convenient, fixed spec
Weigh the honest alternative of your own always-on PC
Running the EA on a computer you already own costs nothing, and for demo trading it is the sensible default. Be realistic about the risks for live trading, though: power cuts, broadband outages, and Windows updates that restart the machine overnight without asking. If you go this route, disable sleep and hibernation, set Windows Update active hours so restarts are less likely during the trading week, and accept that you are your own data centre.
windows-update-restart-settings.webpScreenshot slot — see SHOT-LIST.mdWindows settings screen showing active hours configuration and sleep disabled in power options- Active hours set to limit automatic restarts
- Sleep set to never in power settings
Connect to a VPS with Remote Desktop
When you do rent a VPS, the provider emails you an address, a username and a password. On your own computer, open the Remote Desktop Connection app that is built into Windows, or a free equivalent on Mac, enter those details, and a window opens showing the VPS's own Windows desktop. Everything you do inside that window, such as installing MT5 in the next guide, keeps running after you close it. Change the password on first login.
windows-remote-desktop-connection.webpScreenshot slot — see SHOT-LIST.mdRemote Desktop Connection dialog with the VPS address entered and the remote Windows desktop opening- VPS address in the Computer field
- Remote Windows desktop in its own window
Common problems.
Can I run an MT5 EA on my laptop overnight instead of a VPS?
Yes, provided the laptop stays powered, awake and online. Plug it in, disable sleep and hibernation in the power settings, and set Windows Update active hours to reduce surprise restarts. On a demo account this is completely fine and costs nothing. For a live account, treat it as a stopgap: one power cut or forced update during an open trade sequence and the EA is offline while positions sit unmanaged at the broker.
Does closing the Remote Desktop window stop the EA?
No. Remote Desktop is only a viewing window onto the VPS; the server itself keeps running when you disconnect, and so do MetaTrader 5 and the EA. The one thing that does stop everything is shutting down or restarting the VPS from inside the session, so use disconnect, not shut down. After a provider-side reboot, log back in and check MT5 reopened; setting it to start automatically with Windows is a sensible precaution.
What latency is good enough for an EA on MT5?
For a strategy like this one, anything under roughly 50 milliseconds to the broker's server is comfortable, and a VPS in the same city as the broker's data centre often achieves under 5. This is not a high-frequency system, so chasing single-digit numbers buys very little. What actually hurts is instability: a home connection that drops for minutes at a time is far worse than a steady connection that is 100 milliseconds away.
Do I need a separate VPS for a demo account?
No. The entire demo phase of this path can run on your everyday computer, and if the machine happens to be off overnight, the only cost is a gap in your observations. Some people rent the VPS during the final weeks of demo anyway, to rehearse the exact setup they will use live, and that is a reasonable choice, but it is a convenience rather than a requirement.