Flat illustration of three connected numbered steps, representing the process of setting up an EA on a VPS

How to Set Up an EA on a VPS: A Step-by-Step Guide

August 11, 20266 min read

Setting up an Expert Advisor on a VPS is the first real infrastructure step most automated traders take. Done correctly, it removes power cuts, home internet dropouts, and Windows Update from your list of trading risks. Done carelessly, it introduces new problems: wrong data centre, broken permissions, or an EA that appears attached but never actually places a trade. This guide walks through the process end to end so you can complete the setup once and move on, with checks at each stage to confirm the EA is actually running before real capital is involved.

Before You Start: What You Need

Gather the following before opening any remote connection:

  • Login credentials for your broker (server name, account number, password).

  • The EA file itself (.ex4 for MT4 or .ex5 for MT5), plus any DLL or set files it depends on.

  • Your VPS credentials (IP address, username, password) and the region confirmed to match your broker.

  • A recent backup of any set files or optimisation results you want to preserve.

If you have not chosen a VPS yet, matching data centre to broker matters more than raw specification. Our guide on optimizing VPS latency for MetaTrader explains how to pick a region before you subscribe.

Step 1: Connect to Your VPS

On Windows, open Remote Desktop Connection, enter the VPS IP, and log in with the credentials your provider issued. On macOS, use Microsoft Remote Desktop from the App Store. On Linux, use a client such as Remmina.

On first login:

  • Set the Windows time zone to match your broker’s server time if the EA depends on session filters.

  • Rename the machine only if the provider allows it.

  • Change the RDP password from the initial one to something strong and unique.

  • Enable two-factor authentication on the provider control panel if offered.

Step 2: Install MetaTrader

Download MetaTrader 4 or MetaTrader 5 directly from your broker’s website, not from a third-party download portal. Installing from the broker installer ensures the terminal is pre-configured to connect to that broker’s specific trade servers.

  1. Run the installer as administrator.

  2. Choose an install path outside Program Files if the EA needs to write to its own folder (some EAs do).

  3. Launch MetaTrader and log in with your live or demo credentials.

  4. Confirm the connection status in the bottom-right corner shows a green signal and stable numbers.

Step 3: Transfer the EA to the VPS

There are three reliable ways to move the EA file:

  • RDP clipboard copy-paste for a single small file. Enable local resource sharing in the RDP client settings.

  • Cloud storage link (a private OneDrive or Google Drive link) opened inside the VPS browser.

  • Broker’s own MetaTrader Market if the EA was purchased there and is licensed to the same MQL5 account.

Once on the VPS, place the file in MetaTrader’s Experts folder. Open the terminal, click File > Open Data Folder, then navigate to MQL4/Experts (MT4) or MQL5/Experts (MT5) and drop the file in. Restart the terminal so the new EA appears in the Navigator panel.

Step 4: Attach the EA and Verify It Is Actually Running

Drag the EA from the Navigator onto the chart of the instrument and timeframe it is designed for. In the dialog:

  • Common tab: enable Allow algo trading (MT4) or Allow automated trading (MT5).

  • Inputs tab: set the parameters exactly as documented.

  • Dependencies tab (MT5): confirm any required indicators are present.

Confirm the smiley face is present in the top-right corner of the chart and the AutoTrading button in the toolbar is enabled. The single most common setup mistake is a green smiley face with AutoTrading globally disabled, which silently prevents any orders.

A correctly attached EA shows a smiling face on the chart, the AutoTrading button enabled, and journal entries confirming initialisation.

Step 5: Test on Demo Before Live

Even if you plan to run live, keep the EA on demo for at least a few days on the same VPS. This stage is about confirming the setup works mechanically, not about judging the strategy — how we test Expert Advisors covers the months of forward testing that question actually needs. Watch:

  • Whether trades open at the expected times.

  • Whether stop losses and take profits are placed as intended.

  • How the Journal tab reports execution latency.

  • Whether any error codes appear (invalid stops, trade context busy, and so on).

Step 6: Configure the VPS to Survive Restarts

A VPS may reboot for maintenance, updates, or provider incidents. Configure it so MetaTrader restarts automatically:

  • Enable auto-login on the Windows user account.

  • Add a shortcut to MetaTrader in the Windows Startup folder.

  • Enable Save profile on exit in MetaTrader so open charts and EAs restore.

  • Confirm any dependencies (DLLs) are in place after reboot.

Our article on what different VPS uptime figures really mean for traders explains why planning for reboots matters even at 99.99% SLA.

Common Pitfalls

Pitfall

Symptom

Fix

AutoTrading disabled

Smiley face green but no trades

Click AutoTrading button in toolbar

Wrong chart/timeframe

EA logs symbol not supported

Attach to instrument the EA was designed for

Missing set file

Default parameters used

Load the correct set file in the Inputs tab

Firewall blocking broker

Cannot log in

Allow terminal.exe through Windows firewall

Terminal not on startup

EA gone after reboot

Add to Startup folder and enable auto-login

MetaQuotes documents the platform-side prerequisites for automated hosting in the official virtual hosting reference, which is worth reading if you plan to use the platform’s built-in migration.

FAQ

Do I need to keep my home PC on after moving the EA to a VPS?
No. Once the VPS is running the EA, you can shut down your home PC entirely.

Can I access the VPS from a phone?
Yes. Microsoft Remote Desktop is available on iOS and Android for quick monitoring.

How often should I log in to check the EA?
At least once a day for the first two weeks, then align to the EA’s trade frequency.

Will an EA slow down other terminals on the same VPS?
A well-written EA is light. Heavy custom indicators can slow the whole terminal if you run several charts.

Do I need to install MetaTrader again if I change VPS provider?
Yes, because the terminal is installed on the machine itself. Check your EA's licence terms before you migrate: commercial EAs are usually tied to an MQL5 account or to specific trading account numbers, often with a limited number of activations, so moving machines can consume one.

Should the VPS clock be set to broker server time?
Only if the EA specifically requires it. Otherwise, Windows time synchronised via NTP is fine.

Trading foreign exchange and CFDs on margin carries a high level of risk and may not be suitable for all investors. This article is for educational purposes only and does not constitute financial advice.

Choose a VPS Fit for Automated Trading

A correctly configured EA needs a VPS whose data centre, uptime, and support genuinely match automated trading requirements. Explore our independently vetted MT4 and MT5 VPS providers to compare regions, hardware, and pricing before you commit.

Jay Slingsby

Jay Slingsby

I'm Jay Slingsby. I've spent six years trading and testing automated systems, and I started The Robotic Trader because the Expert Advisor market is full of scams and poor-quality information. Every broker, VPS provider and EA on this site is tested against fixed criteria before I recommend it, and I publish the verdict either way — including the ones that fail.

Back to Blog
The Robotic Trader Logo

© 2026 The Robotic Trader. All rights reserved.