---
title: 'How to configure idle RDP session timeout | Zomro'
description: 'After running the desired program on the remote VPS, and closing the RDP connection, some programs stop working because the idle remote desktop session will be...'
image: 'https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48@server-panel.net/2023/02/01/1675236058_1.png'
---

![opened image]()

  * [Zomro](https://zomro.com/)
  * [FAQ](https://zomro.com/blog/faq/)
  * How to configure idle RDP session timeout 



# How to configure idle RDP session timeout

31-01-2023

After running the desired program on the remote VPS, and closing the RDP connection, some programs stop working because the idle remote desktop session will be terminated after a short time.  
In this article, we will see how to set the maximum amount of time an active Remote Desktop Service session can be idle (without user input) before it is automatically disconnected.  
  


## **Through the Local Group Policy Editor**

1\. Open the Local Group Policy Editor for all users.

  
To launch the Group Policy Editor in Windows Server, run the following command in the Run window: **gpedit.msc**  
  
2\. In the left pane, click to expand User Configuration, Administrative Templates, Windows Components, Remote Desktop Services, Remote Desktop Session Host, and Session Time Limits.  
  
![How to configure idle RDP session timeout - 1](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48@server-panel.net/2023/02/01/1675236058_1.png)

3\. In the right pane, right-click "Set time limit for active but idle Remote Desktop Services sessions" and click "Edit".  
  
![How to configure idle RDP session timeout - 2](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48@server-panel.net/2023/02/01/1675236058_2.png)

### **4\. Remove Time Limit for Idle Remote Desktop Services Sessions**

###   
Select "Not Configured" or "Disabled". The default value is "Not Configured".  
  
![How to configure idle RDP session timeout - 3](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48@server-panel.net/2023/02/01/1675236083_22.png)

### **5\. To set a time limit for idle Remote Desktop Services sessions:**

Select Enabled.  
  
In the "Options" section, click the "Idle session limit" dropdown and select the time you want to set as the time limit.  
  
![How to configure idle RDP session timeout - 4](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48@server-panel.net/2023/02/01/1675236114_3.png)  
  
6\. Click OK.  
  
![How to configure idle RDP session timeout - 5](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48@server-panel.net/2023/02/01/1675236115_4.png)

After these changes, you can restart the server.

## **Through the registry editor**

  
1\. Open the Start menu, then type **regedit** in the search box and press Enter.  
  
2\. If prompted by UAC, click Yes.  
  
3\. In **regedit** , navigate to the location below:
    
    
    HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows NT\\Terminal Services
    

  
![How to configure idle RDP session timeout - 6](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48@server-panel.net/2023/02/01/1675236230_5.png)

### **4\. To set a time limit for idle Remote Desktop Services sessions**

  
In the right pane of Terminal Services, right-click an empty space, select New and DWORD (32-bit) Value, type **MaxIdleTime** , and press Enter. (see screenshot below)  
  
![How to configure idle RDP session timeout - 7](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48@server-panel.net/2023/02/01/1675236158_6.png)![How to configure idle RDP session timeout - 8](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48@server-panel.net/2023/02/01/1675236176_7.png)  
  
In the right pane, right-click **MaxIdleTime** and select **Modify**.

  
  
![How to configure idle RDP session timeout - 9](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48@server-panel.net/2023/02/01/1675236218_8.png)

### Select **Decimal** , then enter the registry value in the table below for the amount of time you want to set as the time limit and click OK.  
  
![How to configure idle RDP session timeout - 10](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48@server-panel.net/2023/02/01/1675236272_9.png)  
  
  
**5\. Remove Time Limit for Idle Remote Desktop Services Sessions**

  
In the right pane, right-click **MaxIdleTime** and select **Delete**.  
  
![How to configure idle RDP session timeout - 11](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48@server-panel.net/2023/02/01/1675236264_10.png)

6\. Close the registry editor.  
  
7\. Log out and log back in or restart your computer for the changes to take effect.

## **Via PowerShell**
    
    
    reg add "HKLM\\software\\policies\\microsoft\\windows nt\\Terminal Services" /v MaxIdleTime /d 0 /t REG_DWORD;
    

  
Then restart the server. Or a terminal server.
    
    
    net stop TermService /y; net start TermService /y;
    

  
Now your terminal session will not close when there is no activity.

We also suggest you other useful articles:

  * [How to view RDP connection logs in Windows Server 2016, 2019](https://zomro.com/blog/faq/277-how-to-view-rdp-connection-logs-in-windows-2016-2019)
  * [How to enable previous session restore on Windows Server 2016, 2019?](https://zomro.com/blog/faq/311-kak-vkljuchit-vosstanovlenie-predyduschej-sessii-na-servere-windows-server-2016-2019)
  * [How to configure idle RDP session timeout](https://zomro.com/blog/faq/298-kak-zadat-vremja-otkljuchenija-bezdejchtvujuschih-seansov-rdp)
  * [Disable UDP for RDP connections to Windows Server](https://zomro.com/blog/faq/429-dissable-udp-for-rdp-on-windows)



Similar articles:

[How to grant access to Windows Server by IP or IP range](https://zomro.com/blog/faq/337-kak-ogranichit-dostup-k-windows-server-po-ip) [Installation Pterodactyl panel in CentOS 7](https://zomro.com/blog/faq/463-installation-pterodactyl-panel-in-centos-7) [Configuring backups in the ISPmanager panel](https://zomro.com/blog/faq/205-nastrojka-bekapov-v-paneli-ispmanager) [Error 504 524 Gateway Timeout (solved)](https://zomro.com/blog/faq/226-oshibka-504-524-gateway-timeout) [How to connect to Windows Remote Desktop using macOS](https://zomro.com/blog/faq/194-kak-podkljuchitsja-k-udalennomu-rabochemu-stolu-windows-sredstvami-macos)

[ Forex Server from €7.95/mon ](/server-for-forex)
