How to keep programs running 24/7 on a Windows VPS
One reason people rent a Windows VPS is to run software all day. Two small things decide whether it really does: how you leave the session, and what happens after a restart.
Disconnect, do not sign out
When you finish, there are two very different ways to leave:
- Disconnect (close the Remote Desktop window). Your session stays alive on the server. Your programs keep running. Next time you connect, you land back where you left off.
- Sign out (log off). This ends your session and closes every program that was running in it.
So to keep a program running, close the Remote Desktop window with the X, or choose Disconnect. Do not use Sign out from the Start menu.
Programs after a restart
A server restarts for Windows updates, and sometimes for other reasons. After a restart, programs that were open are not open any more. To bring them back by themselves, use one of these.
Option 1: Task Scheduler (works for most programs)
- Open Task Scheduler from the Start menu.
- Click Create Task.
- On General, give it a name, and choose Run whether user is logged on or not if the program can run without a screen. Tick Run with highest privileges only if needed.
- On Triggers, click New and choose At startup (or At log on if the program needs your desktop).
- On Actions, click New, choose Start a program, and pick the program.
- Save, and enter your password when asked.
Test it by restarting the server once while you are watching.
Option 2: the Startup folder
For simple programs that need your desktop session, press Windows key + R, type shell:startup and press Enter. Put a shortcut to the program in that folder. It starts when you log in. This only helps if you log in after a restart.
Option 3: run it as a Windows service
Some software can install itself as a service. Services start with Windows, with nobody logged in, and are the most dependable choice. Check the program's own instructions.
Control restarts
Windows can restart for updates at a time you did not choose. Set active hours in Windows Update settings so it avoids your busy times. Do not turn updates off, because that makes the server less safe. See how to secure a Windows VPS.
Check on it
- Open Task Manager to see whether the program is running and how much memory and CPU it uses.
- If your program keeps crashing, a plan with more memory may help. See how to choose a plan.
Frequently asked questions
Do programs keep running when I close Remote Desktop?
Yes, if you disconnect. They stop if you sign out.
What if the server restarts?
Programs close during a restart. Set them to start automatically with Task Scheduler or as a service.
Will my server turn off by itself?
No. A VPS stays on. It only restarts when Windows needs to, or when you restart it.
Related guides
Ready for your own Windows VPS?
Plans from $15 a month. Most servers are ready 45 to 60 minutes after payment, and every purchase has a 14-day refund.
See plans and pricing