A VPS is a Windows machine in a data centre that runs your MetaTrader while your own PC is switched off. Why that matters for EAs is covered in VPS for Expert Advisors. This guide is about the setup: from the ordered server to a terminal that keeps running after every reboot.
You need: a Windows VPS (or the login of a broker VPS), your MT5 login from the broker and about 45 minutes. The drawings show the English Windows interface that most VPS come with.
Chapters
- 0:031. Pick a location next to the broker’s server
- 0:112. Size it for 1–3 terminals
- 0:183. Connect via Remote Desktop
- 0:264. Prepare Windows
- 0:335. Install MT5 on the VPS
- 0:416. Start MT5 automatically after a reboot
- 0:487. Disconnect, don’t sign out
- 0:568. Check the ping in MT5
- 1:039. Run a short weekly check
The guide in 9 steps
Step 1: Pick a location next to the broker’s server
Choose a Windows VPS in your broker’s data centre, not near where you live. Most forex brokers run their trade servers in London (Equinix LD4) or New York (NY4). The broker lists the location in the client area or tells you on request.
Open drawing full size Step 2: Size it for 1–3 terminals
One terminal with a few charts runs on 1 vCPU and 2 GB RAM. For 2–3 terminals take 2 vCPU and 4 GB RAM, otherwise it gets tight during Windows updates or busy markets. What matters is guaranteed, not shared, CPU and RAM.
Open drawing full size Step 3: Connect via Remote Desktop
After ordering you receive the IP address, user name (usually
Administrator) and password by email. On Windows open Remote Desktop Connection (mstsc), enter the IP and click Connect. On a Mac use Microsoft’s free Windows App and add a PC with that IP.Open drawing full size Step 4: Prepare Windows
First change the password (inside the remote session
Ctrl+Alt+End→ Change a password). Set the time zone, set screen and sleep to Never in the power settings, and set active hours in Windows Update to your trading hours.Open drawing full size Step 5: Install MT5 on the VPS
Download your broker’s MT5 installer on the VPS itself and install it into its own folder, for example
C:\Trading\Broker-MT5-Live. If you already run a portable terminal locally, copy the whole folder across via the clipboard.Open drawing full size Step 6: Start MT5 automatically after a reboot
Press
Win+R, typeshell:startupand create a shortcut toterminal64.exein the Startup folder that opens. For a portable install add/portableafter the closing quote in the Target field. After a reboot, log in once via RDP and MT5 starts with your account and EAs.Open drawing full size Step 7: Disconnect, don’t sign out
When you are done, close the Remote Desktop window with the X at the top. That only disconnects the session and MT5 keeps running. Sign out in the Start menu ends every program, including your EAs.
Open drawing full size Step 8: Check the ping in MT5
Bottom right in the status bar MT5 shows the connection and the ping in milliseconds. Click it to open the list of access points; Rescan servers makes MT5 look for the fastest one. If the value is far above what the provider states for your location, the data centre is wrong.
Open drawing full size Step 9: Run a short weekly check
Once a week, ideally at the weekend: connect via RDP, check the ping and the Algo Trading button, scan the Experts and Journal tabs for errors, install Windows updates, reboot and confirm that autostart worked. Then disconnect again.
Open drawing full size
Alternatives to your own VPS
Free VPS from the broker: many brokers provide a VPS above a minimum balance or trading volume, usually already in the right data centre. Setting it up works exactly as above. Which brokers offer it on which terms is listed in Brokers with a free VPS.
MetaQuotes virtual hosting: in MT5 you can rent a virtual server from the platform vendor via the Navigator (right-click the account → Register a Virtual Server). The terminal transfers charts, EAs and settings by migration. There is no desktop though, one account per server, no DLL calls, and every change in the local terminal has to be migrated again. Convenient for a single simple EA, not for several terminals or tools that need DLLs.
Your own VPS provider: full control over Windows, as many terminals as you like, free choice of location. Providers are compared in Best forex VPS. These three have locations in LD4 and/or NY4:
- At Hyonix Adlow cost, NY4 location available
- At ForexVPS.net AdLondon and New York locations, forex focus
- At NYCServers Admanaged support, New York and London
Partner links: if you order through them, we receive a commission. The steps above work with any Windows VPS.
Common pitfalls
- EA not running after a reboot: the startup shortcut is missing or points to another terminal. Check the Startup folder and reboot once as a test.
- High ping despite a VPS: wrong data centre, or MT5 is connected to a distant access point. Run Rescan servers in the status bar.
- Terminal freezes: not enough RAM for the number of charts and terminals. Close charts you don't need or move to a larger plan.
- Windows reboots mid-week: active hours in Windows Update not set. Install updates yourself at the weekend.
Setting up the terminal itself and starting the EA is covered in Install MetaTrader 5 and run an EA. If you run several terminals or plan to move later, use portable mode.