How do I add a newly-configured Linux server to my account?

I am completely flummoxed by the support documentation. I have set up a new Linux server. I want to add it to my Plex account. I go to http://address-on-my-local-network:32400/web, and it says “Not authorized You do not have access to this server.” The support article it links to says nothing about how to authorize the server.

To be clear, I want to have access to my old server and my new server. I want to say in my account “please also connect to that additional server over there”.

I’m using the current Plex app for the Mac, and also for iOS.I have spent over an hour in the docs, and have gotten nowhere.

Try using the User Credential Reset utility.

Thank you, but is this really needed? The copious documentation makes it seem like I should be able to add a server, but doesn’t say how (or says how without saying where the supposed command is).

It works, it is easy, and it will claim the server (add it to your account). If it fails, it provides a relevant error message. Run it on the new server, not the existing one (I failed to mention that). Three commands: wget, chmod, and run the script. Example: Unable to access server after password reset - #99 by FordGuy61 (ignore the Synology stuff, see the example on an Ubuntu PC).

Should it be needed? No, but the normal claim process is not working - http://pms_ip_addr:32400/web.

You can also try brute forcing it:

  1. Stop PMS on both servers.
  2. On the new server, rename preferences.xml to preferences.old (or just delete it).
  3. In Authorized Devices, delete the new server (if listed) and any unused/outdated servers.
  4. Start PMS on the new server.
  5. Login and claim the new server - http://pms_ip_address:32400/web ← use http
  6. Start PMS on the existing server.

I wrote the documentation so folks understand how it works in all the supported environments regardless of their Linux command line skilll level.

As stated by FordGuy, If you and the server are on the same RFC-1918 LAN – AND – normal claiming provided by that RFC-1918 LAN doesn’t work, then this is how y ou do it – UNLESS – you want the curl command to claim it at an even lower level. ( I will provide if requested )

  1. Download the file
  2. Extract the tar.gz (if that’s what you got)
  3. sudo ./UserCredentialReset.sh
  4. Follow the instructions it provides.

OK, thanks. I think the part I was missing was that the inability to do it normally is a known, long-standing problem that someone had to make a complicated "just download this script and trust it” solution for. Thank you for doing that.

I’m trying to work out a simple solution for the company to adopt.

  1. We link all our devices by a 4 character code

  2. What I’m trying to work out now is for when you need to reclaim the server.

  3. I’m in between the original :
    – Username:
    – Password:

OR

  1. 4 character code your phone got from the server when you tried to access it.

  2. Username/password fields for you to type in (on your phone/tablet)

For this to work, Your phone/tablet either signs into your Plex account (user/pass) -OR- is already signed in and you only need the 4 character code to grab the server .

@ChuckPa Just want to thank you bud ! You just ended about a week of pain.
I used to run PMS through UnRaid as container and it worked fine. Now on Proxmox I redone everything and have struggled so much. I have tried to install and get PMS claimed on about 20 odd installs, on 2 difference hosted methods (LXC containers, VM). On the LXC containers I have tried to use the helper scripts and now manual scripting. I have nearly given up hope and started to search for another product.
Please make this KNOWN to the world.
You rock tx.

@nzbrobot

Glad I could help.

For ProxMox, I use the TTECK helper scripts (someone told me about it)

From there, if needed, I just drop in my UserCredentialReset tool.

That tool, as part of claiming the server, also sets a config flag which tells PMS to advertise itself even if no library sections defined

There’s always the documented method of using the “On a Different Network” info described in the installation documentation, but why bother with that?

https://support.plex.tv/articles/200288586-installation/#toc-2

Yeh I used the TTECK helpers for all the other containers (sab/arr’s) and tried plex one. But the claim messed it up - tried a few ways to get the token into the preferences file. It would just wipe it every time. Reading what @pshanew wrote might have also solved it. regarding setting up a tunnel to the plex server and hitting the localhost on the port. As my plex is in another vlan to where my gaming pc was where I ran the claim from. What made me not think of it was that currently its full traffic flow between the two vlans. No real rules blocking it.
Trying to write up some ansible to do all of this automagically - if I loose my stuff I can just rerun and I am back.

It’s not a question of traffic flow/routing. It’s a matter of the client being on a different network than the server. If they are, claiming will not work via the “normal” method. You must be on the same network for claiming (or use the documented workaround). Unless you use a hack such as the claim script.

It’s simply amazing to me how many hacks/workarounds have been created to solve the simplest problems when the correct, documented methods are applicable 95% of the time. Folks always assume they’re in the 5% for some reason without even looking at the docs. Or just ignore it.

Plex is very fussy about the preferences file.

  1. You must use a linux editor. Windows editors insert CR/LF (2 bytes) which breaks it at each End-of-line.
  2. There are two easy methods.

Method 1.

  • Put UserCredentialReset.sh into the container and run it
    – It will take the claim token you give it
    – Talk to Plex.tv
    – Clear out the old claiming info
    – Write new credentials (username, email, token) into Preferences.xml

Method 2. (the manual method)

  • Stop PMS
    – Using “vi”, “nano”, or other linux editor in the container
    – Remove the Name="Value" pairs for:
    — PlexOnlineUsername
    — PlexOnlineMail
    — PlexOnlineHome
    — PlexOnlineToken
  • Start PMS
    – In your browser go to https://plex.tv/claim and get a new claim token
    – COPY it into the browser
    – Within 5 minutes, on the command line in the shell
    curl -X POST 'http://127.0.0.1:32400/myplex/claim?token=PASTE_TOKEN_HERE'
    – Hit enter and wait (it takes about a minute
    – You will see a dump of XML ending in </myplex>
  • The server is now claimed. It may not be “published”
    (Remote Access enabled/toggle will publish it)

Yes, I erased the posts.

I’m off topic.

I would like to chat with you via PM?