Installing MT4 on a VPS is the same job as installing it on a home PC, plus a handful of steps that decide whether your Expert Advisors are still trading at 3 a.m. after a Windows update. This guide covers the full MT4 VPS setup: connecting, installing your broker’s build, moving your EAs across, making the terminal start on its own, and how to run multiple MT4 terminals on one VPS without them getting in each other’s way.
Menu labels below match current MT4 builds. Brokers ship their own branded builds, so a label can differ slightly from what you see. When in doubt, check the official MetaTrader 4 help.
Before you start
- Your trading account number, trading password and server name. The broker’s welcome email has all three.
- Your EA and indicator files (
.ex4or.mq4), any DLLs they need, and your.setpreset files. - The VPS IP address, username and password from your private order page.
Step 1: Pick a plan and a location near your broker
Most retail brokers run their MT4 trade servers in a few large data centers, and our servers sit near the main ones: London (Equinix LD4 / LD5), New York (Equinix NY4 / NY5), Frankfurt (Equinix FR2). Ask your broker’s support which data center hosts the server for your account type, then pick the closest of our server locations. Being in the same city usually means a ping of a few milliseconds or less.
For size: Reserve about 2 GB for Windows, then 0.5–1 GB per MT4 terminal or 1–1.5 GB per MT5 terminal. Our FX Lite plan (4 GB RAM) is sized for about 3 terminals, FX Pro (8 GB) for about 7. The MT4 VPS page lists every plan with its terminal count.
Step 2: Connect with Remote Desktop
From a Windows PC
- Press Win + R, type
mstscand press Enter. - Enter the VPS IP address. Click Show Options and enter the username (often
Administrator). - Click Connect, enter the password, and accept the certificate warning on the first connection. New servers use a self-signed certificate, so the warning is expected. Check that the IP is the one on your order page.
From a Mac
Install Microsoft’s Windows App from the Mac App Store. It replaced the older Microsoft Remote Desktop app. Add a new PC, enter the IP address and your credentials, then double-click the PC to connect.
Once you are in, change the default password. In a Remote Desktop session, Ctrl + Alt + End opens the security screen with the option to change it.
Step 3: Download MT4 from your broker
Get the installer from your broker’s website or client area. The broker’s build comes with its server list already loaded, so you only have to pick your server from a list when you log in.
Do not download MT4 from download portals, file-sharing links or sites offering “free EAs” bundled with a terminal. A modified terminal sees your trading password and every order you send. If your broker no longer offers MT4, ask their support for the right link rather than searching for one.
You can download straight from the browser on the VPS, or download on your own computer and copy the file across (see Step 5).
Step 4: Install and log in
- Run the installer. If you plan to run more than one terminal, click Settings before Next and set the installation folder now (see Step 8).
- When the terminal opens, close any “open a demo account” dialog.
- Go to File → Login to Trade Account. Enter your account number and trading password, pick your server, and tick the option to save the password so the terminal can reconnect after a restart.
- Look at the bottom-right corner of the terminal. A live connection shows traffic counters. “No connection” or “Invalid account” means a wrong server or password.
Use the trading password, not the investor password. The investor password gives read-only access, and an EA logged in with it cannot place trades.
Step 5: Copy your EAs and indicators
In MT4, go to File → Open Data Folder. Explorer opens the terminal’s data folder. By default this is not
the installation folder but a folder under %APPDATA%\MetaQuotes\Terminal\ with a long ID as its name.
Always use the menu to find it.
- Expert Advisors go in
MQL4\Experts. - Custom indicators go in
MQL4\Indicators. - Scripts go in
MQL4\Scripts, and DLLs or libraries an EA depends on go inMQL4\Libraries.
To get files onto the VPS, copy them on your PC and paste them into the Explorer window on the VPS. This works over Remote Desktop from Windows when clipboard sharing is on. From a Mac, share a local folder with the session in the connection settings and copy from there.
Back in MT4, right-click Expert Advisors in the Navigator and choose Refresh, or restart the
terminal. Your .set files can live anywhere: load them from the EA’s Inputs tab with the
Load button.
If your EA calls a web service, for licence checks or news filters for example, add its address under Tools → Options → Expert Advisors → Allow WebRequest for listed URL.
Step 6: Turn on automated trading
- In Tools → Options → Expert Advisors, tick Allow automated trading. Tick Allow DLL imports only if the EA needs it and you trust where it came from.
- Drag the EA onto a chart. In the Common tab, tick Allow live trading, then set your inputs.
- Click the AutoTrading button in the toolbar so it turns green. MT5 calls the same switch Algo Trading.
- Check the EA icon in the top-right corner of the chart. Hover over it to confirm live trading is allowed.
Open the Terminal window (Ctrl + T) and read the Experts and Journal tabs. Most problems, such as a missing DLL, a wrong symbol suffix or trading disabled, show up there within seconds.
Step 7: Make MT4 start with Windows
Press Win + R, type shell:startup and press Enter. This opens the Startup folder
for your Windows user. In another Explorer window, go to the MT4 installation folder, right-click
terminal.exe, create a shortcut, and move the shortcut into the Startup folder.
MT4 reopens with the charts and EAs it had when it was last closed normally. After setup, save your layout with File → Profiles → Save As so you can restore it if a crash leaves the terminal in an odd state.
One catch: the Startup folder runs when your user signs in. After a reboot, Windows waits at the sign-in screen until someone connects, so your terminals stay closed. You can fix this by enabling automatic sign-in for the account, for example with Microsoft’s Sysinternals Autologon tool. Weigh the trade-off: the server then signs in without a password prompt. Our Windows plans include automatic restart and terminal auto-start, so check how your server is already set up before adding your own.
Step 8: Run multiple MT4 terminals on one VPS
One MT4 terminal holds one live connection to one account at a time. To run several accounts at once, install one terminal per account, each in its own folder.
- Run your broker’s installer again.
- Click Settings and change the installation folder. Also change the program group name, so the Start menu shortcuts don’t overwrite each other.
- Repeat for each account. A naming scheme helps when you are looking at five identical windows:
C:\MT4\BrokerA-Live-1
C:\MT4\BrokerA-Live-2
C:\MT4\BrokerB-Demo
Install outside C:\Program Files. A plain folder such as C:\MT4\ lets each terminal write
to its own directory without admin rights.
Portable mode
By default, each terminal keeps its data (MQL4 files, profiles, logs) in the hidden %APPDATA% folder.
Started with the /portable switch, the terminal uses its installation folder as its data folder
instead. Everything for one account then lives in one place, which makes backups and troubleshooting much easier.
Add the switch to the end of the shortcut target, and use that shortcut in the Startup folder:
"C:\MT4\BrokerA-Live-1\terminal.exe" /portable
Decide on portable mode before you configure a terminal. If you switch an existing terminal over, it reads its data
from the installation folder from then on, so copy your MQL4 folder and profiles across first.
Keep memory in check
Each extra terminal costs RAM. Lower Max bars in history and Max bars in chart under
Tools → Options → Charts, close charts no EA needs, and hide unused symbols in Market Watch. Task Manager’s
Details tab shows the memory each terminal.exe uses. If the total gets close to your plan’s
RAM, move up a plan before Windows starts swapping.
Step 9: Check your ping to the broker
Click the connection indicator in the bottom-right corner of MT4. The menu lists your broker’s access servers with a ping figure next to each. Rescan servers measures them again. If your broker has several access points, you can switch to the fastest one from the same menu.
Compare the figure with what you get at home. If it is higher than you expected, your broker’s server may be in a different city than you thought. Ask them, and consider another location. How much a few milliseconds matter depends on the strategy. Our guide on how to choose a forex VPS explains when latency is worth paying for and when it isn’t.
Step 10: Keep Windows updates out of trading hours
Windows updates restart the server, and a restart in the middle of the London session closes every terminal. Set active hours in Windows Update settings to cover the hours you trade, or schedule installs with Group Policy (Configure Automatic Updates) for the weekend, when the forex market is closed. Some traders prefer to install updates by hand every Saturday.
After any restart, reconnect and check that each terminal is logged in, AutoTrading is on and the EAs show as active.
Step 11: Disconnect, don’t sign out
When you are done, close the Remote Desktop window with the X, or use Disconnect from the Start menu. Your session keeps running in the background with every terminal open.
Sign out ends the session and closes all programs, MT4 included. Shut down does what it says. Both stop your EAs until someone logs in again.
Quick troubleshooting
- EA attached but not trading: AutoTrading is off, Allow live trading is unticked, or the Experts tab shows an error.
- Terminals closed after a reboot: nobody signed in. See Step 7.
- “No connection” after a move: wrong server selected. Use Rescan servers or pick the server again in the login dialog.
- Server feels slow: too many terminals or charts for the RAM. Check Task Manager, then trim or upgrade.
A VPS keeps your terminal online and close to your broker. It does not make an EA profitable. Trading forex and CFDs carries a high risk of losing money, and you should only trade with money you can afford to lose.
If you are still comparing options, our forex VPS page explains how our Windows servers are set up for MetaTrader, from the image to the network.