VDS Setup and Optimization for MT4 and MT5

VDS Setup and Optimization for MT4 and MT5

Run MetaTrader 4 and MT5 terminals without interruption on a Windows VDS. Resource planning per terminal, automatic startup, visual effect tuning and security settings.

White Bilişim

VDS Setup and Optimization for MT4 and MT5

An expert advisor (EA) only runs while the terminal is open. The moment your computer shuts down, goes to sleep or loses its internet connection, the EA stops with it. This guide covers running MetaTrader terminals continuously on a Windows VDS managed over remote desktop, and tuning that server for terminal hosting.

Resource Planning per Terminal

The most common mistake is underestimating how many terminals you will end up running:

SetupMemory neededRecommended package
1-3 terminals3-4 GB4 GB RAM
4-8 terminals5-6 GB6 GB RAM
9-15 terminals7-8 GB8 GB RAM
15+ terminals, heavy EAs10 GB+12 GB and above

💡 A practical rule: budget 400-500 MB per terminal, then add 2 GB on top for Windows Server itself. MT5 asks for slightly more than MT4.

1. Connecting to the Server

You connect with the Remote Desktop Connection client built into Windows (mstsc). Microsoft Remote Desktop apps are available for macOS, iOS and Android too, so you can check on your terminals from your phone.

Things to do after the first connection:

  • Change the administrator password
  • Finish the Windows updates
  • Consider setting the time zone to match your broker’s server time

2. Installing MetaTrader

Install the terminal from your broker’s own download link, because broker specific server lists and settings come preconfigured. If you use more than one account, install each terminal in its own folder:

C:\Terminals\Broker1_Account1\
C:\Terminals\Broker1_Account2\
C:\Terminals\Broker2_Account1\

Installing separately rather than copying the same installation keeps settings and logs from getting mixed up.

3. Starting Terminals Automatically

The terminals need to come back up on their own after a server restart. Using Task Scheduler:

  1. Choose the At log on trigger
  2. Point the action at the terminal .exe path
  3. Tick “Run with highest privileges”

So that the terminal loads its charts and EAs automatically at startup, save your profile before closing it; MetaTrader restores the last profile on launch.

4. Reduce the Visual Load

When you work over remote desktop, visual effects cost both bandwidth and CPU:

  • System Properties → Advanced → Performance: choose “Adjust for best performance”
  • Turn off chart animations and unnecessary indicators in MetaTrader
  • Rather than keeping 15 charts open at once, leave open only the charts your EAs run on

💡 An EA only needs its chart to be open, not visible on screen. Closing the remote desktop session does not stop the EA.

5. History Data and Disk Usage

MetaTrader keeps tick history on disk and that folder grows over time. If you run backtests, it can reach several gigabytes. Clean it out periodically:

C:\Terminals\<terminal>\Bases\
C:\Terminals\<terminal>\Tester\

6. Security: Do Not Skip This

A server with an open remote desktop port is under constant scanning. Do at least these three things:

Change the remote desktop port:

Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name PortNumber -Value 53389
New-NetFirewallRule -DisplayName "RDP-Custom" -Direction Inbound -Protocol TCP -LocalPort 53389 -Action Allow

Restrict access to your own IP (if you have a static IP):

Set-NetFirewallRule -DisplayName "RDP-Custom" -RemoteAddress "88.x.x.x"

Use a strong password and rename the default Administrator account.

⚠️ After changing the port, make sure the new firewall rule has been added before you restart the server; otherwise you will lock yourself out.

7. The Latency Question

How long an order takes to reach the broker affects the outcome of scalping strategies. A server in the Turkey location gives low latency for Turkish brokers and local connections. If your broker’s server sits in London or New York and your strategy needs millisecond precision, it is worth discussing the location choice up front.

Conclusion

Moving MetaTrader terminals onto a VDS is the most practical way to keep EAs running without interruption. Three settings matter most: enough memory per terminal, automatic startup, and remote desktop security.

👉 For a package that matches your terminal count, see our Forex VDS rental page, and for Windows server security take a look at our remote desktop security guide.