Run Plex at boot using auto login/lock method

Verified Systems
Windows Server 2016 (Desktop Experience)
Windows 10

Setup Plex to run at logon

  1. Start Plex
  2. Open system tray
  3. Right-click the Plex icon
  4. Check start Plex Media Server at login

Setup auto-login

  1. Open Start menu/Search
  2. Search for and open regedit
  3. Navigate to HKEY_LOCAL_MACHINE/Software/Microsoft/Window NT/CurrentVersion/Winlogon
  4. Create or edit DefaultUserName (string) and set it to your username to run plex under
  5. Create or edit DefaultPassword (string) and set it to the password for the default user
  6. Create or edit AutoAdminLogon (string) and set it to 1
  7. Reboot to test if the auto login is working

Auto locking after login

  1. Open notepad as administrator
  2. Copy: rundll32.exe user32.dll,LockWorkStation
  3. Save as /Program Files/lock.bat (change file type to all files)
  4. Open group policy editor by searching for gpedit
  5. Navigate to User Configuration/Windows Settings/Scripts (Log on/Log off)
  6. Double click Logon then click add
  7. Brows for the script located at /Program Files/lock.bat and click ok
  8. Reboot to test that the computer locks after logon

Local management notice
When managing the server locally (instead of remotely using rdp) never log out as doing so will shutdown Plex. Always lock your server using key combination Win+L

If you want the password stored encrypted instead of clear text, use the Sysinternals “Autologon” tool to setup autologon for you.