Skip to content

jerieljan/plex-claim-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Claim your Linux Plex server from the shell (Synology + Plex via Package Center)

Introduction

The Plex Media Server setup requires you to link your new server to your plex.tv account. This is done by initially accessing your server from "the same network" [1]. This can be a little "complicated" on a remote headless server if you have never heard of an "ssh tunnel" before.

The script in this git repo just uses the same mechanics that are used by the official Plex Docker image [2]. In fact, the script is just a refactored version of the Docker script.

Pre-requisites

  • This guide assumes you're running Plex on a Synology NAS (otherwise, go to the original version of this script — this fork is just specifically for this case)
  • This guide also assumes you can SSH into your Synology NAS, and perform root commands.

Usage

NOTE: This version of this repository has been specifically updated for Synology NAS running Plex in DSM 7.x. See the differences in the script here

  1. Make a backup of your Preferences.xml if you already have an existing setup. This is available at /volume1/PlexMediaServer/AppData/Plex Media Server/Preferences.xml
  2. Remove the Preferences.xml file for a fresh start. Doing this will NOT remove your Plex libraries, settings or any content. If it ever fails, that's what the backup is for.
  3. Make the script executable: chmod +x plex-claim-server.sh
  4. Get your Plex Claim Code (it's only valid some minutes): https://www.plex.tv/claim/
  5. Claim your server: sudo ./plex-claim-server.sh "$YOUR_CLAIM_CODE"
  6. Restart your Plex Media Server, e.g., go to Package Center, locate Plex Media Server, Stop then Start.

Sidenote: I wasn't able to verify if it mattered, but also do a chmod 777 "/volume1/PlexMediaServer/AppData/Plex Media Server/Preferences.xml" because the permissions were 700 when it was generated by this script.

Advanced Usage

Set the environment variable PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR to tell the script about your non-default Plex setup.

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

[2] https://github.com/plexinc/pms-docker

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%