Plex Media Server on ARMhf Routers

Works only on armhf routers with v4 kernel like RT-AC86U, RT-AX88U...
For other armel routers, use this PMS version
Tested with PMS v1.15.6.1079 on RT-AC86U running RMerlin firmware v384.11_2, hdd usb3, Optware & Entware

1 - Flash RMerlin firmware from here

2a - Install Optware-NG from here and choose 2GB swap file
or
2b - Install Entware-NG from here and choose 2GB swap file

3 - Setup Debian Stretch from here

4 - Enter chrooted debian with:

debian enter

5 - Update Debian

apt update && apt upgrade -y

6 - Install necessary packages

apt install wget libexpat1 apt-transport-https binutils gnupg zip

- Get pms gpg key

wget -O - https://downloads.plex.tv/plex-keys/PlexSign.key | apt-key add -

- Add Plex to sources.list

echo deb https://downloads.plex.tv/repo/deb public main | tee /etc/apt/sources.list.d/plex.list

- Update debian

apt update

10 - Install latest version of Plex Media Server

apt install plexmediaserver

11 - Create startup script

cat >> /etc/init.d/plexmediaserver << 'EOF'
#!/bin/sh
### BEGIN INIT INFO
# Provides: plexmediaserver
# Required-Start: $remote_fs $syslog $networking
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Plex Media Server
# Description: Plex Media Server for Linux,
# More information at http://www.plexapp.com
# Many thanks to the great PlexApp team for their wonderfull job !
# Author: Cedric Quillevere / origin@killy.net
# Rewamped Christian Svedin / christian.svedin@gmail.com
# Version: 1.2
### END INIT INFO
# Read configuration variable file if it is present
[ -r /etc/default/plexmediaserver ] && . /etc/default/plexmediaserver
plex_running=`ps ax | grep "\./Plex Media Server" | awk '{ print $1 }' | wc -l`
case "$1" in
start)
if [ "$plex_running" -gt 1 ]; then
echo "Plex already running..."
exit 0
fi
echo -n "Starting Plex Media Server: "
su -l $PLEX_MEDIA_SERVER_USER -c "/usr/sbin/start_pms &" >/dev/null 2>&1
sleep 1
echo "done"
;;
stop)
if [ "$plex_running" -eq 1 ]; then
echo "Plex Media Server is not running (no process found)..."
exit 0
fi
echo -n "Killing Plex Media Server: "
# Trying to kill the Plex Media Server itself but also the Plug-ins
ps ax | grep "Plex Media Server" | awk '{ print $1 }' | xargs kill -15 >/dev/null 2>&1
ps ax | grep "Plex Plug-in" | awk '{ print $1 }' | xargs kill -15 >/dev/null 2>&1
ps ax | grep "Plex DLNA Server" | awk '{ print $1 }' | xargs kill -15 >/dev/null 2>&1
ps ax | grep "Plex Tuner Service" | awk '{ print $1 }' | xargs kill -15 >/dev/null 2>&1
ps ax | grep "Plex Media Scanner" | awk '{ print $1 }' | xargs kill -15 >/dev/null 2>&1
ps ax | grep "Plex DLNA Server" | awk '{ print $1 }' | xargs kill -15 >/dev/null 2>&1
ps ax | grep "Plex Relay" | awk '{ print $1 }' | xargs kill -15 >/dev/null 2>&1
ps ax | grep "Plex Transcoder" | awk '{ print $1 }' | xargs kill -15 >/dev/null 2>&1
ps ax | grep "Plex Script Host" | awk '{ print $1 }' | xargs kill -15 >/dev/null 2>&1
sleep 1
echo "done"
;;
restart)
sh $0 stop
sh $0 start
;;
status)
if [ "$plex_running" -gt 1 ]; then
echo "Plex Media Server process running."
else
echo "It seems that Plex Media Server isn't running (no process found)."
fi
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
exit 0
EOF

Press ENTER

12 - Give right permission

chmod +x /etc/init.d/plexmediaserver

13 - Exit Debian

exit

14 - Add Plex to chrooted services list

echo "" >>/opt/etc/chroot-services.list
echo "plexmediaserver" >>/opt/etc/chroot-services.list
chmod 755 /opt/etc/chroot-services.list

15 - Start Plex from outside debian together with mounted external folder

debian restart

16 - Wait about 30 seconds then go to default router ip address and port :32400/web, like 192.168.1.1:32400/web or www.asusrouter.com:32400/web

17 - Create a free or paid plex account


18
 - Give server a name


19
 - Create a new library and point to /mnt as path, if you want to mount a samba share use this guide


Enjoy...


How to Install the Plex Unsupported App Store through WebTools

Enter chrooted debian

debian enter

Download and unzip webtools v3.0.0

cd /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/
wget https://github.com/ukdtom/WebTools.bundle/releases/download/3.0.0/WebTools.bundle.zip
unzip WebTools.bundle.zip
rm WebTools.bundle.zip

Go to default router ip address and port :33400, like 192.168.1.1:33400 or www.asusrouter.com:33400


Go to UAS and install some channels


Now go to Plex webpage, click on Channels and use UAS installed apps...


Source: htpcguides.com

REVIEW (CLICK ON THE STARS TO RATE!)
5
Sending
User Review
5 (9 votes)