MetaTrader 5 on Linux with Wine vs Windows: tested

Windows takes close to 2 GB before the first terminal and needs a Starter. Ubuntu with Wine runs MetaTrader 5 on a Nano. What we measured, the installer that never finishes without a screen, and which one to pick.

Two servers side by side, one with a short memory gauge, the other with a long one

Windows is the obvious home for MetaTrader, and it is also the expensive part of a trading VPS: the system alone takes close to 2 GB of memory and needs at least our Starter plan. MetaQuotes publishes a script to run MetaTrader 5 on Ubuntu with Wine. Can a Linux server do the same job on a smaller plan? We set up both and measured.

1. The two setups

  • Windows Server 2025 from our MetaTrader 5 image: the terminal is installed and starts on its own at logon.
  • Ubuntu 24.04 with Wine 11.0 (WineHQ stable) and WebView2, following the steps of the official MetaQuotes script for Ubuntu.

As in our terminals per VPS test, the terminals were open but not logged in to a broker: this compares what each system needs to keep MetaTrader running, before any trading load.

2. Installation: the official installer needs a screen

On Windows, there is nothing to do: our image delivers the terminal installed, and it was running 4 minutes 24 seconds after a new server started.

On Linux, Wine and WebView2 went in without trouble, WebView2 in 2 minutes 40. The MetaTrader 5 installer itself is a web installer with a graphical interface. On a server without a screen (we gave Wine a virtual one), it ran for 25 minutes without opening a single window, then hit our time limit. It never finished.

Two ways around it. Install through a remote desktop, as the script expects. Or do what we did: copy the MetaTrader 5 folder from a Windows installation (392 MB) into the Wine prefix and start terminal64.exe from there. The terminal then ran normally.

bash
Xvfb :99 -screen 0 1280x800x24 &
export DISPLAY=:99 WINEPREFIX=$HOME/.mt5
wine "$WINEPREFIX/drive_c/Program Files/MetaTrader 5/terminal64.exe" /portable &

You still need to see the terminal once, to log in to your broker account. On a virtual screen, x11vnc -display :99 -localhost and an SSH tunnel give you a window on it from your computer.

3. Memory: the real difference

Memory used by the whole system, on a Starter (2 vCPU, 4 GB) for Linux and a Pro (4 vCPU, 8 GB) for Windows. Under Wine, the first terminal costs more, about 380 MB, because Wine starts its own copy of the Windows services with it. The next ones cost about 230 MB each, close to the 200 MB they take on Windows. The base decides: Windows needs about 1.5 GB more before the first terminal, and at four terminals Linux still uses 0.9 GB less.

We also ran one terminal on a Nano (1 vCPU, 2 GB): 0.5 GB used in total, about 1.4 GB left. Windows does not fit on a Nano at all; our Windows images start at the Starter plan.

On disk, Wine and WebView2 take about 6 GB on top of Ubuntu, then 0.4 GB per copy of the terminal, close to what Windows needs per terminal. With idle terminals the processor stayed low on both; the peaks we saw on Windows, up to 25 %, came from its own background tasks.

4. What Wine does not tell you upfront

  • Restarts are on you. In our first runs, terminals started fresh had closed a couple of minutes later, most likely to apply an update, and did not come back on their own. On Windows, our image starts the terminal again at logon. On Linux, plan a script or a service that restarts it.
  • Not every Expert Advisor survives. An EA that only uses MQL5 runs the same. One that loads a Windows DLL, or a broker plugin built for Windows, may not. Test yours on a demo account before going live.
  • No desktop by default. Our measurements used a virtual screen with nothing else. A full remote desktop (a light one such as XFCE with xrdp) is more comfortable, and uses more memory than the figures above.
  • Support is yours too. When the terminal misbehaves under Wine, the broker's support will ask you to try on Windows first.

5. Which one to pick

One or two terminals running MQL5 robots, and comfortable with a Linux shell: a Nano with Wine does the job for half the price. Several accounts, Windows-only tools, or no wish to maintain the setup: take the Windows image and spend the time on trading. Our guide to choosing a trading VPS covers latency and the rest of the checklist.

Several trading terminal windows stacked, each with its own candlesticks

How many MT4 and MT5 terminals fit on a VPS: measured

A Windows Server 2025 server, then one, two, four... up to twelve MetaTrader 5 terminals, and eight MetaTrader 4. The memory each terminal takes, what really limits you, and how many to run on each plan.

Read the article 5 min read

An indicator's signal arrows turned into orders by a panel, running on a server

Trade Indicator Assistant on a MetaTrader VPS

An indicator that draws arrows, a utility that turns them into orders, and a Windows VPS delivered with MetaTrader so the whole thing runs without you. From the MQL5 Market to the panel, with the settings to revisit before leaving the automation alone.

Read the article 10 min read

Support & discussions

Technical questions, incident reports, or infrastructure discussions, the team is reachable on Discord, Telegram, X, Instagram, Reddit, and IRC.