Clone wiki

Cubox-i / Plex Wheezy

New plex package.

There is a new plex package that is compatible with the armhf architechture you can try it at the following link:

I haven't tried it myself but it should work with minimal effort.

For help you can also check the plex forum (there is even a debian package available in this thread):


The new raspberry pi 2 also contains an armv7 processor, theses instructions will also work for it if you install raspbian as a base

This is a small how-to on how I proceeded to install plex media server on my cubox-i.

Please note that this is just a dump of all the commands. This might be a little bit confusing.

The cubox-i comes with an armv7 architechture and there is no plex package for it.

The base idea of this document is to create a chroot environment with the armel architechture so the cubox-i can run a version of plex media server that is compiled for the arm architechture (armv5), the drobo package per instance.

I created this howto on Debian Wheezy for the cubox-i. Here is my installation procedure: Debian Wheezy

I suggest using the latest debian image from


  • I am no linux expert everything is created as root user here, I'm just learning and having fun
  • Everything is done as ROOT this is probably a really bad idea
  • This is just an experiment
  • Please understand that english is not my primary language.
  • I am not responsible for any damage done to you, your cubox-i or your pet.

Install Plex Media Server into a chroot

Setup the chroot environment

apt-get install debootstrap
debootstrap --no-check-gpg --arch=armel wheezy /chroots/wheezy-armel

Setup bind mounts to make it easy

In your main system add the following lines in your /etc/fstab

# Chroot bind mounts
/home            /chroots/wheezy-armel/home            none bind 0 0
/mnt             /chroots/wheezy-armel/mnt             none bind 0 0
/tmp             /chroots/wheezy-armel/tmp             none bind 0 0
/proc            /chroots/wheezy-armel/proc            proc defaults 0 0
/dev             /chroots/wheezy-armel/dev             none bind 0 0
/dev/pts         /chroots/wheezy-armel/dev/pts          none bind 0 0

Mount your fiesystem

mount -a

Installing plex in your chroot

Go in your chroot

chroot /chroots/wheezy-armel/

Add chroot indication in prompt

echo wheezyArmel > /etc/debian_chroot

Exit and reenter in your chroot and your prompt will look like this: (wheezyArmel)root@cubox-i:

Correct the locales

apt-get install locales
locale-gen en_US en_US.UTF-8 hu_HU hu_HU.UTF-8
dpkg-reconfigure locales

Fix some ischroot issues

dpkg-divert --divert /usr/bin/ischroot.debianutils --rename /usr/bin/ischroot
ln -s /bin/true /usr/bin/ischroot

Download and extract plex

I did pick as a base the Drobo build which is compatible arm / armel architechture

cd /tmp
mkdir plex
cd plex
tar -zxvf plex.tgz 
mkdir -p /opt/plex/
mv Application/ /opt/plex
mkdir -p "/opt/plex/Library/Application Support"

Create a plex launcher

vi /usr/local/bin/plexmediaserver

Paste this inside

export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8"
export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/opt/plex/Library/Application Support"
ulimit -s 3000
/opt/plex/Application/Plex\ Media\ Server

Make it executable

chmod +x /usr/local/bin/plexmediaserver

Check that plex is running correctly from inside the chroot

plexmediaserver &

You should have access to your plex server at the following address

http://<<Your IP Address>>:32400/web/index.html

Make plex startable from the host system

Go back to your host system (exit the chroot)


Install dchroot

apt-get install dchroot

edit (or create) /etc/dchroot.conf

vi /etc/dchroot.conf

and add

# wheezyArmel chroot
wheezyArmel /chroots/wheezy-armel

edit /etc/schroot/schroot.conf

vi /etc/schroot/schroot.conf 

and add

description=Contains the PLEX  program

Now you should be able to start plex from the main host with the folowing command

dchroot -c wheezyArmel -d /usr/local/bin/plexmediaserver --directory /

Make plex start seamlessly

Create a chroot "caller"

vi /usr/local/bin/do_chroot

paste the following

for i in "$@" ; do
ARGS="$ARGS '$i'"

exec dchroot -c wheezyArmel -d -q "`basename $0`" "$ARGS" --directory /

Make it executable

chmod +x /usr/local/bin/do_chroot

Make a link to plexmediaserver.

ln -s /usr/local/bin/do_chroot /usr/local/bin/plexmediaserver

This looks like black magic, but the do_chroot will read the link name from the prompt and execute the same command in the chroot environment

Now you should be able to seamlessly start plex from the main host

plexmediaserver &

Auto start plex with your cubox-i

Create an init.d script

vi /etc/init.d/plexmediaserver

Paste the following

# 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
#                    Many thanks to the great PlexApp team for their wonderfull job !
# Author:            Cedric Quillevere /
# Rewamped           Christian Svedin /
# Adapted (cubox-i)  Francis Belanger /
# Version:           1.2

# Read configuration variable file if it is present
[ -r /etc/default/plexmediaserver ] && . /etc/default/plexmediaserver

test -f "/usr/local/bin/plexmediaserver" || exit 0

plex_running=`ps ax | grep "/opt/plex/Application/Plex Media Server" | awk '{ print $1 }' | wc -l`

case "$1" in
        if [ "$plex_running" -gt 1 ]; then
                echo "Plex already running..."
                exit 0
        echo -n "Starting Plex Media Server: "
        su -l $PLEX_MEDIA_SERVER_USER -c "/usr/local/bin/plexmediaserver &" >/dev/null 2>&1
        sleep 1
        echo "done"
        if [ "$plex_running" -eq 1 ]; then
                echo "Plex Media Server is not running (no process found)..."
                exit 0
        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 -9 >/dev/null 2>&1
        ps ax | grep "Plex DLNA Server" | awk '{ print $1 }' | xargs kill -9 >/dev/null 2>&1
        sleep 1
        echo "done"
        sh $0 stop
        sh $0 start
        if [ "$plex_running" -gt 1 ]; then
                echo "Plex Media Server process running."
                echo "It seems that Plex Media Server isn't running (no process found)."
        echo "Usage: $0 {start|stop|restart|status}"
        exit 1

exit 0

Make it executable

chmod +x /etc/init.d/plexmediaserver

Update rc to enable your new script

update-rc.d plexmediaserver defaults

Reboot and voilĂ  Plex should start automatically with your cubox.

If you have issues loading the plex interface, try to delete the cache folder

rm -rf "/opt/plex/Library/Application Support/*"