tocOn this page 7 sections
cBots only trade while the cTrader desktop app is running and logged in to your broker, so the safest way to run them 24/7 is on a Windows VPS that never sleeps, keeps your RDP session alive after you disconnect, and relaunches cTrader on its own after a reboot. The setup takes about half an hour: install cTrader over RDP, change a few session and power settings, add an auto-start task, and add a small watchdog script.
Pick the server first
Your cBot's orders travel from the VPS to the broker's trade servers, so the data center matters more than raw CPU. Ask your broker where its cTrader servers are hosted and choose the closest location. Our guide on picking the lowest-latency data center shows how to measure this before you commit. For sizing, one cTrader instance with a few cBots runs comfortably on 2 vCPUs and 4 GB RAM. Backtesting and optimization are much heavier, so do those on your own PC or plan extra cores. The Windows VPS for forex trading page lists plans and locations suited to trading platforms.
Install cTrader over RDP
- Connect with Remote Desktop and sign in with the account that will run cTrader day to day. cTrader installs per user, so do not install as one account and run as another.
- Download cTrader Desktop from your broker's site. Brokers ship branded builds, and the build decides which trade servers you connect to.
- Run the installer, sign in with your cTrader ID, and confirm the trading account appears.
- Copy your cBots onto the server. The simplest way is to export each cBot as an .algo file on your PC, drag it into the RDP window, and double-click it on the VPS to import it. You can also open the source in the Automate section and build it there.
- Start each cBot instance once by hand. Check its parameters and confirm it logs output and places orders on a demo account before you point it at live money.
Keep the session alive
The most common reason cBots stop overnight is the RDP session ending. Closing the RDP window disconnects the session, and cTrader keeps running. Choosing Sign out from the Start menu closes cTrader and stops every cBot. Get into the habit of closing the window instead.
Windows Server can also end disconnected sessions after a set time. Open gpedit.msc and go to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Session Time Limits. Set Set time limit for disconnected sessions to Enabled with Never, and leave End session when time limits are reached disabled. Then run gpupdate /force.
Turn off sleep and display timeouts from an elevated PowerShell prompt:
powercfg /change standby-timeout-ac 0
powercfg /change monitor-timeout-ac 0
powercfg /change hibernate-timeout-ac 0
Start cTrader automatically after a reboot
cTrader is a desktop app, so it needs an interactive session. It cannot run as a Windows service. After a reboot you need two things: an automatic sign-in and a launch at logon.
- Automatic sign-in: use Sysinternals Autologon (
Autologon64.exe). It stores the password encrypted in LSA secrets instead of plain text in the registry. Set a strong password, because anyone with console access will land on a signed-in desktop. - Launch at logon: place a shortcut to cTrader in
shell:startup. You can also create a scheduled task with the trigger At log on for that user and a 60-second delay so the network is up first. Our guide to launching apps automatically at sign-in walks through both methods.
When cTrader starts, it can restore cBots that were running when it closed, depending on your version and settings. Test this: reboot with Restart-Computer, reconnect after a few minutes, and check that every instance shows as running. If yours do not resume, note the instance parameters so you can restart them quickly.
Control Windows Update reboots
Unplanned update reboots are the second biggest cause of missed trades. In Settings > Windows Update > Advanced options, set active hours to cover the trading sessions you care about. On Server editions, you can also stop automatic restarts while a user is signed in:
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU'
New-Item $k -Force | Out-Null
Set-ItemProperty $k -Name NoAutoRebootWithLoggedOnUsers -Value 1 -Type DWord
Then patch by hand on the weekend, when forex markets are closed. The same approach is covered for MetaTrader in auto-restarting MT4 and MT5 after update reboots.
Add a simple watchdog
cTrader can crash or close without a reboot. A scheduled task that runs every 5 minutes in the user's session can relaunch it. First run Get-Process | Where-Object Name -like '*trader*' to find the exact process name of your broker's build. Then save this script as C:\Scripts\ctrader-watch.ps1:
$name = 'cTrader' # match your Get-Process output
$lnk = "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\cTrader.lnk"
if (-not (Get-Process -Name $name -ErrorAction SilentlyContinue)) {
Add-Content C:\Scripts\ctrader-watch.log "$(Get-Date -Format s) restarting"
Start-Process $lnk
}
Register the task with the option Run only when user is logged on. This makes cTrader open on the desktop where you can see it, not in a hidden session. The log file shows how often restarts happen. Frequent restarts usually point to a memory leak in a cBot or too little RAM for the server.
FAQ
Do cBots keep running when I close Remote Desktop?
Yes, if you close the RDP window. That only disconnects the session. Signing out closes cTrader and stops all cBots.
Can I run several brokers' cTrader builds on one VPS?
Yes. Each broker's build installs separately and runs side by side. Watch RAM, because each instance and each running cBot adds to memory use.
Does a cBot need the chart window open?
The cBot needs cTrader running and logged in, but the window can be minimized. Keeping fewer charts open saves memory on a smaller VPS.
Run this on your own Windows VPS
Get a Windows VPS from WindowsVPS in about 60 seconds, with full Administrator access over RDP, NVMe storage and the Windows license included.
Written by the WindowsVPS Team
We run Windows Server VPS hosting and write these guides from the same setups our customers use: RDP, PowerShell, trading terminals and always-on bots. Questions about a guide? Contact us.