How to Set Up MetaTrader 4/5 on a VPS: Complete Guide
Key Takeaways
- A VPS keeps your Expert Advisors running 24/7 β even when your home PC is off, your laptop is closed, or your internet drops.
- Setup takes about 15 minutes: connect via Remote Desktop, download MT4/MT5, log in, and enable your EAs. That's it.
- Choose a VPS located near your broker's server β Equinix NY4 for US brokers, Equinix LD4 for European brokers. This cuts order execution from 50β100ms to under 5ms.
- 4GB RAM is the minimum for one MT4/MT5 instance. Use 8GB+ if you're running multiple instances or accounts.
Why Run MetaTrader on a VPS?
MetaTrader 4 and MetaTrader 5 are the most widely used trading platforms in the forex and CFD markets. Millions of traders run Expert Advisors (EAs) β automated strategies that analyze price data and execute trades without manual input. The problem: an EA can only trade when MetaTrader is open and connected to your broker's server.
If you're running MetaTrader on your home PC, your EAs stop working the moment any of these happen: your internet drops, your PC restarts for a Windows update, you close your laptop, your power goes out, or your antivirus software decides to run a full scan and choke your CPU. For a forex trader running EAs across multiple currency pairs during the London and New York sessions, any of these interruptions can mean missed trades or β worse β open positions with no stop management.
A trading VPS eliminates all of these problems. Your MetaTrader instance runs on a professional server in a datacenter with redundant power, redundant internet, and enterprise-grade hardware. It runs whether your home PC is on or off.
What You Need Before Starting
- A VPS plan: Minimum 4GB RAM, 2 CPU cores, and NVMe storage. Windows Server 2022 is the recommended OS. FinTechVPS plans include Windows Server pre-installed and are co-located at Equinix datacenters.
- Your broker login credentials: You'll need your MT4/MT5 account number, password, and server name (your broker provides these when you open an account).
- Your EA files (.ex4/.ex5): If you use custom Expert Advisors, have the compiled files ready to transfer. If you use EAs from the MetaTrader Market, you can download them directly on the VPS.
- Remote Desktop client: Built into Windows (search "Remote Desktop Connection") and available as the Microsoft Remote Desktop app on Mac, iOS, and Android.
Step 1: Connect to Your VPS
After purchasing your VPS, you'll receive an IP address, username, and password. On Windows, open the Remote Desktop Connection app (press Windows+R, type mstsc, press Enter). Enter your VPS IP address and click Connect. Enter your credentials when prompted.
On Mac, download the free Microsoft Remote Desktop app from the App Store. Add a new PC, enter your IP, and connect. On mobile, use the RD Client app β useful for checking on your EAs from your phone.
Pro Tip: Save your VPS connection as a shortcut on your desktop. Right-click > Save As from the Remote Desktop window to create a .rdp file you can double-click to connect instantly.
Step 2: Download and Install MetaTrader
Once connected to your VPS, open the web browser (Edge is pre-installed on Windows Server 2022) and navigate to your broker's website. Download the MT4 or MT5 installer directly from your broker β don't use the generic MetaTrader download, as your broker's version is pre-configured with their server list.
Run the installer and follow the prompts. Installation typically takes 1β2 minutes. When it launches for the first time, you'll see the login window.
Running multiple accounts? You can install multiple instances of MetaTrader on the same VPS. During installation, change the install directory for each instance (e.g., C:MT4_Account1, C:MT4_Account2). Each instance connects to a different broker account independently.
Step 3: Log In to Your Broker Account
In the login window, enter:
- Login: Your account number (provided by your broker)
- Password: Your trading password (not the investor/read-only password)
- Server: Select your broker's live server from the dropdown. If it's not listed, your broker may require you to add it manually β check their documentation for the server address.
Once logged in, you should see your account balance, equity, and open positions in the Terminal window at the bottom. The connection status in the bottom-right corner should show a green bar with your ping time.
Step 4: Install Your Expert Advisors
If you have custom EA files, transfer them to your VPS. The easiest method: copy the .ex4 or .ex5 file on your local PC (Ctrl+C), then paste it directly into the Remote Desktop session (Ctrl+V) on the VPS desktop. Then move it to the correct directory:
- MT4:
C:[MT4 install folder]MQL4Experts - MT5:
C:[MT5 install folder]MQL5Experts
In MetaTrader, go to File > Open Data Folder if you're unsure of the exact path. After copying the files, right-click the "Expert Advisors" section in the Navigator panel and select "Refresh." Your EAs should now appear in the list.
Step 5: Enable Automated Trading
MetaTrader has a global switch for automated trading that must be enabled:
- Click the "AutoTrading" button in the toolbar (or press Alt+A). The button should show a green icon β red means EAs are disabled.
- Go to Tools > Options > Expert Advisors tab. Check "Allow automated trading" and "Allow DLL imports" (if your EA requires it). Uncheck "Disable automated trading when the account has been changed" β this prevents your EAs from stopping after a VPS restart.
- Drag your EA from the Navigator panel onto the chart of the instrument you want to trade. In the EA settings popup, go to the "Common" tab and ensure "Allow live trading" is checked. Configure your EA's input parameters on the "Inputs" tab.
- Click OK. You should see a smiley face icon in the upper-right corner of the chart β this confirms the EA is active and authorized to trade.
Important: "Allow DLL imports" gives your EA access to external libraries on your system. Only enable this for EAs you trust. Untrusted EAs with DLL access can execute arbitrary code on your VPS.
Step 6: Configure Auto-Start After Reboot
VPS reboots are rare but possible (e.g., critical Windows security patches). You want MetaTrader to restart automatically:
- Press Windows+R, type
shell:startup, press Enter. This opens the Windows startup folder. - Right-click your MetaTrader shortcut on the desktop, select "Copy." Right-click inside the startup folder and select "Paste Shortcut."
- Now MetaTrader will launch automatically whenever the VPS restarts. Combined with the "Don't disable automated trading" setting from Step 5, your EAs will resume automatically.
Optimizing MetaTrader Performance on Your VPS
A few adjustments maximize the performance of MetaTrader on your VPS:
- Reduce chart history: Go to Tools > Options > Charts. Set "Max bars in chart" to 10,000β50,000 instead of "Unlimited." Excessive history consumes RAM for no benefit during live trading.
- Disable unnecessary charts: Only keep open the charts with active EAs. Every open chart consumes CPU and memory.
- Disable sounds: Tools > Options > Events. Uncheck "Enable." Sounds are pointless on a VPS since nobody is listening.
- Disable news: Tools > Options > Server. Uncheck "Enable news." The MetaTrader news feed loads content you don't need on an automated VPS.
- Set chart mode to "Line" if using EAs only: Candlestick charts are heavier to render than line charts. Since your EA reads price data mathematically (not visually), switching to line charts reduces GPU/CPU usage.
How to Check on Your VPS from Your Phone
You don't need to sit at your computer to monitor your EAs. The MetaTrader mobile app (available for iOS and Android) lets you log in to the same account and see your open positions, order history, and account balance in real time. You can also close positions manually from your phone if needed. The mobile app does not run your EAs β it's a monitoring and manual trading tool only. Your EAs continue running on the VPS regardless of whether the mobile app is connected.
Alternatively, use the Microsoft Remote Desktop app on your phone to connect directly to your VPS and see your full MetaTrader desktop. For a detailed guide on mobile access, see our mobile VPS access guide β the remote desktop steps apply to MetaTrader as well.
Choosing the Right VPS Location for MetaTrader
The optimal VPS location depends on where your broker's trading server is physically located:
| Broker Location | Ideal VPS Location | Common Brokers |
|---|---|---|
| New York (Equinix NY4) | Equinix NY4/NY5 | OANDA, FOREX.com, Interactive Brokers |
| London (Equinix LD4) | Equinix LD4 | IC Markets, Pepperstone, FXCM |
| Tokyo (Equinix TY3) | Equinix TY3 | OANDA Japan, SBI FX |
| Chicago (Equinix CH4) | Equinix CH4 | CME-connected brokers (for futures via MT5) |
Not sure where your broker's server is? In MetaTrader, check your ping time (shown in the bottom-right corner). Then contact your broker's support and ask which datacenter your account's trading server is in. Our VPS selection guide covers this in more detail.
Get Your EAs Running on Professional Infrastructure
FinTechVPS provides co-located servers with dedicated CPU cores, NVMe storage, and 10Gbps connectivity β purpose-built for trading platforms like MetaTrader. Windows Server 2022 comes pre-installed, so you can have your EAs running within 15 minutes of signing up. View our plans and deploy today.
Sources & Further Reading
- MetaTrader 4 Official Site β platform download, documentation, and MQL4 reference
- MetaTrader 5 Official Site β platform download, documentation, and MQL5 reference
- MQL5 Documentation β official reference for Expert Advisor development
Ready to trade on the fastest VPS?
Co-located at Equinix NY4. Deploy in minutes. No contracts.
View Plans & Pricing