User Tools

Site Tools


servers:plex

Information

  • Plex 1)
  • Media Server 2)

Prerequisites

Dependencies

New

wget -O '/tmp/plex-gpg.key' 'https://downloads.plex.tv/plex-keys/PlexSign.key' && sudo apt-key add '/tmp/plex-gpg.key' && echo 'deb https://downloads.plex.tv/repo/deb public main' | sudo tee '/etc/apt/sources.list.d/plexmediaserver.list' > '/dev/null' && cat '/etc/apt/sources.list.d/plexmediaserver.list' && rm -f '/tmp/plex-gpg.key' && sync
sudo apt install 'plexmediaserver'

Old

wget -O '/tmp/plexmediaserver.deb' 'https://downloads.plex.tv/plex-media-server-new/1.17.0.1841-d42cfa161/debian/plexmediaserver_1.17.0.1841-d42cfa161_amd64.deb'
sudo dpkg --install '/tmp/plexmediaserver.deb'

Firewall

  • 21/tcp is FTP
/usr/lib/firewalld/services/ftp.xml
sudo firewall-cmd --permanent --add-service='ftp' && sudo firewall-cmd --reload

Service

sudo systemctl enable 'plexmediaserver' --now

Settings

General

  • :!: Change local_root depending on how the drive gets mounted 3)
sudo -e '/etc/vsftpd/vsftpd.conf' && sudo systemctl restart 'vsftpd'
# Custom
local_root=/var/ftp/nas1/espionage724

Encryption Support

Generate Certs

  • Country: US
  • State: PA
  • Locality: Charleroi
  • Org Name: Realm of Espionage
  • Org Unit: NAS
  • YOUR Name: x
  • Email: x
sudo openssl req -x509 -nodes -days 730 -newkey rsa:2048 -keyout '/etc/ssl/certs/vsftpd.pem' -out '/etc/ssl/certs/vsftpd.pem' && sudo chmod '600' '/etc/ssl/certs/vsftpd.pem'

Enable Encryption

  • :!: ssl_ciphers can be set to HIGH or any supported OpenSSL cipher, but the higher the cipher, the higher the performance hit 4)
sudo -e '/etc/vsftpd.conf'
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
require_ssl_reuse=YES

ssl_ciphers=AES128-SHA
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO

rsa_cert_file=/etc/ssl/certs/vsftpd.pem
rsa_private_key_file=/etc/ssl/certs/vsftpd.pem

fstab

PARTUUID

  • Expects the NAS drive to be GPT
sudo blkid

fstab

  • :!: Change the x in PARTLABEL=
  • :!: This expects 1 drive each with a XFS partition
sudo mkdir -p '/var/ftp/nas1' && sudo -e '/etc/fstab'
# NAS
PARTUUID=x /var/ftp/nas1 xfs rw,relatime,attr2,inode64,noquota 0 2
sudo mount --all

Permissions

Files

  • :!: Verify the group name with the groups command 5)
sudo chown -R 'espionage724':'espionage724' '/var/ftp/nas'* && sync

SELinux

sudo semanage fcontext --deleteall "/var/ftp/nas1(/.*)?"
sudo semanage fcontext --add --type 'public_content_rw_t' "/var/ftp/nas1(/.*)?"
sudo restorecon -R -v '/var/ftp/nas1' && sync
3)
somehow ended up as nas2 in one install
4)
specifically on Oak with a Phenom II X4, HIGH caps around 60-70MB/s, whereas AES128-SHA is 70-80MB/s, and no encryption is 100-110MB/s
5)
in openSUSE it's users and Ubuntu is the username typically
servers/plex.txt · Last modified: 2019/10/06 18:12 by Sean Rhone