Skip to main content

How to Keep Your VPS Session Active Indefinitely (Windows Server)

Stop RDP sessions from timing out: adjust Windows Server session time-limit policies so your platforms keep running.

This guide shows you how to keep your Windows Server session active indefinitely — even after you disconnect from Remote Desktop — by configuring session time-limit policies in the Local Group Policy Editor.


Step-by-Step: Configure Session Time Limits via Group Policy


Step #1: Open the Start Menu

Click the Start Menu or press the Windows key.

In the search bar, type group, then click Edit group policy.

Start menu search results showing Edit group policy


Step #2: Open the Local Group Policy Editor

The Local Group Policy Editor window will open, showing several folders in the left pane.

Local Group Policy Editor window with folder tree on the left


Step #3: Expand Administrative Templates

In the left panel:

  1. Click Computer Configuration to reveal more folders below it.

  2. Expand Administrative Templates

Local Group Policy Editor with Administrative Templates expanded


Step #4: Open Windows Components

Inside the expanded Administrative Templates, scroll down and click:

Windows Components

Administrative Templates with Windows Components selected


Step #5: Navigate to Remote Desktop Services

Scroll down until you find Remote Desktop Services, expand it, and click Remote Desktop Session Host.

Remote Desktop Services and Remote Desktop Session Host expanded in the policy tree


Step #6: Open Session Time Limits

Click Session Time Limits. You'll see several policy settings related to session timeouts.

Session Time Limits policy settings list


Step #7: Edit the Disconnected Session Setting

Right-click Set time limit for disconnected sessions and click Edit (or select it and click the policy setting link on the left).

Set time limit for disconnected sessions policy opened for editing


Step #8: Enable the Policy

  1. On the left, select Enabled. Once set, the End a disconnected session option at the bottom becomes editable.

  2. Make sure that option is left on Never.

  3. Click Apply.

  4. Click OK.

Policy window showing the setting as Not Configured
Policy window set to Enabled with End a disconnected session set to Never

Repeat this for all three of the following settings:

  • Set time limit for disconnected sessions

  • Set time limit for active but idle Remote Desktop Services sessions

  • Set time limit for active Remote Desktop Services sessions


Step #9: Open Command Prompt

After enabling the policy, open the Start Menu again and search for Command Prompt (or press Windows key + R, type cmd, and press Enter).

Start menu search results showing Command Prompt


Step #10: Update the Group Policy

Run this command and press Enter:

gpupdate /force

You should see:

Computer Policy update has completed successfully.
User Policy update has completed successfully.
Command Prompt showing policy update completed successfully

Result

Your Windows Server session will now remain active indefinitely, even if you disconnect from Remote Desktop.


Need Assistance?

Our support team is available 24/7. If you have any questions or run into issues, open a support ticket from your QuantVPS dashboard and we'll get back to you as quickly as possible.

Did this answer your question?