Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Re-authorized server to Plex account!

Instructions tested on plex version 1.20.0

I got a little trigger-happy when removing authorized devices, and I removed my primary Plex server from my account. So all my libraries went offline. Prompt asking to remove server from authorized devices
list This is the screen that you see if you do this. It looks very close to the regular "Remove Device" prompt. Prompt to remove
device So if you detach the server from your account, there is a way to recover!

Recovering from detaching your Plex server from your account

Stop Plex services. In my environment, that was.

sudo systemctl stop plexmediaserver.service

Remove the account information in the settings file. For me, that was /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Preferences.xml Remove these entries:

  • PlexOnlineHome="1"
  • PlexOnlineMail="jane@example.com"
  • PlexOnlineToken="RanDoMHexIDecIALtoKeNheRE"
  • PlexOnlineUsername="ExampleUser"

And yes, I'm lifting these from reference 1. Start the service again. To configure the service again, you need to access it on hostname "localhost," which of course is the local host. So if you're running it headless, you will need to ssh in with port forwarding.

ssh -L 8888:localhost:32400 plexhostnameorip

Then you can visit http://localhost:8888 Now you can navigate through the settings and make sure you choose to claim this server to attach it to your account.

References

Weblinks

  1. Why am I locked out of Server Settings and how do I get in? | Plex Support
  2. Installation | Plex Support

Comments