Overview
Plex is a local-first media server. See https://www.plex.tv for more information.
Installation
- Create Plex’s
apt
source:echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
- Update
apt
and install:sudo apt update sudo apt install plexmediaserver
Migrate Metadata Library
By default, Plex’s metadata library is located at /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/
. On systems with a small /var
partition, this can be problematic. To relocate the metadata library:
Stop Plex:
sudo systemctl stop plexmediaserver.service
Create a systemd override:
sudo systemctl edit plexmediaserver.service
This creates
/etc/systemd/system/plexmediaserver.service.d/override.conf
.Delete the contents of the file with Ctrl+Shift+K.
Add this line, replacing
DESTINATION_PATH
:Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=DESTINATION_PATH/Library/Application Support"
Exit and save.
Move the metadata:
sudo mv --verbose /var/lib/plexmediaserver/Library/ DESTINATION_PATH
Reload systemd manager configuration to use the new override:
sudo systemctl daemon-reload
Restart Plex:
sudo systemctl start plexmediaserver.service
Configuration
- Browse to
http://<LOCAL-SERVER-IP>:32400/web/index.html
replacingLOCAL-SERVER-IP
- Complete setup.