Running MetaTrader and trading terminals on a Windows VPS 24/7

You rely on MetaTrader 4 or MetaTrader 5 to execute trades. Your broker accepts orders, but your local internet connection drops at 2 PM every day. Or your power goes out twice a week. That is the exact moment a running terminal on a VPS becomes your backup, or your primary infrastructure. Running MetaTrader and trading terminals on a Windows VPS 24/7 means your expert advisors (EAs), scripts, and manual positions keep working whether you are asleep, in a meeting, or sitting through a brownout.
交易终端长期在线,关键是稳定运行与合适的资源配置。
Trading terminals stay online for weeks, so stability and right-sized resources are what count.
Key takeaways:
- A MetaTrader VPS does not need a powerful CPU, the bottleneck is RAM for multiple opened charts and EAs running simultaneously.
- Latency to the broker depends on network routing. A Vietnam-based VPS gives domestic traders sub-10 ms to local brokers and reduces packet loss on the international leg for foreign brokers.
- Snapshot-based backup before any EA update saves your configuration in 60 seconds. No reinstallation required if something breaks.
- Monthly billing and no long-term contract let you test one VPS tier before scaling to a larger plan.
Prerequisites
- A Windows VPS with Administrator access. You can reinstall the OS to Windows Server 2019, 2022, or 2025 from the control panel or request a pre-installed Windows image.
- Remote Desktop Protocol (RDP) client installed on your local machine, the built-in Remote Desktop Connection on Windows or
Microsoft Remote Desktopon macOS / Linux. - Your MetaTrader broker login credentials (server name, login number, investor password or trader password).
- A stable local internet connection to set up the VPS. After setup, the VPS runs independently.
Why run MetaTrader on a Windows VPS
A Windows Server instance sitting inside a Tier 3 datacenter, such as those operated by Viettel IDC or VNPT IDC (two of the largest telecom operators in Vietnam, providing backbone infrastructure and colocation services), has redundant power feeds, backup generators, and multiple upstream network links. Your home connection does not. Three common failure scenarios and how a VPS solves them:
- Power outage: your desktop shuts down. The VPS stays powered by the datacenter UPS and generators.
- ISP routing change: your local ISP reroutes traffic, latency spikes to 200 ms. The VPS maintains its BGP-optimized path to the broker.
- Application crash: MetaTrader freezes on your PC at midnight. You RDP into the VPS and restart the terminal without driving back to the office.
The second reason is execution consistency. An EA that scalp-trades or reacts to 15-second chart changes cannot afford a 10-second disconnection.Domestic bandwidth is 100 Mbps on a 1 Gbps port, with unlimited traffic and no data cap. Your broker sees the same source IP every session, no IP rotation, no re-authentication overhead.
Step 1, Choosing the right VPS plan for MetaTrader
MetaTrader 4 and MetaTrader 5 are lightweight by modern standards. The installer is under 100 MB, and a single chart with one indicator uses roughly 60-120 MB of RAM. The problem starts when you open multiple terminal instances, attach EAs to 20 currency pairs, and run a tick-data recorder simultaneously.
Here is the resource profile per expected workload:
| Workload | vCPU | RAM | Storage (NVMe) | Recommended plan |
|---|---|---|---|---|
| 1-2 terminals, manual trading, no EAs | 1 | 2 GB | 20 GB | VNLite (1 vCPU / 2 GB / 20 GB NVMe) |
| 2-3 terminals, 1-3 EAs, 10-15 charts | 2 | 4 GB | 40-60 GB | VNx1 (2 vCPU / 4 GB / 40 GB NVMe) |
| 4+ terminals, 6+ EAs, 30+ charts, tick data logging | 4 | 8 GB | 80 GB | VNx2 (4 vCPU / 8 GB / 80 GB NVMe) |
| Heavy automation, multiple broker connections, custom Python/MT5 scripts | 8 | 16 GB | 100 GB | VNx8 (8 vCPU / 16 GB / 100 GB NVMe) |
The VNLite plan (approx $8.50/month, equivalent to around 189,000 VND) is enough to test. Upgrade only when your EA's strategy uses more memory than available, you will see a Memory counter in the Strategy Tester or a System.OutOfMemoryException in the Experts tab. My personal rule: keep at least 30% of RAM free after loading all terminals, so a 2-terminal setup on 2 GB usually needs 4 GB.
Step 2, Preparing the Windows VPS for MetaTrader
After placing the order (monthly billing, no long-term contract), you will receive an email with the Administrator password and the RDP IP address. Connect via Remote Desktop Client.
2.1, Disable Windows Server Manager auto-start (optional, but saves 200 MB of RAM)
# Open Server Manager -> Manage -> Server Manager Properties
# Check "Do not start Server Manager automatically at logon"
# Reboot or log off.
Server Manager consumes memory you want for MetaTrader. On a 2 GB RAM VPS, every megabyte counts.
2.2, Install Windows updates and reboot
# Open Windows Update from the Start menu
# Check for updates, install all critical/security updates
# Restart the VPS
A patched server reduces the risk of SMB-based or RDP-based exploits. You can also enable firewall rules under Windows Defender Firewall: allow incoming RDP only from your home IP or a VPN range.
2.3, Download and install MetaTrader
Log in to your broker’s website and download the MetaTrader installer (not the mobile version). On the VPS, run the installer as Administrator. During installation:
- Choose the path
C:\Program Files\MetaTrader 5(or 4). - Install under a single user, no need for all-users installation.
- After installation, launch the terminal, enter your server name and login credentials, and let it sync the charts.
Verify: open the Journal tab. You should see Login successful with the server time and ping value in milliseconds. A typical Vietnam-to-local-broker ping is under 5 ms. To a foreign broker, 150-250 ms is expected depending on the route.
Step 3, System-level optimizations for 24/7 running
Once the terminal logs in and starts trading, you want it to survive for weeks without a manual restart. These settings prevent common failures.
3.1, Disable Windows Update automatic reboot
# Open gpedit.msc (Local Group Policy Editor)
# Computer Configuration -> Administrative Templates -> Windows Components -> Windows Update
# Enable "No auto-restart with logged on users for scheduled automatic updates installations"
# Apply and restart the VPS
Without this, Windows Update can reboot the server while your EA has an open position. You configure it once and never worry about surprise restarts.
2.2, Set the power plan to High Performance
# Open Control Panel -> Power Options
# Select "High Performance" (if hidden, click "Show additional plans")
# Disable "Turn off the display" and "Put the computer to sleep", both should be "Never".
The default Balanced plan reduces CPU frequency during idle periods. MetaTrader is not CPU-intensive, but an EA that places an order during a frequency ramp-up might see a micro-lag of 10-20 ms. High Performance keeps the clock steady.
3.3, Disable screen saver and lock-screen timeout
# Right-click desktop -> Personalize -> Lock screen -> Screen timeout settings
# Set "Screen" and "Sleep" to "Never"
# Set "Screen saver" to "None".
When the screen locks, MetaTrader continues to run (it is a background process). But the RDP session becomes disconnected if the lock-screen timeout expires. Keep the session open.
Verify all three: Reboot the VPS, log in via RDP, open MetaTrader, and leave it for 24 hours. Remote back in. The terminal should show continuous uptime on the Journal tab, no disconnection messages.
Step 4, Setting up backups and snapshots
Your EA settings, custom indicators, and chart templates are stored inside C:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\. If the VPS disk fails (rare, but possible), you lose that configuration. Use the snapshot feature built into the VPS control panel.
4.1, Take a snapshot once per week
From the client area under your VPS management page, click Snapshots & Backups and select Create Snapshot. The process takes 30-60 seconds and captures the entire disk state. You can restore from this snapshot in case of misconfiguration or EA corruption.
4.2, Manual export of MetaTrader settings
# In MetaTrader, go to File -> Save As Template for each chart setup
# For EAs: right-click the EA in the Navigator -> Export
# For indicators: right-click -> Export
# Save all exported files to a subfolder on the desktop, then copy them to another location (Google Drive, Dropbox, or a second VPS).
If you ever migrate to a different Windows VPS, importing these exports takes five minutes instead of reconfiguring everything from memory.
Troubleshooting common MetaTrader-on-VPS issues
Issue 1, Terminal disconnects for a few seconds every 10-20 minutes
This is usually the broker's server performing a TCP connection timeout or your VPS running out of RAM causing Windows to halt non-critical processes. Check the Task Manager -> Performance -> Memory. If it shows 90%+ usage, upgrade the plan. If memory is fine, contact your broker, they may have a maintenance schedule or a connection limit per session.
Issue 2, MetaTrader freezes during high-volume tick activity
MT4 (32-bit) maxes out at 4 GB of RAM per process. If you run multiple instances, each must stay under 3.5 GB to avoid crashing. The fix: run MT5 (64-bit) or limit the length of your chart history to 2048 bars (Tools -> Options -> Charts).
Issue 3, EA "Enable" checkbox unchecks itself after restart
On the VPS, launch MetaTrader, hover over Tools -> Options -> Expert Advisors, and verify that Allow Automated Trading is checked. Also check Tools -> Global Variables, Expert Advisors that need DLL imports. Without this, your EA won't run after a reboot. Save the .set file after configuration.
Network considerations: why a Vietnam-based VPS matters
If your broker has matching-engine servers located in Hong Kong, Singapore, or Tokyo, the shortest path from mainland Southeast Asia goes through one of the Vietnamese internet exchanges operated by Viettel, VNPT, FPT Telecom, or CMC Telecom (the four largest connectivity providers in Vietnam that operate their own international submarine cable capacity). A Windows VPS in Vietnam uses a dedicated IPv4 from the local pool, routes domestic traffic through these providers without touching an international gateway, and keeps your latency stable for Vietnamese-side business.
Crucially: if your trading counterparty or clients are in Vietnam, a local VPS with a domestic IP avoids cross-border routing entirely for the local leg. If they are in Europe or the US, the outbound path still crosses international submarine cables, and the round-trip time depends on your broker's own infrastructure, do not expect sub-30 ms ping to London from a Vietnam VPS.
FAQ
Can I run MetaTrader on a Linux VPS?
MetaTrader 4 and 5 are Windows-native applications. They do not run natively on Linux. You can use Wine (a compatibility layer) but it introduces stability risks: some EAs crash, charts fail to render, and updates break the emulation. A native Windows VPS is the recommended approach.
How much RAM does one MetaTrader terminal consume?
A freshly started MT4 terminal with one EURUSD chart uses about 80-100 MB. Adding 20 indicators per chart pushes it to 300-400 MB. Running three terminals with 15 charts each can reach 1.5-2 GB of RAM. Always allocate the high end of your workload.
Does the VPS need a static public IP for MetaTrader?
Yes. Every VPS comes with one dedicated IPv4 from the Vietnam range. A static IP is required for your broker's server to whitelist your connection (if applicable) and to avoid firewall block after IP changes.
Can I run multiple broker terminals on the same VPS?
Yes. Install each broker's MetaTrader build into a separate folder (e.g., C:\Program Files\BrokerA_MT5 and C:\Program Files\BrokerB_MT5) or use the portable mode. Each runs as a separate process. Monitor total RAM consumption and upgrade the plan if needed.
How do I keep the VPS running overnight with no RDP session?
Log in via RDP, launch MetaTrader, and minimize the window, do not close it. You can also set Windows to not disconnect idle RDP sessions by opening gpedit.msc -> Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Session Time Limits -> Set time limit for active but idle Remote Desktop Services sessions to Never.
What happens if my EA places a trade while the VPS is updating?
If Windows Update is set to auto-restart, an EA can lose connectivity in the middle of an order placement. Follow Step 3.1 to disable automatic reboot. If you must install a critical security update, log in during a closed-market hour (weekend for forex) and manually reboot.
Related articles
- Secure RDP configuration for Windows VPS
- Rent RDP VPS for Chrome access and software applications
- Hardening SSH on a new VPS, keys, ports, fail2ban, and CrowdSec
- Configure swap and optimize memory on a low-ram VPS
在Windows VPS上长期运行交易终端
交易终端需要长期在线,关键在稳定运行和合适的资源配置。文中说明内存与CPU的估算方法以及断线恢复的处理。本文不提供任何投资建议。


