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.
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
| MT5 terminals | Ubuntu + Wine | Windows Server 2025 |
|---|---|---|
| none, system alone | 0.4 GB | about 1.9 GB |
| 1 | 0.8 GB | 1.8 GB |
| 2 | 1.0 GB | 2.1 GB |
| 4 | 1.5 GB | 2.4 GB |
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
| Ubuntu + Wine | Windows Server 2025 | |
|---|---|---|
| Smallest plan | Nano, 8.50 CAD/month | Starter, 16 CAD/month |
| Memory before the first terminal | 0.4 GB | about 1.9 GB |
| Installation | by hand, needs a screen once | ready at delivery |
| Restart after an update | to script yourself | automatic at logon |
| Every EA and plugin | to test | yes |
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.