Trading Infrastructure
Setup Auto-Restart for MetaTrader on VPS
Make sure MetaTrader automatically restarts and reconnects after any VPS reboot or crash.
The Problem
A VPS reboot (planned or not) can leave MetaTrader closed and your EAs not running — without auto-restart configured, you might not notice for hours, costing you trades or protection you thought was active.
About this problem
MetaTrader does not run as a Windows service, so after a reboot it only comes back if something launches it in a user session. If the VPS restarts after a provider maintenance event or a Windows update and no auto-logon or startup task exists, the platform stays closed and any EAs attached to charts stop running.
People often find this out the hard way, when positions are left unmanaged or an EA has not traded for hours. They then want a setup they can trust to recover on its own after any reboot.
What's Included
- Setting up MetaTrader to launch automatically on VPS startup
- Configuring auto-login so it reconnects without manual input
- Testing with a real reboot to confirm it comes back up correctly
- A quick way to verify remotely that it's running (e.g. via the Telegram alert service)
What's NOT Included
- Fixing EA logic that crashes the platform itself (a code problem, not an infrastructure one)
- Broker-side connection issues outside the VPS
- Monitoring beyond confirming the restart itself works
How It Works
- I configure Windows auto-logon for the trading user so a session exists after boot, where your security needs allow it.
- I create a startup entry or scheduled task that launches the MetaTrader terminal with the correct profile at logon.
- I confirm the terminal's saved login and Algo Trading settings so it reconnects and re-attaches the EAs on its charts.
- I perform a real reboot of the VPS and check that the terminal, account connection and EAs return without manual input.
- I set up a simple way to confirm remotely that the platform is running, such as a Telegram message if you also have the alert service.
In practice: you buy the service, send over whatever access or details the job needs, I investigate and do the work, and you confirm it's resolved before we call it done.
Frequently Asked Questions
- How do I make MetaTrader start automatically after a VPS restart?
- It needs a startup task or entry in the trading user's session, plus auto-logon and a saved login. I configure all of these and test them with a real reboot.
- Is auto-logon on Windows a security risk?
- It stores credentials on the machine, which is a trade-off. I will explain the option and keep other protections in place, such as restricting remote access.
- Will my EAs restart too?
- EAs attached to charts in a saved profile normally reload when the terminal starts, provided Algo Trading is enabled. I verify this during the reboot test.
- What if MetaTrader crashes while the VPS is still running?
- This setup is aimed at reboots. Crash recovery would need additional monitoring, which is not included beyond confirming the restart works.
- Can you fix my EA if it is what crashes the platform?
- No. If the EA's own code causes crashes, that is a code problem and not covered here.
- Does this fix disconnections from my broker?
- No. Broker-side connection problems outside the VPS are not covered.