Plex Media Server on AsusWRT Arm Routers

Works only on arm routers like RT-AC56U, RT-AC68U, RT-AC87U, RT-AC3200, RT-AC5300...

No transcoding capabilities, just direct play on supported devices, like LG, Samsung TVs, Plex Android App...

Tested on RT-AC68U rev A2, RMerlin firmware v380.57, hdd usb3, Optware-NG & Entware-NG
Latest working version is 0.9.16.6, Plex no longer support ARMv5 used in this tutorial, please don't ask here for updates.

1 - Flash Rmerlin firmware from here

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

Install necessary packages

ipkg install nano findutils

or

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

Install necessary packages

opkg install nano findutils

3 - Setup Debian Jessie from here

4 - Enter chrooted debian with:

debian enter

5 - Update Debian

apt update && apt upgrade -y

6 - Install necessary packages

apt install wget zip bzip2 libexpat1 -y

- Download and install Plex Media Server

mkdir -p /apps && cd /apps
wget -c -O PlexMediaServer-0.9.16.6.1993-5089475.tar.bz2 http://bit.ly/2KEmWl1
bzip2 -cd PlexMediaServer-0.9.16.6.1993-5089475.tar.bz2 | tar -xv
mv ./PlexMediaServer-0.9.16.6.1993-5089475 ./plex && rm ./PlexMediaServer-0.9.16.6.1993-5089475.tar.bz2

- Fix library path and start script

sed -i 's|ulimit.*|export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/var/lib/plexmediaserver"\n&|g' /apps/plex/start.sh
sed -i 's|.\/Plex\\ Media\\ Server|\/apps\/plex\/Plex\\ Media\\ Server|g' "/apps/plex/start.sh"

- Fix permissions of lib files

cd /apps/plex
find . -iname "*.so" -exec chmod 644 {} \;
find . -iname "*.so.*" -exec chmod 644 {} \;

10 - 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
# Adapted by TeHashX / contact@hqt.ro
# Version: 1.3
### END INIT INFO
test -f "/apps/plex/start.sh" || exit 0
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: "
/apps/plex/start.sh & >/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 >/dev/null 2>&1
ps ax | grep "Plex*" | awk '{ print $1 }' | xargs kill >/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

11 - Give right permission

chmod +x /etc/init.d/plexmediaserver

12 - Exit Debian

exit

13 - 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

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

debian restart

15 - 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

plex-1

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

To be continued with the rest of setup if requested by user...

 

How to Install the Plex Unsupported App Store

Enter chrooted debian

debian enter

Download and unzip unsupported app store

cd /apps/plex/Resources/Plug-ins*
wget -c -O UnSupportedAppstore.bundle.zip goo.gl/ywJ3cZ
unzip UnSupportedAppstore.bundle.zip && rm UnSupportedAppstore.bundle.zip

Go to Plex webpage, click on Channels and install apps...

plex-unsupported-app-store
Sources: htpcguides.com, linksysinfo.org

Be notified by email when a new tutorial is posted :)

Thanks for Subscribing! I'll keeping you up-to-date with latest tutorials!

Something went wrong, try again...