Oleh William Harris · Terakhir ditinjau
How to Set Up a VPS for MetaTrader 5 (Forex EA Hosting)
Apa yang Anda butuhkan
- • VPS provider account (ForexVPS, Beeks, Cloud4Forex, FxVM, etc)
- • Remote Desktop Connection client (built into Windows)
- • MT5 broker installer URL
Instruksi langkah demi langkah
Langkah 1: Pick a datacentre matching your broker
Latency matters more than CPU speed for EAs that send orders quickly. The lower the network ping between your VPS and the broker's order server, the better the execution fills.
Major broker datacentre locations in 2026: • LD4 / Equinix London — IC Markets, Pepperstone, FxPro, Tickmill, Admiral Markets, ThinkMarkets, FXTM EU • NY4 / Equinix New York — Pepperstone US, FOREX.com, OANDA US • TY3 / Equinix Tokyo — Exness (Asia), AxiTrader • AM2 / Equinix Amsterdam — Saxo Bank, Dukascopy EU • FR2 / Equinix Frankfurt — Admiral Markets Pro, JFD
Forex-specialised VPS providers (ForexVPS.net, Beeks, Cloud4Forex, FxVM) explicitly list which datacentre each VPS plan lives in. Generic providers like AWS, DigitalOcean, Linode can also work but you have to match regions: AWS eu-west-2 (London) ≈ LD4-area; AWS us-east-1 (N. Virginia) is close to NY4 but not in the same building.
The goal is sub-10ms ping to your broker's trade server. Test before committing: most VPS providers offer a 5-day trial.
Langkah 2: Pick the right specs
MT5 RAM use scales with chart count, EA complexity, and tick history depth. A practical sizing guide:
• 1 EA, 1 chart, no heavy backtesting → 1 vCPU + 2 GB RAM + 30 GB SSD ($5–7/month). Most cheap forex VPS plans.
• 4–6 EA charts running 24/5, occasional backtesting → 2 vCPU + 4 GB RAM + 50 GB SSD ($10–15/month). Sweet spot for retail traders.
• 10+ charts, multiple terminals, optimization runs → 4 vCPU + 8 GB RAM + 100 GB SSD ($25–35/month). Power-user tier.
• Multiple broker terminals + backtesting + live → 8 vCPU + 16 GB RAM + 200 GB SSD ($50+/month). Semi-professional.
Do not over-spec. A 16 GB RAM VPS for one EURUSD scalper is wasted money — the EA uses 400 MB even with a year of M1 tick history. Start small; you can usually upgrade in-place if needed.
SSD is non-negotiable. MT5 mmaps its tick history files, and a spinning HDD adds 200–500ms of stutter on every chart load.
Langkah 3: Pick the Windows version
Three options, in order of preference:
1. Windows Server 2022 — most stable for 24/5 operation, no scheduled reboots without your consent, supports up to 4 simultaneous RDP sessions. Costs an extra $5–10/month licensing on most VPS providers. Best choice for production.
2. Windows Server 2019 — older but still supported until 2029. Slightly cheaper licensing. Functionally identical to 2022 for MT5 purposes.
3. Windows 10/11 Pro — single concurrent RDP session, periodic forced updates that reboot the machine. Only use if you have a Microsoft account license; otherwise you'll hit activation issues. Avoid for production EA hosting.
Do not use Windows desktop editions (Home, Enterprise via personal Microsoft account). They are not licensed for server-style use and Microsoft has historically blocked them on VPS providers.
Linux is technically possible via Wine but adds 2–3 layers of debugging when something breaks. Not recommended unless you genuinely prefer Linux administration.
Langkah 4: Connect to the VPS via RDP
Your VPS provider emails you an IP address, RDP username (usually 'Administrator'), and password. On Windows: Start → Remote Desktop Connection (mstsc.exe). On Mac: install 'Microsoft Remote Desktop' from the App Store. On Linux: use Remmina.
First connection: enter the IP, click Connect. Accept the certificate warning (the VPS uses a self-signed cert). Enter username and password.
A Windows desktop appears. The first time, Windows runs through OOBE (out-of-box experience) for ~5 minutes — accept defaults, do not set up Cortana or Microsoft account. After OOBE you have a clean desktop.
First housekeeping inside the VPS: change the Administrator password to something only you know (Ctrl+Alt+End → Change Password). The provider's emailed password is shared with their support team and should not be relied upon for security.
Langkah 5: Harden RDP before going further
Default RDP on TCP/3389 with username 'Administrator' and a 12-character password is brute-forced within hours of provisioning. Three quick hardenings:
1. Change the RDP port. Run regedit, navigate to HKLM\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber, change the value (decimal) from 3389 to something between 49152 and 65535. Restart the Remote Desktop service. From now on connect with IP:newport.
2. Enable Windows Firewall and restrict RDP to your home IP. Control Panel → Windows Defender Firewall → Inbound Rules → 'Remote Desktop - User Mode (TCP-In)' → Properties → Scope → Add your home IP. Test the new firewall rule from your phone (4G); the connection should fail. From your home WiFi it should succeed.
3. Disable RDP for the Administrator account; create a separate user account for daily login. Computer Management → Local Users and Groups → New User → 'mt5user' with admin rights, then disable Administrator. This way brute-force attacks on 'Administrator' (the universal default username) fail by virtue of the account being disabled.
These three steps eliminate ~99% of opportunistic RDP attacks. If you skip them, expect to see Event Viewer logs filled with 'Failed logon' attempts within a week of provisioning.
Langkah 6: Install MT5 on the VPS
Open Edge inside the VPS, browse to your broker's downloads page, download the MT5 installer, run it. Installation is identical to the desktop install — see our install-mt5 guide for the per-dialog walkthrough.
One VPS-specific tip: when MT5 first launches, it asks 'Open MetaTrader 5 on Windows startup?'. On a VPS, answer Yes — that way if the VPS reboots (Windows updates, hardware migration), MT5 auto-launches without you needing to RDP in.
Also configure MT5 to auto-restart its EAs after a connection drop: Tools → Options → Expert Advisors → tick 'Enable algorithmic trading' and 'Allow modification of Signal Settings'. Without this, a dropped connection mid-trade can leave the EA in an inconsistent state.
Langkah 7: Verify latency to the broker
Inside the VPS, open Command Prompt (Win+R, cmd). Run `ping <broker server>.mql5.com` — your broker's server hostname is in MT5 → File → Login dialog. Substitute the real hostname.
Good ping numbers: • Same datacentre (LD4 VPS + IC Markets LD4 server) — 0.5–2 ms • Same metro (LD4 VPS + a London broker outside LD4) — 5–15 ms • Different city (London VPS + Frankfurt broker) — 20–40 ms • Different continent (London VPS + NY broker) — 80–120 ms
If you bought a VPS that claims 'co-located with IC Markets' but shows 50+ ms ping, complain to the provider. The label 'co-located' is sometimes marketing rather than literal.
Inside MT5, the status bar shows live ping to the broker's trade server. Confirm it matches the ICMP ping ± a few ms. Persistent ping > 30ms hurts scalping fills; for swing/trend EAs it doesn't matter.
Langkah 8: Set up monitoring so you know when MT5 dies
MT5 occasionally hangs, crashes, or gets disconnected. Without monitoring you won't know until you check manually — sometimes hours or days later.
Four layers of monitoring, in increasing complexity:
1. Configure MT5 to email you on EA errors. Tools → Options → Email tab, configure SMTP credentials (Gmail App Password works), then in your EA's settings enable 'send email on error'.
2. Use the broker's MT5 Mobile app on your phone. Account activity (new positions, closed positions) syncs in near-real-time. If you stop receiving notifications for >12 hours during the trading week, something is wrong on the VPS.
3. Set up an external uptime monitor like UptimeRobot to ping the VPS every 5 minutes. If the VPS itself goes down, you get a phone notification.
4. Run a small Python watchdog inside the VPS that checks every minute whether MT5 is connected to the broker and emails you on disconnect. Code samples available in the MQL5 Code Base.
For a $10/month VPS, layer 1+2 is usually sufficient. For paid EAs running on $5k+ accounts, add layer 3+4.
Kesalahan umum yang harus dihindari
- ✗ Picking a VPS based on price alone, not datacentre locationPerbaikan: A $3/month VPS in Russia with 100ms ping costs more in slippage than a $10/month VPS in London with 2ms ping.
- ✗ Leaving RDP on the default port 3389 with the Administrator account enabledPerbaikan: Change the port, disable Administrator, restrict firewall scope to your home IP. Takes 10 minutes; saves you from inevitable brute-force.
- ✗ Using Windows 10/11 Pro on a VPS where Server is availablePerbaikan: Desktop Windows reboots for updates without warning, killing your EA mid-trade. Use Windows Server.
- ✗ Over-specing — 16 GB RAM for a single EAPerbaikan: Start with 2 vCPU + 4 GB. Upgrade in-place if RAM use ever exceeds 60%. Most VPS providers support resize without reinstall.
- ✗ Forgetting to enable MT5 auto-start on Windows bootPerbaikan: After installing MT5, tick 'Start on Windows startup' in Tools → Options → Common. Otherwise a VPS reboot leaves you offline.
- ✗ No monitoring — finding out 3 days later that MT5 was disconnectedPerbaikan: At minimum: MT5 mobile app for trade notifications. Better: UptimeRobot ping + a Python watchdog email alerter.
Pertanyaan yang sering diajukan
Is a VPS really better than running MT5 on my home PC?
The only valid reason to stay on a home PC is psychological: some traders want to see the EA running before bed. That comfort costs you the difference between 99% home-PC uptime and 99.9% VPS uptime — about 7 hours of downtime per year. For a strategy that earns $100/day, 7 hours offline costs $30. The VPS pays for itself.
My broker offers a free VPS. Should I use it?
Common broker VPS gotchas: (1) the VPS is locked to the broker's server, so you can't add a second broker, (2) administrative access is limited — you may not be able to install custom monitoring tools, (3) if you fall below the minimum trade volume one month, the VPS converts to paid at premium pricing. For simple 1-EA setups, broker VPS is fine. For multi-broker or multi-EA setups, get an independent VPS.
Can I run multiple MT5 terminals on one VPS?
The practical limit isn't usually RAM — it's RDP session limits. Windows Server 2022 supports 4 concurrent RDP sessions out of the box; if you have 4 terminals open across 4 RDP windows you may not be able to log in as a 5th session. The workaround is to use a single RDP session and Alt-Tab between terminals inside the VPS. Most traders find 2–3 terminals manageable; beyond that, get a second VPS.
How do I prevent Windows updates from rebooting my VPS mid-trade?
Disabling updates entirely is a security risk — unpatched Windows servers get exploited. The middle ground is to defer updates: 'Pause updates for 7 days' button in Settings → Windows Update gives you a week to schedule reboots intentionally. Combined with a sconfig set to Manual, you have full control over when reboots happen.
Should I keep the VPS running on weekends when the market is closed?
The market opens at 22:00 UTC Sunday (Sydney open). If your VPS takes 5–10 minutes to boot and Windows needs time to load MT5 and re-attach EAs, you might miss the first 30 minutes of the trading week. Most EA strategies do nothing meaningful at the Sydney open so it usually doesn't matter, but the savings are minimal. Run the VPS continuously.
Most VPS providers offer 5-day trials. How should I use them?
The most common gotcha that only surfaces during a trial is regional licensing for paid EAs: some EAs check the VPS's geo-IP and refuse to license traders 'in a different country than purchase'. If your home is in EU but your VPS is in NY, the EA may not activate. Run your EA on the trial VPS to verify before committing to a year of hosting.
VPS running — what next?
Secure the MT5 account itself: 2FA, separate investor password, change defaults. The VPS protects you from network failure; account security protects you from compromise.
Continue to: How to secure your MT5 account →Panduan terkait

William Harris
Pendiri & Lead Developer FxRobotEasy
Chicago, Amerika Serikat · Sejak 2021
- 12+ Tahun Trading Live
- 10+ Tahun MQL5 / MQL4
- 3 Expert Advisor yang Diverifikasi Live
- Didirikan 2021
“Saya telah membangun hal-hal dengan kode sejak SMP. Saya trading sejak kuliah. Persimpangan kedua dunia itu — algoritma, pasar, dan teknologi yang menghubungkannya — adalah tempat saya menghabiskan lima belas tahun terakhir. FxRobotEasy adalah apa yang terjadi ketika Anda menolak untuk berhenti sampai hal yang Anda bayangkan benar-benar bekerja di akun broker live.”