You have everything set up just right on your PC: your EAs, a few custom indicators, chart templates you have tuned for years and settings you would rather not type in again. Now you want all of it on your VPS, running 24/7. The good news is that MetaTrader keeps all of this in a handful of folders. Copy the right ones and the VPS terminal looks and behaves like the one on your PC.
Key Takeaways
- Everything you need is in the data folder. Open it with File, Open Data Folder, on the PC and on the VPS.
- Copy the MQL4 or MQL5 folder, plus
templatesandprofilesfor MT4. MT5 keeps templates and profiles inside MQL5.- Close both terminals before copying, so nothing is half written or overwritten when they close.
- Licences do not copy. Check activations with each EA vendor before you move.
- Stop the EAs on your PC once the VPS is trading, or you will get duplicate trades.
1. Before You Start
You need three things ready:
- The platform installed on the VPS from the same broker, and logged in at least once. If you have not done that yet, follow installing MT5 on your VPS and logging in to your broker first. MT4 works the same way.
- Remote Desktop access to the VPS. The address is in your โYour server is now ready!โ email in the form
<server>:41011, and the Windows user istrader. See getting your VPS login details. - A list of what runs where on your PC: which EA is on which chart, with which settings. A screenshot of each chart is enough.
๐ก Tip: Before you move anything, save the current inputs of each EA to a
.setfile. With the EA on its chart, open its properties, go to the Inputs tab and click Save. Those files travel with the rest and make re-attaching quick. See EA set files and presets.
2. Find the Data Folder on Your PC
MetaTrader does not keep your EAs in its Program Files folder. It keeps them in a separate data folder:
- Open MT4 or MT5 on your PC.
- Click File, then Open Data Folder. A File Explorer window opens.
- Leave that window open and close the terminal.
Closing the terminal makes it save your charts and settings, and stops it changing files while you copy them.
3. What to Copy
Inside the data folder, these are the folders that hold your own work:
| What | MT4 location | MT5 location |
|---|---|---|
| EAs | MQL4\Experts | MQL5\Experts |
| Custom indicators | MQL4\Indicators | MQL5\Indicators |
| Scripts | MQL4\Scripts | MQL5\Scripts |
Include files (.mqh) | MQL4\Include | MQL5\Include |
| DLLs and libraries | MQL4\Libraries | MQL5\Libraries |
| EA data files | MQL4\Files | MQL5\Files |
| Set files | MQL4\Presets | MQL5\Presets |
| Templates | templates | MQL5\Profiles\Templates |
| Profiles | profiles | MQL5\Profiles\Charts |
The simplest approach is to copy the whole MQL4 or MQL5 folder, and for MT4 the templates and profiles folders too. That way nothing your EA quietly depends on, such as an include file or a data file, gets left behind. For what each folder is for, see MQL4 and MQL5 folders: where EAs and indicators go.
Select those folders, right-click, and choose Send to, then Compressed (zipped) folder. One zip file is much easier to move than hundreds of small files.

โ ๏ธ Warning: Do not copy files between MT4 and MT5. An
.ex4EA does not run in MT5, and an.ex5does not run in MT4. Move MT4 files to an MT4 terminal and MT5 files to an MT5 terminal.
4. Get the Zip File Onto the VPS
Pick whichever way works for you:
Copy and paste. Connect with Remote Desktop, right-click the zip on your PC and choose Copy, then right-click the VPS desktop and choose Paste. This uses the Remote Desktop clipboard. If paste does nothing, see copy and paste not working over RDP.
A redirected drive. In Remote Desktop Connection, click Show Options, then Local Resources, then More, and tick your PCโs drive before connecting. On the VPS, it appears in File Explorer under This PC, and you can copy the zip from it. See mapping a network drive from Remote Desktop.
Cloud storage. Upload the zip to a storage service you already use, then download it in the VPS browser.
On a Mac, the steps are different. See copying files from a Mac to your VPS.
5. Put the Files Into the VPS Terminal
- On the VPS, open the same platform (MT4 or MT5).
- Click File, then Open Data Folder.
- Close the terminal, leaving the File Explorer window open.
- Unzip your file (right-click, Extract All) somewhere on the VPS, such as the desktop.
- Copy the extracted
MQL4orMQL5folder (andtemplatesandprofilesfor MT4) into the VPS data folder. - When Windows asks, choose to merge the folders, and to replace files with the same name.
Merging keeps the standard files the VPS terminal installed and adds yours on top.
If you run more than one terminal on the VPS, each has its own data folder. Repeat this for every terminal that needs the files. See running multiple MT4 and MT5 terminals on a VPS.
6. Start Up and Rebuild Your Charts
- Start the terminal and check it is logged in and connected.
- Load your layout. Use File, then Profiles, and pick the profile you copied, or open charts and right-click, Template, to apply your templates. See MT4 and MT5 templates and profiles.
- Check the Navigator. Your EAs and indicators should be listed. If not, right-click the Navigator and choose Refresh.
- Attach each EA to its chart, click Load on the Inputs tab, and pick its
.setfile. - Allow what the EA needs. If it uses a DLL or web requests, tick the options in Tools, Options, Expert Advisors. See EA DLL imports and WebRequest permissions.
- Turn on Algo Trading (MT5) or AutoTrading (MT4).
If a chart opens with gaps or an indicator shows nothing for older bars, the VPS terminal is still downloading history. Give it a few minutes. See missing chart history on a new VPS.
7. Licences and Activations
Files copy perfectly. Licences often do not:
- MQL5 Market products are tied to activations on each computer. See EA licensing and MQL5 Market activations on a VPS.
- Commercial EAs may be licensed to your trading account number, or to a machine, or need a licence key typed in again.
- Only source files? If you copied
.mq4or.mq5files without the compiled versions, compile them in MetaEditor on the VPS. See how to compile an EA in MetaEditor.
Check with each vendor before you move, and free up an activation on your PC first if you only have a few.
โ Best Practice: Keep the zip file somewhere safe off the VPS. It is a ready-made backup of everything you just set up. See how to back up your trading data on a VPS.
8. Check Everything Works, Then Switch Off the PC
Before you trust the VPS with live trades:

- Every EA shows on its chart with the smiley face (MT4) or blue hat icon (MT5).
- The Experts tab shows each EA loading with no errors about missing files or indicators.
- Inputs match what you had on the PC.
- The first trade or signal behaves as expected, ideally on a demo account first.
If an EA complains about a missing indicator, check the exact name in the Indicators folder. See EA custom indicator missing (iCustom). If it works on the PC but not on the VPS, our EA works on my computer but not on the VPS guide walks through the usual causes.
Once the VPS is trading correctly, remove the EAs from the charts on your PC or close the terminal there. Two copies of the same EA on the same account will both trade. See same EA on PC and VPS: duplicate trades.
Finally, make sure your terminal reopens by itself after a VPS restart. See making your platforms start again after the VPS restarts.