bolt Valebyte VPS from $4/mo — NVMe, 60s deploy.

Get a VPS arrow_forward
eco Beginner Tutorial/How-to

MetaTrader 5 on Windows VPS: Installation, Auto-Start, and Broker Latency

calendar_month Sep 26, 2026 schedule 22 min read visibility 11 views
MetaTrader 5 на Windows VPS: установка, автозапуск и задержка до брокера
info

Need a server for this guide? We offer dedicated servers and VPS in 50+ countries with instant setup.

Need a server for this guide?

Deploy a VPS or dedicated server in minutes.

MetaTrader 5 on Windows VPS: installation, auto-start, and latency to the broker

TL;DR

A Windows VPS lets you keep MetaTrader 5 running around the clock, launch trading robots after a server reboot, and choose a location with minimal latency to the broker's trading server. In this guide, you will set up a secure Windows Server, install MT5, enable reliable terminal auto-start, verify the connection to the broker, and organize backups.

  • For one MT5 terminal, 2 vCPU, 4 GB RAM, and 50–80 GB of NVMe storage are usually sufficient.
  • The terminal should run under a separate Windows account rather than the built-in Administrator account.
  • Auto-start is best configured through Windows Task Scheduler after the trading user logs in.
  • Do not close the RDP session by selecting “Sign out”: simply disconnect so that Expert Advisors can continue running.
  • Latency should be measured not only with ICMP ping, but also through the connection status and MT5 log.
  • Back up the MQL5, Profiles, Templates folders, and terminal configuration to external S3-compatible storage.

What we are configuring and why

MetaTrader 5 on a Windows VPS is a continuously running trading terminal available through Remote Desktop. You can run Expert Advisors, trading panels, scripts, indicators, trade copiers, and multiple MT5 instances for different brokers or accounts on it.

The main reason to move MT5 from a home computer to a VPS is operational continuity. A home PC may reboot after a Windows update, enter sleep mode, lose its internet connection, or lose power. A VPS is usually located in a data center with redundant power, a stable connection, and network infrastructure designed for continuous operation.

The second reason is network latency to the broker's trading server. If the broker's trading server is located in London, Frankfurt, New York, Tokyo, or Amsterdam, a server in the same city or region often has a shorter network route than a home internet connection. This is especially important for algorithms sensitive to execution speed, but it does not eliminate spreads, slippage, execution queues, broker restrictions, or liquidity considerations.

What will be ready after setup

  • Windows Server with a separate user for trading.
  • Secure RDP access with Network Level Authentication and inbound address restrictions.
  • MetaTrader 5 installed from an official source or from the broker.
  • A trading account connected to the correct broker server.
  • MT5 auto-start after a reboot and login to the trading account.
  • Connection and log verification, plus latency measurement to the broker.
  • Regular backups of Expert Advisors, profiles, and settings.

Managed cloud terminal and your own VPS

Some brokers offer built-in virtual hosting for MT5. This option is convenient if you need to run one terminal without administration: the platform transfers the environment to virtual hosting, while the user does not work with Windows directly. Limitations usually apply to installing third-party software, non-standard libraries, copiers, multiple terminals, and backup control.

Your own Windows VPS provides full administrator access. You can install multiple terminals, Python scripts, databases, monitoring tools, VPNs, backup tools, trading panels, and custom utilities on it. The cost of this flexibility is responsibility for Windows security, updates, licensing, and data protection.

Criterion Broker's built-in VPS Your own Windows VPS
Third-party software installation Usually limited Full control
Multiple terminals Depends on the plan and rules Multiple instances can be run
Windows access Usually unavailable Available through RDP
Backup Limited Configured independently
Administration Minimal Must be performed independently
Flexibility for robots and integrations Medium High

A VPS reduces technical risks to continuous operation, but it does not make a trading strategy profitable. Before running on a live account, test the robot on a demo account, limit risk, and control the volume of opened positions.

What VPS configuration is needed for this task

MT5 resource consumption depends not so much on the terminal itself as on the number of charts, active symbols, indicators, Expert Advisors, quote history, and external programs. One empty terminal usually consumes little memory and CPU time. However, a heavy Expert Advisor performing calculations on every tick, dozens of charts, or multiple simultaneous terminals can place a noticeable load on the CPU.

Minimum and recommended configuration

Scenario vCPU RAM Disk Network
One MT5, 1–3 Expert Advisors, several charts 2 4 GB 50 GB NVMe 100 Mbps or higher
2–4 terminals, multiple strategies 4 8 GB 80–120 GB NVMe 100 Mbps or higher
Many charts, copier, Python, monitoring 4–6 16 GB 160 GB NVMe 1 Gbps recommended
Strategy optimization in Strategy Tester 8 or more 16–32 GB 200 GB NVMe Speed is secondary

A practical starting option for one or two trading terminals is 2–4 vCPU, 4–8 GB RAM, and 80 GB NVMe. You can choose a VPS with the specified characteristics, then increase resources if Task Manager shows sustained CPU utilization above 70%, insufficient memory, or active page file use.

For MT5 operation, CPU and NVMe disk stability are more important than high bandwidth. Trading quotes and trade requests consume very little traffic. Bandwidth becomes more important when downloading large amounts of history, performing updates, using Remote Desktop, and transferring backups.

When you need dedicated rather than VPS

A dedicated server is justified if you run a large number of terminals, build internal infrastructure for multiple users, perform heavy optimizations simultaneously, or require guaranteed access to all physical cores. For one MT5, dedicated is usually excessive: the costs do not provide a proportional advantage in trade execution.

A dedicated server may also be required if company rules require physical-level isolation, a large amount of local NVMe storage is needed, or computationally intensive external services run continuously. For regular trading, one robot, or a portfolio of several robots, a quality Windows VPS is sufficient.

How to choose a location

Choose not your country of residence, but the region where the specific broker's trading gateway is located. A broker may be registered in one country while its MT5 servers operate in another data center. Common financial locations include London, Frankfurt, Amsterdam, New York, Chicago, Singapore, Tokyo, and Hong Kong.

First, determine the exact server name in the MT5 login window or in the broker's documentation. Then create a test VPS in one or two nearby regions, check the route, port availability, and terminal readings during active trading hours. Do not choose a location based only on a geographic map: internet routes between two nearby cities can sometimes be worse than a route to a more distant node.

Server Preparation

For MT5, Windows Server 2025 Standard or Windows Server 2022 Standard with a graphical interface is the most convenient choice. Windows 11 Pro is also technically suitable, but the server edition is better designed for remote work and continuous availability. After receiving the RDP credentials, immediately change the temporary administrator password.

There is no need to set up SSH in Windows for working with MT5. Management is performed through Remote Desktop Protocol. OpenSSH can be installed additionally for script-based administration, but an open SSH port is unnecessary unless you intentionally use it.

Create a separate trading account

Do not run the terminal under the built-in Administrator user. A separate user isolates the MT5 profile, reduces the likelihood of accidental changes to system settings, and simplifies backups. Open PowerShell as an administrator and run the commands.


# Creates a local user to run MetaTrader 5.
$Password = Read-Host "Enter a strong password for mt5trade" -AsSecureString
New-LocalUser -Name "mt5trade" -Password $Password -FullName "MT5 Trading" -Description "Isolated account for MetaTrader 5"

# Adds the user to the Remote Desktop Users group without granting administrator rights.
Add-LocalGroupMember -Group "Remote Desktop Users" -Member "mt5trade"

Local administrator rights are not required for normal MT5 operation. If an expert advisor installs DLLs, drivers, a trading gateway, or third-party software, temporarily use an administrative account for installation, while keeping the terminal under a standard user.

Update Windows and core components

Install all cumulative Windows updates before starting trading. Schedule updates so that the server does not reboot during important market sessions. In Windows Server, updates can be controlled manually through Windows Update or centrally through policies.


# Displays information about the Windows version and the latest installed updates.
Get-ComputerInfo | Select-Object WindowsProductName, WindowsVersion, OsBuildNumber
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 10

Secure RDP

RDP is a primary target for automated scanners and password-guessing attacks. The minimum security set includes a unique long password, Network Level Authentication, incoming IP address restrictions, and blocking brute-force attempts. If you have a dynamic home IP, it is safer to connect through a VPN with a fixed address or periodically update the firewall rule.


# Enables the Network Level Authentication requirement for RDP connections.
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" -Name UserAuthentication -Value 1

# Enables the built-in Windows Firewall for all network profiles.
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True

# Allows RDP only from your external IP address; replace the example with your IP or subnet.
New-NetFirewallRule -DisplayName "RDP only from trusted IP" -Direction Inbound -Protocol TCP -LocalPort 3389 -RemoteAddress "203.0.113.25" -Action Allow

Before disabling the default RDP rule, make sure the new rule works in a second RDP session. Otherwise, you may lose access to the server. If the provider offers a console in the control panel, retain access to it as an emergency option.


# Disables the broad default RDP rule only after verifying your own restricted rule.
Disable-NetFirewallRule -DisplayGroup "Remote Desktop"

Instead of the Linux fail2ban tool, Windows can use blocking rules through Defender Firewall, sign-in auditing, and endpoint protection tools. For a small personal VPS, restricting RDP by IP, NLA, and a strong password are the most effective measures. Do not change the RDP port as the sole security measure: it reduces scanner noise but does not replace access control.

Disable sleep and check time synchronization

The server must not enter sleep mode. Sleep is usually disabled in Windows Server editions, but check the power plan. Accurate system time is important for logs, expert advisor schedules, and trade diagnostics.


# Disables hibernation and displays the status of the time synchronization service.
powercfg /hibernate off
Get-Service W32Time
w32tm /query /status

Software Installation — Step by Step

As of early 2026, MetaTrader 5 is regularly updated by MetaQuotes, so it is more appropriate to install the current official installer rather than pin an outdated build number in the instructions. After installation, you can view the build number in the Help → About menu. For critical robots, do not blindly update the terminal in the middle of a trading period: first test the update on a test instance.

Step 1. Sign in as the trading user

Disconnect from the administrative session and sign in via RDP as mt5trade. Installing under the trading user's profile ensures that the data folder, access keys, and settings are located specifically in that profile.


# Displays the current account: mt5trade should be shown before installation.
whoami

Step 2. Install winget or check whether it is available

In current Windows Server 2025 images, the winget package manager may already be present. If the command is not found, use the official MT5 installer from the broker's website or the official MetaTrader 5 installer through a browser. Do not download the terminal from file directories, Telegram channels, or unknown mirrors.


# Checks for Windows Package Manager and its version.
winget --version

Step 3. Find the official MetaTrader 5 package

winget catalogs may change, so first find the available package by name. If the results list MetaQuotes as the official publisher, use the exact identifier from your catalog.


# Searches for MetaTrader packages in the official winget source.
winget search MetaTrader

Step 4. Install the terminal

A typical package identifier is shown below. If the search returned a different exact ID, use it instead. An alternative and often preferred option is the broker-branded terminal: it usually already contains the correct list of that broker's servers.


# Installs MetaTrader 5 silently through winget.
winget install --id MetaQuotes.MetaTrader5 --exact --accept-package-agreements --accept-source-agreements

If installation through winget is unavailable, download the installation file from the broker's official website, save it, for example, to C:\Users\mt5trade\Downloads, and run it manually. Before running it, verify the file's digital signature through Windows properties or PowerShell.


# Checks the digital signature of the downloaded MT5 installer.
Get-AuthenticodeSignature "$env:USERPROFILE\Downloads\mt5setup.exe" | Format-List Status,SignerCertificate

Step 5. Launch the terminal for the first time

After installation, locate terminal64.exe. The path depends on the installation method and selected folder. Do not run multiple copies of the terminal from the same data folder if you plan to use different accounts: it is better to create separate instances.


# Searches for the terminal executable in typical Program Files directories.
Get-ChildItem "C:\Program Files","C:\Program Files (x86)" -Filter "terminal64.exe" -Recurse -ErrorAction SilentlyContinue |
    Select-Object -ExpandProperty FullName

# Launches the located terminal; replace the path with the actual path of your installation.
Start-Process "C:\Program Files\MetaTrader 5\terminal64.exe"

Step 6. Sign in to the trading account

In the terminal, open File → Login to Trade Account. Enter the account number, password, and exactly the server provided by the broker. Names such as Broker-Real, Broker-Real 2, and Broker-Demo may be different servers with different infrastructure.

After signing in, ensure that the connection and latency in milliseconds are displayed in the bottom-right corner of the terminal. Open View → Journal and ensure there are no repeated messages about authorization, connection losses, or an incorrect server.

Step 7. Install an expert advisor or indicator

Open File → Open Data Folder. This is the most reliable way to access the working folder of a specific MT5 instance. Copy the expert advisor to the MQL5\Experts directory, the indicator to MQL5\Indicators, and libraries to MQL5\Libraries.


# Opens the MetaTrader data folder; run the command after identifying the required directory.
explorer.exe "$env:APPDATA\MetaQuotes\Terminal"

After copying the files, right-click in the Navigator window in the terminal and select refresh, or restart MT5. If the expert advisor is provided as .mq5 source code, compile it in MetaEditor and check the Errors tab before attaching it to a chart.

Step 8. Enable algorithmic trading deliberately

The global Algo Trading button must be enabled, but this is not the only requirement. Algorithmic trading must also be permitted in the properties of the specific expert advisor. If the EA uses DLLs or WebRequest, add permissions only after verifying the origin of the code and the addresses it accesses.


# Checks that the MetaTrader 5 process is already running.
Get-Process terminal64 -ErrorAction SilentlyContinue | Select-Object Id,ProcessName,StartTime,CPU

Configuration

The main goal of configuration is to ensure predictable MT5 startup after a Windows reboot and avoid losing the trading process due to improper RDP session termination. The terminal stores some settings in the data directory and user profile, so always run it under the same user.

Separate MT5 instances

If there will be multiple accounts on the VPS, create a separate installation folder and data folder for each terminal. Do not connect two different live accounts to one instance: when switching accounts, you may accidentally launch an Expert Advisor on the wrong account.

For separate instances, it is convenient to use the /portable parameter. In this mode, data is stored next to the executable file. Test it on a demo terminal before using it: moving an already configured instance requires careful data copying.


# Создаёт отдельную папку для второго экземпляра MT5.
New-Item -ItemType Directory -Path "C:\MT5\BrokerA" -Force

# Пример запуска из изолированной папки данных в portable-режиме.
Start-Process "C:\MT5\BrokerA\terminal64.exe" -ArgumentList "/portable"

Configure automatic startup through Task Scheduler

The safest and clearest option is to launch MT5 when user mt5trade signs in. After a server reboot, one interactive sign-in under this account will be required. During normal operation, do not end this session: simply close the RDP client window by choosing disconnect rather than sign out.

Create a startup file. It checks for the process and opens the terminal only if it is not already running. This does not replace monitoring: if the terminal freezes, the process may remain in memory. However, the script protects against creating multiple copies after repeated sign-ins.


# Создаёт папку для административных скриптов MT5.
New-Item -ItemType Directory -Path "C:\MT5\Scripts" -Force

# Сохраняет скрипт запуска MT5 с проверкой уже работающего процесса.
@'
$Terminal = "C:\Program Files\MetaTrader 5\terminal64.exe"

if (-not (Get-Process terminal64 -ErrorAction SilentlyContinue)) {
    Start-Process -FilePath $Terminal
}
'@ | Set-Content -Path "C:\MT5\Scripts\Start-MT5.ps1" -Encoding UTF8

# Создаёт задание: запуск скрипта при входе торгового пользователя.
$Action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -File C:\MT5\Scripts\Start-MT5.ps1"
$Trigger = New-ScheduledTaskTrigger -AtLogOn -User "mt5trade"
$Principal = New-ScheduledTaskPrincipal -UserId "mt5trade" -LogonType Interactive -RunLevel Limited
Register-ScheduledTask -TaskName "Start MetaTrader 5" -Action $Action -Trigger $Trigger -Principal $Principal -Description "Автозапуск MT5 после входа mt5trade" -Force

# Проверяет состояние созданного задания и запускает его вручную для теста.
Get-ScheduledTask -TaskName "Start MetaTrader 5"
Start-ScheduledTask -TaskName "Start MetaTrader 5"

In some scenarios, Windows auto-logon is required after a reboot. This increases risk: the password is stored in the system, and anyone who gains administrative access will be able to use the trading profile. It is preferable to use auto-logon only on a dedicated, secured server with restricted RDP access and a separate trading account with limited permissions. If auto-logon is not needed, sign in manually through RDP after a scheduled reboot and ensure that the task started.

Checking status after RDP disconnection

Closing the RDP client window usually leaves the user session active, so MT5 continues to run. The “Sign out” command ends the user session, closes the terminal, and stops Expert Advisors. Do not confuse disconnecting with signing out.


# Показывает активные и отключённые пользовательские сеансы на сервере.
query user

Ideally, after disconnecting RDP, you should see the Disc status for user mt5trade, while the terminal64.exe process should remain in Task Manager. When connecting again, do not open a second terminal manually if the first one is already running.

Secrets and external integrations

Do not store the trading account login and password in MQL5 code, PowerShell scripts, or shared folders. The terminal saves login details in its protected profile. For external services, such as Telegram notifications, analytics APIs, or S3 backups, use environment variables or a separate .env file with restricted NTFS permissions.


# Создаёт закрытую папку для секретов.
New-Item -ItemType Directory -Path "C:\MT5\Secrets" -Force
icacls "C:\MT5\Secrets" /inheritance:r
icacls "C:\MT5\Secrets" /grant "mt5trade:(OI)(CI)F" "Administrators:(OI)(CI)F"

# C:\MT5\Secrets\backup.env
RESTIC_REPOSITORY=s3:https://s3.example.net/mt5-backups
RESTIC_PASSWORD=замените-на-длинный-отдельный-пароль
AWS_ACCESS_KEY_ID=идентификатор-ключа
AWS_SECRET_ACCESS_KEY=секретный-ключ

Do not send the .env file through messengers or include it in an archive with an Expert Advisor. If keys are exposed, revoke them in the storage console, create new ones, and review the access history.

TLS/HTTPS and terminal access

Caddy, certbot, or your own HTTPS server are not required for MT5 itself to connect to the broker: the terminal uses the protocol and encryption defined by the broker's trading infrastructure. Do not open web ports 80 and 443 “for MT5” — this will not improve latency and will only increase the attack surface.

If you deploy a separate monitoring web panel, API, or status page on the same VPS, configure TLS separately through Caddy or certbot. MetaTrader 5 itself should not be accessible from the internet over HTTP. RDP should also not be exposed through a homemade reverse proxy; use IP restrictions or a VPN.

Checking connectivity and measuring latency to the broker

First, refer to the value in the bottom-right corner of MT5. This is a more useful indicator than a regular ping, because it reflects the state of the terminal's connection to the trading server. Open the journal tab and verify that messages about successful authorization and synchronization appear after connecting.


# Проверяет DNS-разрешение имени торгового сервера; замените имя на сервер брокера.
Resolve-DnsName "mt5.example-broker.com"

# Проверяет доступность конкретного TCP-порта, если брокер сообщил его в документации.
Test-NetConnection -ComputerName "mt5.example-broker.com" -Port 443

# Выполняет ICMP-проверку и показывает среднюю задержку, если сервер отвечает на ping.
Test-Connection -ComputerName "mt5.example-broker.com" -Count 20 |
    Measure-Object -Property ResponseTime -Average -Minimum -Maximum

Port 443 in the example is not a universal MT5 port. Confirm it with the broker or use it only to check the published address. Many trading servers do not respond to ICMP packets, and this does not indicate a problem: if MT5 is connected and displays stable latency, no response to ping is not critical.

Measure indicators at least several times: during a quiet period, at the London open, at the New York open, and during news events if the strategy trades then. Record average and maximum latency, the number of reconnections in the journal, and actual trade execution time. A low 2 ms latency to the gateway does not guarantee the same time to the order execution engine.

Backups and maintenance

A VPS image is useful, but it should not be the only backup. A snapshot may be stored in the same infrastructure as the server, be inconvenient for restoring a single file, and fail to protect against data deletion together with the virtual machine. A separate copy in S3-compatible storage or on another server is required.

What needs to be backed up

  • The MQL5 directory: Expert Advisors, indicators, libraries, include files, presets, and source code.
  • The Profiles and Templates directories: charts, workspaces, and templates.
  • Terminal settings and the server list from the MetaTrader data directory.
  • Startup scripts from C:\MT5\Scripts.
  • Monitoring and backup configuration files, excluding secrets or including them in a separate protected environment.
  • Exported reports and logs if they are needed for strategy auditing.

Do not rely on transferring a saved MT5 password to another server. Credentials may be protected by Windows profile mechanisms and will not be restored on a new machine. After disaster recovery, prepare the investor password or trading password from a secure password manager and sign in manually.

Installing restic

Restic is a backup tool with client-side encryption. It is suitable for uploading data to S3-compatible storage. Use the current stable restic release available in winget, or the project's official binary file. Verify release checksums and signatures before installation.


# Ищет пакет restic в каталоге winget.
winget search restic

# Устанавливает restic; при необходимости замените ID на найденный в вашей выдаче.
winget install --id restic.restic --exact --accept-package-agreements --accept-source-agreements

Create a backup script

First, use MT5 to determine the actual data directory with the “Open Data Folder” command. It is often located in %APPDATA%\MetaQuotes\Terminal\ and contains subfolders with hash names. The script below backs up all instances from this folder, as well as custom scripts.


# Создаёт сценарий ежедневного зашифрованного бэкапа MT5 в удалённый репозиторий restic.
@'
$EnvFile = "C:\MT5\Secrets\backup.env"

Get-Content $EnvFile | ForEach-Object {
    if ($_ -match "^\s([^#][^=]+)=(.)$") {
        [Environment]::SetEnvironmentVariable($matches[1].Trim(), $matches[2].Trim(), "Process")
    }
}

$Restic = "C:\Program Files\restic\restic.exe"
if (-not (Test-Path $Restic)) {
    $Restic = "restic.exe"
}

& $Restic backup 
    "$env:APPDATA\MetaQuotes\Terminal" 
    "C:\MT5\Scripts" 
    --tag mt5 
    --tag daily

& $Restic forget --keep-daily 14 --keep-weekly 8 --keep-monthly 12 --prune
'@ | Set-Content -Path "C:\MT5\Scripts\Backup-MT5.ps1" -Encoding UTF8

Before the first backup, initialize an empty repository. Run the command as the user who has access to the secrets file. Restic will request a password if it is not set in an environment variable.


# Загружает переменные окружения и создаёт новый зашифрованный репозиторий restic.
Get-Content "C:\MT5\Secrets\backup.env" | ForEach-Object {
    if ($_ -match "^\s([^#][^=]+)=(.)$") {
        [Environment]::SetEnvironmentVariable($matches[1].Trim(), $matches[2].Trim(), "Process")
    }
}
restic init

# Запускает первый бэкап вручную и выводит список созданных снимков.
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "C:\MT5\Scripts\Backup-MT5.ps1"
restic snapshots

Schedule daily backups

Do not run backups when the Expert Advisor is actively writing large logs or during an important trading session. For most strategies, a window after the main market closes, such as 02:30 server time, is suitable. Check the Windows time zone before creating the task.


# Создаёт ежедневную задачу бэкапа в 02:30 от имени торгового пользователя.
$Action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -File C:\MT5\Scripts\Backup-MT5.ps1"
$Trigger = New-ScheduledTaskTrigger -Daily -At 2:30AM
$Principal = New-ScheduledTaskPrincipal -UserId "mt5trade" -LogonType Interactive -RunLevel Limited
Register-ScheduledTask -TaskName "Backup MetaTrader 5" -Action $Action -Trigger $Trigger -Principal $Principal -Description "Ежедневный бэкап данных MT5" -Force

If the task runs only during an active session, this is normal for a simple setup. For fully automatic backups after a reboot, you will need to configure a task with saved credentials or a service account, carefully protecting the password. After configuration, be sure to test not only backup creation but also restoration of a single file to a separate folder.


# Проверяет целостность репозитория и восстанавливает снимок в тестовую папку.
restic check
New-Item -ItemType Directory -Path "C:\Restore-Test" -Force
restic restore latest --target "C:\Restore-Test"

Updates and maintenance window

For a trading VPS, do not apply updates according to the continuous rolling update principle. MT5 is a client application that requires a controlled restart when Windows or the terminal is updated. Schedule a maintenance window: save the current journal, create a backup, ensure there are no critical positions or that the robot logic handles them correctly, update the system, and verify automatic startup.

After updating Windows, check four things: whether the user session is active, whether terminal64.exe is running, whether the terminal is connected to the correct server, and whether algorithmic trading is enabled. After updating MT5, separately check the Experts and Journal tabs, because platform changes sometimes affect older libraries, DLLs, or Expert Advisor behavior.

Troubleshooting + FAQ

MT5 shows “No connection” or keeps reconnecting. What should I check?

First, check that the correct server is selected in the login window: the broker may have several similar servers for demo, live, and different regions. Then open the Journal tab and find the exact error message. Check DNS using Resolve-DnsName, the availability of the broker-published port using Test-NetConnection, and Defender Firewall rules. If the connection drops only intermittently, compare the outage times with VPS load, Windows updates, and broker maintenance notifications.

The Expert Advisor is not trading even though the terminal is connected. What is the reason?

Check the global Algo Trading button, algorithmic trading permission in the specific EA settings, and the Experts and Journal tabs. Common reasons include: auto trading is disabled, the symbol is incorrect, the market is closed, insufficient funds, the volume is not allowed, trading is prohibited in the account settings, or DLLs or WebRequest are not allowed. Also make sure the Expert Advisor is attached to the correct chart for the correct live account. Do not rely only on the smiling icon: the log reports the reason more precisely.

MetaTrader 5 does not start automatically after a Windows reboot. How do I fix it?

Check the task with Get-ScheduledTask -TaskName "Start MetaTrader 5" and open its launch history in Task Scheduler. A common reason is that the task is configured “at logon,” but after a reboot nobody has logged in as the mt5trade user. Log in manually and check the launch. Make sure the path to terminal64.exe in the script is correct. Do not use autostart through the Startup folder as the only mechanism: Task Scheduler is easier to diagnose and control.

Why did the robot stop after I closed RDP?

Most likely, you signed out of the Windows account rather than simply disconnecting from Remote Desktop. When signing out, Windows terminates user processes, including MT5. In the RDP client, simply close the window or click disconnect, then use query user to verify that the session has the Disc status. When you next connect, check the process start time and the log to ensure that the terminal was not restarted or stopped.

Latency to the broker is high even though the VPS is in the same city. What should I do?

Geographic proximity does not guarantee an optimal route. Check which exact server MT5 is connected to, not just the broker's website. Compare latency readings in the terminal at different times, trace the route, and test another VPS region. The cause may be intermediate networks, the broker's DDoS protection, an overloaded gateway, or an incorrect account server. Do not draw conclusions from a single ICMP ping: many trading nodes block ICMP while the trading connection works normally.

What is the minimum suitable VPS configuration?

For one MetaTrader 5 instance with several charts and one or two lightweight Expert Advisors, the minimum sensible configuration is 2 vCPU, 4 GB RAM, and 50 GB of NVMe disk space. If you use multiple terminals, a trade copier, Python integration, or many indicators, choose 4 vCPU and 8 GB RAM. Monitor Task Manager: sustained CPU usage above 70%, insufficient memory, and active swap indicate that resources need to be increased.

What should I choose for this task: VPS or dedicated?

For one or several trading terminals, a VPS is almost always sufficient. It is cheaper, deploys faster, and usually provides the required stability. A dedicated server makes sense for dozens of MT5 instances, heavy optimizations, proprietary data processing services, or requirements for physical isolation. Low latency depends primarily on the location and route to the trading gateway, not on whether the server is physical or virtual. First measure the actual latency on a VPS.

Can I run multiple MT5 terminals on one Windows VPS?

Yes, but each instance must have separate installation and data folders, especially if different live accounts are used. For isolation, use separate directories and the /portable parameter or separate Windows profiles. Do not run multiple terminals with the same data directory: settings, logs, profiles, and account connections may conflict. Increase RAM and CPU in proportion to the number of active robots, not simply the number of open windows.

Do I need to open ports for MetaTrader 5 in Windows Firewall?

Usually not. MT5 establishes an outbound connection to the broker's server, and Windows Firewall allows outbound traffic by default. Do not create a broad inbound rule for MT5: the terminal should not accept connections from the internet. Inbound access is required only for administration through RDP, and it should be restricted to trusted IP addresses or a VPN. If corporate policy blocks outbound traffic, allow only the specific process and the addresses published by the broker.

Conclusions and next steps

You now have a Windows VPS with secured RDP access, a separate trading user, MetaTrader 5 installed, verifiable autostart, and backups. The most important thing after setup is to regularly check the MT5 log, connection status, and whether Expert Advisors have started after updates or reboots.

  1. Test the server on a demo account for at least several trading sessions and verify operation after a Windows reboot.
  2. Compare connection latency and stability in the two locations closest to the broker if the strategy is sensitive to execution.
  3. Add external monitoring for the MT5 process, free disk space, and failure notifications before increasing the number of terminals or trading volumes.

Was this guide helpful?

Your feedback helps us improve our guides.

Share this post:

Send this guide to someone who may find it useful.

Telegram VKVK WhatsApp Facebook LinkedIn XX

MetaTrader 5 on Windows VPS: setup, auto-start, and broker latency
support_agent
Valebyte Support
Usually replies within minutes
Hi there!
Send us a message and we'll reply as soon as possible.