How to Set Up a Forex VPS for MT4/MT5 (2026)

The short version: To set up a Forex VPS, pick a datacenter near your broker (NY4 for most US and crypto brokers, LD4 for London, TY3 for Tokyo), provision a Windows VPS in that region, connect over RDP, install MT4 or MT5, log in to your broker, attach your Expert Advisor, set the platform to auto-start, set the VPS to never sleep, and verify the ping is single-digit milliseconds.

I have set this up dozens of times for traders running Expert Advisors that cannot tolerate a laptop that sleeps or a home connection that drops. A Forex VPS is just a small Windows server in a datacenter close to your broker, so MetaTrader runs 24 hours a day, five days a week, with a fast, stable link to the trade server. The whole job takes about 30 minutes. The two things people get wrong are picking the wrong datacenter and forgetting to stop the VPS from sleeping.

What you need before you start

Why latency and uptime matter for an EA

An Expert Advisor reacts to price ticks and sends orders automatically. Every millisecond between your terminal and the broker's trade server is a window in which the price can move before your order fills. That gap is slippage, and on a scalping or high-frequency strategy it eats the edge.

From home broadband, round-trip latency to a broker server is often 80 to 150 ms. Put the VPS inside (or beside) the broker's datacenter and that drops to single-digit milliseconds. The other half is uptime: a laptop that sleeps, a home router that reboots overnight, or a power cut all leave open positions unmanaged. The VPS runs in a facility with redundant power and network, so the EA keeps trading whether or not you are awake or even connected.

Step 1: Find your broker's datacenter

This is the decision that makes or breaks the setup. Match the VPS to the same facility, or at least the same city, as your broker's trade servers. The three big Forex hubs are below.

Datacenter Location Typical brokers VPS region to choose
NY4 Equinix NY4, Secaucus, New Jersey Most US brokers, many crypto brokers, IC Markets NY server, Oanda Pick a US East VPS region (Ashburn, New York, New Jersey)
LD4 Equinix LD4, Slough, United Kingdom London and EU brokers, Pepperstone, IC Markets EU, many ECN feeds Pick a UK or EU VPS region (London, Falkenstein, Frankfurt)
TY3 Equinix TY3, Tokyo, Japan Asian brokers and JPY-pair specialists routing through Tokyo Pick a Tokyo VPS region

If you do not know which facility your broker uses, open a support ticket and ask: "Which datacenter hosts your trade servers, and what is the trade server hostname?" Brokers answer this routinely because they sell VPS bundles themselves. Once you have the answer, pick a VPS region in the same metro. Same-city is usually within 1 to 5 ms, which is good enough unless you are doing serious high-frequency work.

Step 2: Provision a Windows VPS

Order a VPS in the region you just chose, running Windows. Two main routes:

Whichever you pick, choose at least 2 GB of RAM. Windows itself wants about 1.5 GB before MetaTrader opens, so a 1 GB plan will thrash. If you plan to run several broker terminals at once, order 4 GB.

Once the server is built, your host's panel gives you a public IP address and an Administrator password. You need both for the next step.

Step 3: Connect over RDP

Remote Desktop Protocol gives you the VPS desktop on your own screen. Open your RDP client and connect to the public IP with the Administrator user and the password from the panel.

On Windows, open the Run box and launch the client, then enter the IP:

mstsc /v:203.0.113.10

On macOS, install Microsoft Remote Desktop from the App Store, add a new PC with the IP, and enter the credentials. On Linux, use xfreerdp from the terminal:

xfreerdp /v:203.0.113.10 /u:Administrator /p:'your-password' /cert:ignore /dynamic-resolution

You should land on a fresh Windows desktop running in the datacenter. The first thing I do here is change the Administrator password to something strong if the host generated it, because an exposed RDP port is a brute-force target.

Step 4: Install MT4 or MT5

Inside the RDP session, open Edge and download the MetaTrader installer from your broker's website, not from a generic source. The broker build ships with the correct trade server list already populated, which saves you guessing the server name later. Run the installer and accept the defaults.

If your broker offers both MT4 and MT5, install the one your EA was compiled for. An .ex4 file runs on MT4, an .ex5 file runs on MT5; they are not interchangeable.

Step 5: Log in to your broker account

Open MetaTrader. Go to File then Login to Trade Account. Enter your login ID, your password, and select your broker's trade server from the dropdown. If the server you need is not listed, you downloaded a non-broker build; reinstall from the broker site.

A successful login shows a live data feed: the bottom right corner displays moving connection bars and a small number of kilobits per second. Red bars or "No connection" means a wrong server or wrong credentials.

Step 6: Attach your Expert Advisor

Copy your EA file onto the VPS (drag it through the RDP clipboard, or download it from your own cloud storage inside the session). Then place it where MetaTrader looks for EAs:

  1. In MetaTrader, go to File then Open Data Folder.
  2. Open MQL4\Experts for MT4, or MQL5\Experts for MT5.
  3. Copy your .ex4 or .ex5 file into that folder.
  4. Back in MetaTrader, right-click Navigator and choose Refresh (or restart the terminal).
  5. Drag the EA from the Navigator onto the chart for the pair it trades.
  6. In the dialog, tick Allow live trading, then click OK.
  7. Click Algo Trading in the toolbar so it is highlighted.

A smiley face in the top right of the chart means the EA is live. A sad face or a small "x" means Algo Trading is off or live trading was not allowed, fix that before you walk away.

Step 7: Set auto-start and stop the VPS from sleeping

This is the step people skip, and then their EA goes dark after an overnight Windows Update reboot. Do both halves.

Auto-start MetaTrader after a reboot. Put a shortcut to the terminal in the Startup folder. Press Win+R, paste this, and drop a copy of the MetaTrader desktop shortcut into the folder that opens:

shell:startup

MetaTrader reopens your last chart and the attached EA reattaches automatically as long as Algo Trading was on when it closed.

Never let the VPS sleep. Set the power plan to High performance and turn off every timeout. Open an elevated Command Prompt and run:

powercfg /setactive SCHEME_MIN
powercfg /change standby-timeout-ac 0
powercfg /change monitor-timeout-ac 0
powercfg /change hibernate-timeout-ac 0

A zero timeout means "never". The server now stays awake with the terminal and EA running, even while no one is connected over RDP.

Step 8: Verify the ping to your broker

Confirm you actually got the low latency you paid for. Inside MetaTrader, right-click the connection status in the bottom right corner; it shows the live ping to the trade server in milliseconds. You want single digits.

You can also test from the Windows command prompt on the VPS using the broker's trade server hostname:

ping mt5.yourbroker.com
tracert mt5.yourbroker.com

If you see 50 ms or more, your VPS is in the wrong region. Move it to a region in the same city as your broker's datacenter and test again. A correctly placed NY4, LD4, or TY3 VPS should report low single-digit milliseconds.

Common mistakes (and how to avoid them)

An honest word on Windows licensing cost

The Linux VPS pricing you see quoted elsewhere on this site (Hetzner at around 5 euros a month) does not include Windows. MetaTrader needs Windows, and Windows costs money. On Hetzner you supply your own Windows Server license on top of the server fee, which is cheapest only if you already own one. A Hostinger Windows VPS folds the license into the monthly price, so the all-in number is higher than a bare Linux box but you skip the licensing hassle. Do not be surprised when a "5 dollar VPS" turns into more once Windows is included; that is normal for Forex.

Skip the manual work

If you would rather not boot an ISO and install Windows by hand, get a Windows VPS that arrives ready to use. A Hostinger Windows VPS ships with Windows preinstalled and the license included, so you go straight from RDP login to installing MetaTrader, no licensing step. Pick the region closest to your broker's datacenter, connect over RDP, and start at Step 4 above. For traders who already own a Windows license and want the lowest base cost, the self-installed Hetzner route is cheaper. If your separate goal is managed WordPress rather than trading, Cloudways is the managed option we use, though it is Linux-only and not for MetaTrader.

FAQ

Why does a Forex VPS need low latency?

An Expert Advisor sends orders based on price ticks. Every millisecond between your terminal and the broker's trade server is slippage risk: the price can move before your order fills. Hosting the VPS in the same datacenter as the broker (NY4, LD4, or TY3) cuts round-trip latency from 80 to 150 ms over home broadband down to single-digit milliseconds, which tightens fills on scalping and high-frequency strategies.

Which datacenter should my Forex VPS be in?

Match your broker. Most US and crypto brokers route through Equinix NY4 in Secaucus, New Jersey. London and many European brokers use LD4 in Slough. Asian brokers often use TY3 in Tokyo. Ask your broker support which facility hosts their trade servers, then pick a VPS region in the same city. If you cannot host inside the exact facility, the same metro area is usually within 1 to 5 ms.

Do I need Windows for a Forex VPS?

For most traders, yes. MetaTrader 4 and 5 are native Windows applications, and the simplest, most reliable setup is a Windows VPS you connect to over RDP. You can run MetaTrader on Linux through Wine, but that adds failure modes that are not worth it for an account placing real trades. Budget for the Windows license: either bring your own on Hetzner or buy a Hostinger Windows VPS with the license bundled.

How much does a Forex VPS cost?

A self-managed Linux VPS near a broker datacenter starts around 4 to 6 dollars a month, but Forex needs Windows. On Hetzner you add the cost of a Windows Server license on top of roughly 5 euros a month for the server. A Hostinger Windows VPS bundles the license from about 7 to 10 dollars a month. Specialist Forex VPS hosts charge 25 to 50 dollars a month for managed low-latency setups.

How much RAM does MetaTrader need on a VPS?

One MetaTrader terminal with a couple of EAs and a few charts runs comfortably in 2 GB of RAM. If you run several terminals for multiple broker accounts, or EAs that load heavy indicators and history, move to 4 GB. Windows itself wants about 1.5 GB before MetaTrader even opens, so do not try to run this on a 1 GB plan.

Will my EA keep trading if I close Remote Desktop?

Yes. The VPS keeps running in the datacenter whether or not you are connected. Closing the RDP window only ends your view of the desktop; MetaTrader and the EA keep executing. To survive a reboot, add MetaTrader to the Windows Startup folder and set the power plan to never sleep, so the terminal relaunches automatically and the account is never left unattended.

How do I check the ping from my VPS to the broker?

Inside MetaTrader, hover or right-click the connection status in the bottom right corner to see the live ping in milliseconds. From the Windows command prompt on the VPS you can also run ping or tracert against the broker trade server hostname. Single-digit milliseconds is the target. If you see 50 ms or more, your VPS is in the wrong region for that broker.