Need help claiming server - docker container

Server Version#: 1.41.9.9961
running Plex in Docker container using plex - LinuxServer.io compose file on Intel n150 and OpenMediaVault 7-7-13-1

Update: also tried the official Plex docker implementation with the claim code imbedded in the compose file (and loaded with the 4 minute claim code expiration time) - still unable to get claim server to work.

Unable to claim server. Claim Server button does nothing. Logged out of Plex, and back in - same problem. Added claim code to Docker compose file - same problem.

Any advice on how to claim the server would be greatly appreciated!

run this inside the container.

It will stop PMS, you quick paste in the claim token, and let it communicate with Plex.tv for new credentials (token).

Info in the README.md

Thanks. I ran the script inside the docker container in the same folder as the preferences.xml file. It returned the following:

“Unrecognized host type. Cannot continue.”

Easy solution.

The script supports manual mode (Special use cases) in the README.

Special Usage cases

If your PMS configuration is not using one of the above predefined configurations, You may specify the path to the Preferences.xml file using the -p option.

Using -p "/path/to/Preferences.xml" bypasses host type checking.

However, it does confirm PMS is stopped and sufficient “root/admin” privilege is active.

Example:

[/tmp] # ./UserCredentialReset.sh -p "/mnt/docker/Plex/Library/Application Support/Plex Media Server/Preferences.xml"

This can be run from outside the container .. with it stopped.

I’m not the most experienced at Debian command line. Here’s my attempt at this:

root@openmediavault:/srv/dev-disk-by-uuid-8779471c-bc2d-40ae-beb1-a735eb79da9a/appdata/plex/config/Library/Application Support/Plex Media Server ./UserCredentialReset.sh -p /srv/dev-disk-by-uuid-8779471c-bc2d-40ae-beb1-a735eb79da9a/appdata/plex/config/Library/Application Support/Plex Media Server/Preferences.xml


root@openmediavault:/srv/dev-disk-by-uuid-8779471c-bc2d-40ae-beb1-a735eb79da9a/appdata/plex/config/Library/Application Support/Plex Media Server# ./UserCredentialReset.sh -p /srv/dev-disk-by-uuid-8779471c-bc2d-40ae-beb1-a735eb79da9a/appdata/plex/config/Library/Application Support/Plex Media Server/Preferences.xml
ERROR:  Cannot access given Preferences file '/srv/dev-disk-by-uuid-8779471c-bc2d-40ae-beb1-a735eb79da9a/appdata/plex/config/Library/Application'.
Exiting.

thanks for your patience!

It looks like you’re already in the directory containing Preferences.xml ??

If that’s true (looks like it)

./UserCredentialReset.sh -p ./Preferences.xml

That worked! The server is claimed.

Now the next wicket: the server is not showing up in the web app.

  • docker compose logs say the server is claimed, successfully started and running at [local ip address]:32400
  • web sign in page shows correct server address
  • when I go to the admin section of the web app the only server shown is my “old” server on another machine (which is shut down at the moment).

Any thoughts on what to do in order make the server in docker visible to my account?

Go into Server settings and enable Remote Access one time.
It will force it to Publish to Plex.tv.

The script also sets the Publish preference in Preferences.xml

Just kick it a few times, it’ll smarten up :slight_smile:

I think I need a bigger boot


so
 I have my “old” PMS running on a QNAP NAS at 192.168.4.51 called “wheelerNAS2” AND this new PSM running on a OpenMediaVault NAS at 192.168.4.89 called “OMV”

Only the wheelerNAS2 server is visible in the server list (see below)

My other “nearby” server is invisible, although I know it was claimed because of the previous steps.

I disabled and enabled remote access on the old server, but I cant do that on the new one because it’s not presenting itself.

Does that make sense?

restart the web app / player app (whichever you use)

I did a little ‘out for a walk’ in the woods :smiling_face_with_horns:

There were 5 in there.

The only recent one was “2”.

Now you can rename it as you deem appropriate.

Thanks so much for all of your ongoing help!

ok
 I closed the web app and restarted the docker container where the new plex server is running. I logged back into the web app.

I still only see the old “wheelerNAS2” server (that’s good - I want to keep that one). The new “OMV” server still is not showing up. I feel like I’m missing something obvious


On OMV, is that the native app or another Docker ?

When in a VM, the native app, with the repository enabled, is easier to maintain.
You don’t have another layer of networking to fuss with.

I use Linux Containers (incus). Each ‘host’, while it’s a container, has its own network stack (and separate IP)

This allows me to treat each as a separate host on the LAN.
Each one gets the Plex native (DEB or RPM) package installed.

What are you using with OMV? VM or Docker, or Docker in a VM (double trouble) ?

The OMV operating system is the host (at 198.168.4.89) - it’s not running in a container or virtual machine. Plex Media Server is running in a Docker container on the OMV server. The PMS is running in host mode, and has the same IP address as the OMV host

Thanks. that helps me a lot.

On OMV, whether Docker or LXC, it’s still a container so those rules always apply.

It’s been a while since I used Linuxserver images.

When you docker exec -it container_name bash to get the shell,
you should find /var/run/service/svc-plex (includes LSIO)

in the container, STOP Plex with s6-svc -d /var/run/service/svc-plex

Now you can safely run my UserCredentialReset.sh script

It should recognize where Preferences.xml is.
if not, use the -p option.

e.g ./UserCredentialReset.sh -p /path/to/Preferences.xml and it will assume you know what you’re doing.

At that point, go get a claim token from Plex.tv/claim,
Paste it into the awaiting command line and hit enter.

It should respond quickly with your Plex Username and Email to confirm the handshake is complete.

Now you can restart the container or just bring up PMS with
s6-svc -u /var/run/service/svc-plex

I was able to claim the server with the script

then I restarted the server and checked the logs. Everything looked good:


but when I open the web app and go to server settings, the OMV server is not there

Stop the server.

Look at Preferences.xml

Search for key PublishServerOnPlexOnlineKey="1"

Let me know if it’s not there.

(this flag, when present, tells pms to talk to Plex.tv (publish IP addresses) before Remote Access is enabled. (Normally a server on a different subnet WILL NOT be visible until Remote Access is enabled).

( Network broadcasts looking for servers do not cross subnet boundaries – per rules of TCP/IP)

I tried starting from scratch:

  • I deleted the PMS docker container and all the supporting folders
  • I rebuilt the PMS docker container, then started the PMS server
  • When I logged into the web app, the new PSM instance was visible, and the app was at the setup screen for new servers. I named this new PMS server “plexOMV”
  • I set up two media libraries on plexOMV, one for music, and another for movies.
  • In the web app the plexOMV server was marked unclaimed
  • I shut down the plex server container using Docker Compose
  • I entered the container and followed the instrcutions to run UserCredentialReset.sh -p Preferences.xml. The code returned claim successful with my plex username and email.
  • I restarted the plex server using Docker Compose
  • When I logged back into the web app this new server was missing. Same behavior as previous attempt.

also, yes, the Preferences,xml file DOES contain the PublishServerOnPlexOnlineKey=“1” key

I should mention that in order to verify my Docker instance is set up correctly I deployed two other unrelated containers. Both worked as expected.

Solved -

I retraced all my steps in setting up this new server. I discovered a missing internet gateway address in the NIC setup. I added this information and rebooted. upon logging back into the Plex app, the “plexOMV” server is visble and claimed.

Thank you @ChuckPa for your time and patience!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.