How to Install and Run an MT5 Expert Advisor on a VPS
An Expert Advisor only operates while the environment running MetaTrader 5 is active and connected to the broker. If the computer sleeps, loses power or drops its internet connection, the EA stops working until the platform is running again.
A VPS (virtual private server) provides a remote environment designed for continuous operation, so your personal computer does not need to stay powered on. It does not promise uninterrupted 24/7 availability, and it does not guarantee profitable trading, zero downtime, zero slippage, zero latency or perfect execution. Execution still depends on broker infrastructure, network conditions, the VPS provider, platform state, strategy behaviour and market conditions.
What a VPS does for an MT5 EA
A VPS can provide:
- An always-on remote Windows environment.
- Persistent MetaTrader operation.
- Remote access from other devices.
- Potentially lower network latency if located near the broker's trade server.
- Independence from home power and internet interruptions.
Lower latency can shorten communication time to a broker server, but lower ping alone does not guarantee better trading results or eliminate slippage.
Windows VPS vs MetaTrader Virtual Hosting
There are two common approaches.
Third-party Windows VPS. A normal Windows server where you install and operate MetaTrader 5 yourself. It offers full desktop access, direct control over MT5 files and settings, and can run other desktop applications subject to the provider's resources.
MetaTrader Virtual Hosting. MetaTrader also provides its own virtual-hosting service integrated into the platform. It migrates your configured MT5 trading environment to a virtual platform. See the MetaTrader 5 Virtual Hosting documentation.
Neither approach is universally better; the right choice depends on your needs.
Choosing a VPS location
Distance to you matters less than network connectivity between the VPS and your broker's trade server. Where possible, compare latency to the actual broker server rather than relying on a region name. There is no universal latency figure that every setup must meet, and no region is always best; lower, stable latency is generally preferable for execution-sensitive systems.
VPS hardware
There is no universal minimum specification. Resource requirements depend on the number of MT5 terminals, charts, EAs and indicators, the amount of historical data and any other software running on the VPS. A single lightweight MT5 setup may need relatively modest resources, while multiple terminals or computationally heavy EAs need more.
Monitor CPU, RAM, disk space and platform responsiveness over time, and adjust if the platform becomes slow.
Secure the VPS first
Before installing trading software, apply basic security practices:
- Use a strong, unique VPS/RDP password.
- Install operating-system updates.
- Keep remote-access credentials private.
- Avoid sharing administrator credentials.
- Use the VPS only for necessary trading software where practical.
- Do not download unknown Expert Advisors or executables.
- Maintain account recovery information.
Keep antivirus, firewall and operating-system protections enabled. No setup is perfectly secure, but these steps reduce common risks.
Install MetaTrader 5
- Connect to the VPS using its normal remote-desktop method.
- Obtain MetaTrader 5 from your broker or another official source.
- Install MT5.
- Launch the platform.
- Log in to the intended trading account.
- Verify the correct broker server is selected.
Install the Expert Advisor
In MetaTrader 5, open File → Open Data Folder → MQL5 → Experts and copy the compiled .ex5 file into the Experts folder.
Then restart MetaTrader 5, or refresh the Expert Advisors list in the Navigator. The EA should appear under Expert Advisors. Only install compiled EX5 files from trusted sources; there is no need to modify source code.
Open the correct symbol and timeframe
The chart must match the product's intended setup. For the current A—Series:
| Expert Advisor | Symbol | Timeframe |
|---|---|---|
| APEX | XAUUSD | M5 |
| AURELIS | XAUUSD | M5 |
| ASTRA | XAUUSD | M1 |
Timeframe alone does not determine a strategy's risk or profitability; see M1 vs M5 for automated gold trading.
Attach the EA
Open Navigator → Expert Advisors, then drag the EA onto the correct chart or double-click it. Review the Inputs before enabling trading, and do not change parameters unless you understand their effect. For AXIFLARE products, use the intended default configuration unless product documentation instructs otherwise.
Enable algorithmic trading
In desktop MT5, automated trading permission must be enabled for an EA to open and manage trades: the platform-level Algo Trading permission, and EA-level permissions where relevant. If automated trading is disabled, the EA may remain attached but will not be allowed to execute trades. Enabling Algo Trading does not mean the EA will place trades immediately; the strategy may simply have no valid signal.
WebRequest — important for some EAs
Some Expert Advisors communicate with external services using MetaTrader's WebRequest function. For those EAs, the required trusted URL must be added under Tools → Options → Expert Advisors → Allow WebRequest for listed URL. Only add URLs you trust and that the EA's documentation requires.
AXIFLARE licence WebRequest
For current AXIFLARE Expert Advisors on Live accounts, add this URL to Allow WebRequest for listed URL:
https://axiflare-a-series-engine.lovable.app
AXIFLARE uses this endpoint for licence validation. The EA may send the licence key, product code, MT5 account number, broker server and EA version. Validation never requires your MT5 trading password, broker password, wallet private key or seed phrase.
Bind the AXIFLARE Live licence
- Sign in to the AXIFLARE customer dashboard.
- Find the purchased Expert Advisor.
- Choose BIND ACCOUNT.
- Enter the exact MT5 account number.
- Enter the exact broker server.
- Save the binding.
- Copy the product's licence key.
- Paste it into the EA's LicenseKey input.
- Reattach or reload the EA if needed.
The account number and broker server must match the Live MT5 environment. Customers can rebind once every 30 days. Demo accounts do not require an AXIFLARE licence, and the Strategy Tester does not require licence validation.
Verify the EA is running
- The EA appears on the correct chart.
- Algo Trading permissions are enabled.
- Inputs are as intended.
- The Experts log shows no repeated errors.
- The Journal shows no connection problems.
- The broker connection is active.
- Licence status is confirmed where applicable.
For AXIFLARE Live use, the chart reports AXIFLARE // LICENSE ACTIVE when validation succeeds. If it shows INVALID LICENSE, ACCOUNT MISMATCH or SERVER MISMATCH, check your licence key and binding details. An absence of errors today does not guarantee correct operation in future.
Avoid running duplicate instances
If the same EA and account setup runs on both your local computer and the VPS at the same time, it may create unintended duplicate trading behaviour, depending on the EA. Before leaving the VPS unattended, confirm that only the intended trading instance is active.
MetaTrader Virtual Hosting — migration
With MetaTrader's built-in Virtual Hosting, your configured MT5 environment is migrated from the local platform to the virtual platform. Before migrating, prepare the correct trading account, required charts, Expert Advisors, EA Inputs, necessary symbols and platform settings.
If the EA uses WebRequest, add the trusted URLs on the Expert Advisors settings tab before migration. Migration is a synchronisation of the configured environment, not a copy of an ordinary Windows desktop. See the MetaTrader 5 virtual-hosting migration documentation.
After migration
The virtual platform is intended for autonomous operation. Migration transfers the configured trading environment, and the virtual platform's logs can be reviewed from within MT5. WebRequest permissions must already be configured when an EA requires them. A third-party Windows VPS does not behave identically to MetaTrader Virtual Hosting, so follow the instructions for the approach you use.
VPS restarts and platform recovery
On a Windows VPS, plan for reboots and maintenance. After a reboot, verify:
- MT5 has started.
- The trading account has reconnected.
- The required chart is open.
- The EA is attached.
- Algo Trading is enabled.
- The licence is active.
- No unexpected errors appear in Experts or Journal.
If you configure auto-start, test it with a controlled reboot before relying on it.
Updates
Manage MT5, Windows and EA version updates deliberately rather than disabling them. Before replacing an EA file, preserve any settings you need, verify the correct product and version, restart or reload where required, and confirm the EA resumes normally.
Demo test before Live
Where practical, verify the complete setup on Demo before Live deployment. Check that:
- The EA loads.
- WebRequest works.
- Chart and timeframe are correct.
- Settings are correct.
- No repeated errors appear.
- The platform remains connected.
Demo testing confirms setup and operation only; it does not guarantee future Live performance. For strategy evaluation, see how to backtest an EA in MT5, Every Tick vs Real Ticks and how to evaluate an XAUUSD EA.
Common MT5 VPS problems
| Problem | Possible cause | What to check |
|---|---|---|
| EA visible but not trading | No signal, Algo Trading disabled, EA permissions | Platform and EA permissions, logs |
| LICENSE KEY REQUIRED | Live account without an entered key | Enter the correct AXIFLARE licence key |
| INVALID LICENSE | Wrong or invalid product licence | Confirm the key matches the product |
| ACCOUNT MISMATCH | Dashboard binding does not match the MT5 account | Verify MT5 login/account number |
| SERVER MISMATCH | Broker server differs from binding | Copy the exact broker server name |
| LICENSE SERVER UNAVAILABLE | WebRequest, network or service issue | Allowed URL, connectivity and logs |
| EA not visible in Navigator | EX5 in the wrong folder or list not refreshed | MQL5/Experts; refresh or restart |
| No broker connection | Account, server or network issue | MT5 connection status |
| Duplicate or unexpected trades | Multiple active EA instances | Local/VPS charts and running terminals |
These are common causes, not the only possible ones.
Practical VPS checklist
- VPS access secured.
- MT5 installed from a trusted source.
- Correct broker account connected.
- Correct symbol and timeframe.
- EX5 installed.
- EA attached.
- Inputs reviewed.
- Algo Trading configured.
- Required WebRequest URL allowed.
- AXIFLARE Live account bound where applicable.
- Licence status verified.
- Experts and Journal checked.
- Duplicate local instance avoided.
- Reboot and recovery behaviour verified.
- Demo test completed before Live use.
AXIFLARE product context
Final perspective
A VPS does not improve the strategy itself. Its role is to provide a stable remote environment in which MetaTrader and the EA can remain available. Correct configuration, broker connectivity, EA permissions, licensing and monitoring still matter. Please read our Risk Disclosure.
Educational content only. Nothing in this guide constitutes investment advice. Trading involves substantial risk.