APP: Plex Media Server

Home Forums Operating Systems Linux APP: Plex Media Server

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #845
    Voodoo
    Keymaster

    Download Latest Plex Media Server:
    Plex Media Server for Linux Ubuntu AMD64

    Install via Terminal:

    sudo apt install ./home/%USER%/Downloads/plexmediaserver_1.21.1.3830-6c22540d5_amd64.deb

    Add Plex Media Server Repositories for Updates:

    echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
    sudo apt install curl
    curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -

    Configure from WebBrowser by going to:
    IP:32400

    NOTE: If you configure for LAN access without authentication, then you will have to go to the /web/ directory such as:

    IP:32400/web/

    Default Metadata and Index Data are in the following directory:

    /var/lib/plexmediaserver/Library/Application Support

    Stop Plex Media Server:

    sudo systemctl stop plexmediaserver

    Start Plex Media Server:

    sudo systemctl start plexmediaserver

    Restart Plex Media Server:

    sudo systemctl restart plexmediaserver

    ———————————
    To save space on OS drive, you can move the Metadata and Index to a new location:

    sudo service plexmediaserver stop
    sudo service plexmediaserver start
    sudo service plexmediaserver restart

    Copy Metadata and Index Data to new location:

    sudo cp -rf "/var/lib/plexmediaserver/Library/Application Support" /new/dir/to/plex/

    Move old directory to .OLD in case of issues:

    sudo mv "/var/lib/plexmediaserver/Library/Application Support" "/var/lib/plexmediaserver/Library/Application Support.OLD"

    Create symbolic link to new directory:

    sudo ln -s "/new/dir/to/plex/Application Support" "/var/lib/plexmediaserver/Library/Application Support"

    Change owner of new location to plex:

    sudo chown -R plex.plex "/var/lib/plexmediaserver/Library/Application Support"

    Remove old Meta and Index Data files:

    sudo rm -rf "/var/lib/plexmediaserver/Library/Application Support.OLD"
    sudo cp -rf "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache" "/mnt/10TB/PMS/Cache"
    sudo cp -rf "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Media" "/mnt/10TB/PMS/Media"
    sudo rm -rf "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache"
    sudo rm -rf "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Media"
    sudo ln -s “/mnt/10TB/PMS/Cache” “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache”
    sudo ln -s “/mnt/10TB/PMS/Media” “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Media”
    • This topic was modified 2 months ago by Voodoo.
    • This topic was modified 2 months ago by Voodoo.
    • This topic was modified 2 months ago by Voodoo.
    • This topic was modified 2 months ago by Voodoo.
    • This topic was modified 2 months ago by Voodoo.
    • This topic was modified 2 months ago by Voodoo.
    • This topic was modified 2 weeks, 1 day ago by Voodoo.
    #944
    Voodoo
    Keymaster

    Stop the Plex Media Server Service:
    sudo systemctl stop plexmediaserver

    Mount the Media Drive (I mount it to /mnt/Media). I use the entry in fstab
    sudo mkdir /mnt/Media
    sudo chown -R plex:plex /mnt/Media
    sudo xed /etc/fstab

    # 12TB_WD Media
    UUID=0a878463-f0e7-4c7a-b4cd-ecafd127d406 /mnt/Media xfs noatime,rw,x-gvfs-show 0 0

    Now close the fstab and mount the drive:
    sudo mount -a

    Move the Plex Media Folder from original location “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server” to the Media drive “/mnt/Media/Plex Media Server”. If you do this by terminal, the command will be:
    mv -i "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server" "/mnt/Media/Plex Media Server"

    Again, take control of the folder:
    sudo chown -R plex:plex /mnt/Media

    Now set a link from the original to point to your new location:
    ln -s "/mnt/Media/Plex Media Server" "/var/lib/plexmediaserver/Library/Application Support"

    Start your Plex Media Service again:
    sudo systemctl start plexmediaserver

    Set RamDisk for Plex Transcoding:
    sudo mkdir /mnt/RamDisk
    sudo chown -R plex:plex /mnt/RamDisk
    sudo xed /etc/fstab

    
    # 8GB RamDisk for Plex Transcoding. Change X in ,size=XG, for the size you like
    RamDisk  /mnt/RamDisk  tmpfs  defaults,size=8G,x-gvfs-show  0  0

    Now close the fstab and mount the drive:
    sudo mount -a

    • This reply was modified 3 weeks, 1 day ago by Voodoo.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar