Daniel Ngu

Plex

Plex Media Server

prelink from AUR.
plex-media-server from AUR.

Configuration

Edit plexmediaserver.service
1
$ sudo vim /usr/lib/systemd/system/plexmediaserver.service

Set a maximum amount of memory by inserting a new line entry of MemoryLimit=2G

Edit iptables
1
2
3
$ iptables -A INPUT -p tcp -m multiport --dports 32400,32469 -j ACCEPT
$ iptables -A INPUT -p udp -m multiport --dports \
> 1900,32410,32412,32413,32414 -j ACCEPT
Enable plexmediaserver.service
1
$ sudo systemctl enable plexmediaserver.service

Storage

Directory Structure
1
$ sudo mkdir /shares
Drive Details
1
2
$ df -h
$ sudo blkid /dev/sdb1
/etc/fstab
1
2
# UUID=1f22599a-6b0f-4b90-81b0-4c471f761f47
/dev/sdb1    /shares    ext4    rw,relatime,data=ordered    0 3

Reboot

Directory Structure
1
2
3
4
5
$ cd /shares
$ mkdir plex
$ sudo chgrp plex plex
$ sudo chmod g+w,o-rx plex
$ sudo usermod -a -G plex daniel

Reference: Plex