Plex media server allows you to aggregate all your personal media and access it anywhere you go.
First you must connect to your slot via ssh. If you need help connecting to the server, please read the help article here.
Installing Plex on your slot is easy. Simply issue the following command:
sudo box install plex
As of v1.6.0, swizzin now supports claiming your server during the installation. When you install Plex, you'll be greeted by the prompt:
Please visit https://www.plex.tv/claim, login, copy your plex claim token to your clipboard and paste it here. This will automatically claim your server! Otherwise, you can leave this blank and to tunnel to the port instead.
Simply visit the link to grab your claim code and paste it into the terminal. After Plex is installed, the script will use the claim code to grab a valid token for your user and apply it to your server.
Post-install automatic claiming
If for some reason you didn't claim during installation, you can still run the command manually from SSH.
claim="<your plex.tv/claim code>" #Change this value.
The function will run and if all goes well, you'll receive a
success message stating that your server as been claimed under your account.
After installation, you'll need to create an SSH Tunnel to your server to appear as if you're using the same network as your Plex instance.
If you've gotten this far, I'll assume you don't need any reminders on how to connect to the server via SSH ;) However, creating an SSH tunnel takes a bit more effort than simply creating an SSH Connection.
- Linux & OSX
- Open a command prompt or terminal
- Enter the command:
ssh firstname.lastname@example.org -L 8888:localhost:plexport
- Open your browser window and navigate to
- The browser will connect to your Plex server and let you know that there is an unclaimed server on your network.
Please be aware that cmd.exe now ships support for SSH out of the box, so you can very likely use the instructions in the previous tab. If you don't have
cmd, then use PuTTY.
- Open up your PuTTY client again.
- Under gateway, enter the hostname of your server, e.g.:
- Configure the tunnel:
- On the left hand side, navigate to
Connection > SSH > Tunnels
- Under source port, enter
- Under destination, enter
- On the left hand side, navigate to
- Connect to the server by clicking
- PuTTY will prompt you for your username and password like a regular SSH session.
- Once connected, open your browser and navitage to
The browser will connect to your Plex server and let you know that there is an unclaimed server on your network.
The systemd service file resides at:
It is not recommended to make edits directly to this file. If you must, please use an override (i.e.
systemctl edit plexmediaserver)
sudo systemctl status plexmediaserver
sudo systemctl start plexmediaserver
sudo systemctl stop plexmediaserver
sudo systemctl restart plexmediaserver
sudo systemctl enable plexmediaserver
sudo systemctl disable plexmediaserver
Adding more users' media to Plex
Plex runs as the user
During the installation, only the master user is present in this group.
In order to access non-master-user files cleanly, please add the plex user to the group of users who can access the desired user's files, and ensure that this group has access to the media you would like to access.
usermod -a -G <aUser> plex
chmod g+rx -R /home/<aUser>
You will notice that Plex releases new server installers quite regularly and often. You can handle these either on your own via
apt, or you can run
box upgrade plex which will install an automatic update job, and even allow you to use the beta Plex Pass releases if you desire. Feel free to re-run it any time you want it to upgrade again.
Connect to other clients
If you need to link your Plex instance to another application, such as Sonarr or Tautulli, you can use the following details:
Port: <your plex port>