Unable to add server to my account

So, I have two servers in two locations (one at home and one at my father’s house).

I accidentally removed the one at my father’s house from my account, and I’m trying to figure out how to add it back.

I can connect to the server at his house, but when I log in, it ends up only showing my home server and not the one there…

Kinda confused by this…

Maybe this:

Oh, interesting thanks.

Just to be clear, what’s happening is that my browser is on the external IP address of the remote server, it has me log in, it stays on that IP address but it only shows the server on my home local network…

So if I run this on the server itself (it is linux) I would use 127.0.0.1 (localhost)?

Correct, and do let me know the outcome

any risks or potential bad outcomes?

Nope, either works or not

k. Fire in the hole!

1 Like

Ok it’s failing:

root@ReadyNAS:/apps/plexmediaserver# ./reclaim.sh
./reclaim.sh: 17: ./reclaim.sh: Syntax error: “(” unexpected

You sure it is a plain old bourne shell script?

Should be, and works nicely on both QNAP and OpenSuse

What Linux are you running?

root@ReadyNAS:/apps/plexmediaserver# uname -a
Linux ReadyNAS 4.4.157.x86_64.1 #1 SMP Wed Dec 19 09:35:08 UTC 2018 x86_64 GNU/Linux

Sadly no idea then, since not a ReadyNAS dude, but I’ll always accept PR’s to my Git, when/If you fix the script to match that OS

Did you rename the script btw?

Well… I just copied the contents from your repo, created my script, chmod on the file, ran it with relative path to the script. I know it is running the right one. I did a test of this:
root@ReadyNAS:/apps/plexmediaserver# cat test.sh

root@ReadyNAS:/apps/plexmediaserver# cat test.sh
#!/bin/sh -x
function hello()
{
echo hello
}

hello
root@ReadyNAS:/apps/plexmediaserver# ./test.sh
./test.sh: 2: ./test.sh: Syntax error: “(” unexpected
root@ReadyNAS:/apps/plexmediaserver#

I’m going to try running in bash. Maybe I get lucky!

OK! So, it actually works as a bash script! But I am getting an error; it gives me a 401 unauthorized when it tries to hit the claim URL with the token.

Looks like you have root axx on your fathers ReadyNAS (wich may be usefull for us).

Firstly when connecting to the Plex server on your fathers end are you using: NASIP:32400/web/index.html ? Of not chances are you are being redirected to plex.tv’s app that yet has to have your fathers server signed in again under settings -> general.

If thats not working, have you tried ssh tunneling in to get direct local access to the Plex Media Server. So forward port 32400 from the NAS to a port of your choice, either 32400 or just 8888. Then connect to the local servers webpage.

So if on say Ubuntu do: ssh -l IpOfReadyNAS -L 8888:127.0.0.1:32400

You can also do this if running putty but then go to the ssh - tunnels options to set that up.

Once logged on open a browser to: http://127.0.0.1:8888/web/index.html and see if you can get local access and re-log it into your account.

If that still doesn’t work it may require you to remove the entry in this key in Preferences.xml PlexOnlineMail="your@email.com", change it to: PlexOnlineMail="" and restart plex media server on the ReadyNAS. BE CAREFULL WHEN EDITING YOUR PREFERENCES FILE. MAKE A BACKUP FIRST! There is a chance that things will be reset if the file is not edited correctly.

1 Like

I have the port forwarded on his router, so I can access it from home.

So, when I log in there, the URL stays on his IP as you show above. I know it isn’t using plex.tv nor my own address.

Let me try removing that entry from the pref file and report back.

So, I appear to have a config.xml and not a Preferences.xml. Mine contains:

root@ReadyNAS:/apps/plexmediaserver# cat config.xml
<Application resource-id="plexmediaserver">
  <AppID>NETGEAR_GENIEAPP_000006</AppID>
  <Category>APP_CAT_MEDIA</Category>
  <Version>1.15.1.710-ece95b3a1</Version>
  <MinFirmwareVer>6.6.0</MinFirmwareVer>
  <Name>Plex Media Server</Name>
  <Author>Plex Inc.</Author>
  <RequireReboot>0</RequireReboot>
  <LaunchURL>http://localhost:32400/web</LaunchURL>;
  <InfoURL lang="en-us">https://www.plex.tv</InfoURL>;
  <ConfigURL/>
  <release-note>https://forums.plex.tv/t/plex-media-server/30447/last</release-note>;
  <LicenseInfo>https://www.plex.tv/about/privacy-legal/plex-terms-of-service/</LicenseInfo>;
  <DebianPackage>plexmediaserver</DebianPackage>
  <ServiceName>fvapp-plexmediaserver.service</ServiceName>
  <Description lang="en-us">Plex organizes all of your personal media so you can easily access and enjoy it.</Description>
  <UnSupportedSysType>RN202,RN204</UnSupportedSysType>
</Application>

There should be a Preferences.xml file under /apps/plexmediaserver/MediaLibrary/Plex Media Server

My suspicion is that the server is still considering it self logged in and thus throwing the 401 when you try to claim it.