Serviio 0.5.2 DLNA server on Synology NAS

last updated 24/08/2011 – fixed typos in locale section

This guide is now redundant – I have released a Synology package for Serviio 0.6!


Serviio is an excellent free Java DLNA media server by Petr Nejedly which focuses on minimizing the amount of unnecessary media transcoding, and maximizing the use of renderer devices’ supported features. Some of the more main-stream servers like Windows Media Player just brute-force everything to MPEG2 video and MP3 audio, which degrades quality and wastes power. Though some servers like Mezzmo are better and will play Matroska files, even they tend to transcode all audio to AC-3 regardless of source type. As a Java app Serviio will run on anything that has a JVM, and the media tool it relies on is the open source and therefore highly portable FFmpeg. All these design priorities make Serviio an ideal choice to run on a NAS device since, when paired with a renderer with good format support like a Sony Bluray Player, the NAS will barely ever be transcoding.

I was about to buy a new large external hard disk, but once I realised that Serviio could probably run on a NAS I started looking at one of these instead. Synology seemed to offer a lot of value and seemed to have the sort of user-community enjoyed by my old Linksys NSLU2, which I promptly sold on eBay for almost what I had paid for it in 2007. I considered the value DS110j model but I decided to go for the more expensive DS111 on the basis that the double CPU speed and RAM would probably be a wise move.

This guide outlines how to get Serviio 0.5.2 running on the Marvell Kirkwood ARM CPUs found in most of the 2011 product line-up, but Synology devices also exist with Freescale PowerPC and Intel Atom processors. The key problem is finding a Java virtual machine, but FFmpeg also needs compiling from source. This is because although there is an FFmpeg binary bundled with DSM 3.0, it’s too old and lacks support for features critical to Serviio. This guide could be used for other CPU architectures, but the compilation options for FFmpeg need adapting.

In the Synology DSM go to Control Panel > Terminal > enable SSH.

Read this Synology wiki document about modifying your NAS carefully and install the bootstrap for your model.

Download the PuTTY SSH client.

Connect to your NAS’s IP address using SSH. Use the root account (same password as admin). I suggest that you perform the mod at the bottom of this post to enable colour directory listings and a more descriptive shell prompt which should reduce the chance of accidentally being in the wrong directory.

We need to install the development tools. Type:

ipkg install optware-devel

It will halt and complain that package wget-ssl clashes with wget. Continue with:

ipkg remove wget
cp /usr/syno/bin/wget /opt/bin
ipkg install wget-ssl
ipkg update
ipkg upgrade
ipkg install optware-devel

This time it will finish successfully.

Update – It seems that there is a serious problem with running ipkg on a clean install of DSM 3.1. This guide was written before it was released, and though I have since upgraded my Synology I haven’t encountered that issue, but there have been many comments about it. User mayk on the Synology forum seems to have the solution here. Use the extra wget verbosity switch to find out the exact package URL for the following two packages, then manually download them with wget and install:

cd /volume1/@tmp
ipkg install -verbose_wget libidn
wget url1
ipkg install -verbose_wget wget-ssl
wget url2
ipkg install filename1
ipkg install filename2

Next we need to install Lame MP3 encoder, providing libmp3lame which FFmpeg will be compiled to depend on, and the Nano text editor (much easier to use than vi):

ipkg install lame
ipkg install nano

JamVM is a JVM that gets mentioned a lot in connection with NAS systems, but it’s only Java 1.5, and Serviio needs version 1.6. Download the Java SE Embedded Runtime from Oracle, selecting the ARM v5 Linux version (note that there is a PowerPC e500v2 version – the CPU core in Synology products which use the Freescale mpc85x3). Unfortunately for PowerPC Synology owners, this depends on a higher version of glibc than the Synology DSM provides for this architecture. Until JamVM supports Java 1.6, or Synology update to glibc 2.4 you won’t be able to follow this guide on PowerPC models. This may have changed since DSM 3.1 was released.

You will need to sign up to receive the download link by email. It’s free to use for non-commercial self-educational use. Use your computer to save it into the top level shared folder of your NAS, which will probably be /volume1/public on the NAS filesystem. Then:

cd /volume1/public
mv ejre-1_6_0_21-fcs-b09-linux-arm-sflt-eabi-headless-27_sep_2010.tar.gz /volume1/@tmp
cd /volume1/@tmp
tar xvzf ejre-1_6_0_21-fcs-b09-linux-arm-sflt-eabi-headless-27_sep_2010.tar.gz
mkdir /opt/java
mv ejre1.6.0_21 /opt/java

Synology’s Linux build has no localisation support built in, though it does use UTF-8 character encoding for the filesystem. That’s no problem for storage, however the Java VM inherits the locale setting of the host OS. Since this is undefined Serviio, and all other Java software, will default to US-ASCII which is a big problem if you have filenames with non-US characters. The solution is to obtain the missing files to add locale support from the Synology toolchain, which is distributed under the GPL:

#-----for ARM CPU
cd /volume1/@tmp
tar xvfz gcc421_glibc25_88f628x.tgz
cd arm-none-linux-gnueabi/arm-none-linux-gnueabi/libc/usr/bin
cp locale /opt/bin
cp localedef /opt/bin
cp -R arm-none-linux-gnueabi/arm-none-linux-gnueabi/libc/usr/share/i18n /usr/share
#-----keep another copy safe in case DSM is reinstalled later
cp -R arm-none-linux-gnueabi/arm-none-linux-gnueabi/libc/usr/share/i18n /opt/share
mkdir /usr/lib/locale
localedef -c -f UTF-8 -i en_US en_US.utf8

#-----for Intel CPU
cd /volume1/@tmp
tar xvfz gcc420_glibc236_pineview.tgz
cd i686-linux-gnu/i686-linux-gnu/bin
cp locale /opt/bin
cp localedef /opt/bin
cp -R i686-linux-gnu/i686-linux-gnu/share/i18n /usr/share
#-----keep another copy safe in case DSM is reinstalled later
cp -R i686-linux-gnu/i686-linux-gnu/share/i18n /opt/share
mkdir /usr/lib/locale
localedef -c -f UTF-8 -i en_US en_US.utf8

Now use nano to edit some configuration files (Ctrl-o saves, and Ctrl-x exits).
First edit the profile for all bash shell users:

nano /opt/etc/profile

Make the changes shown in bold:

# Bash initialization script

PS1=”[\u@\h \W]$ ”



Save and exit. Next edit the profile for all ash shell users (root):

nano /etc/profile

At the last line make the changes in bold:



Save and exit. Now install the Serviio application:

cd /volume1/@tmp
tar xvzf serviio-0.5.2-linux.tar.gz
mv serviio-0.5.2 /opt/serviio

In the DSM Control Panel got to Web Services > Web Applications tab > Enable Web Station.
Install AcidumIrae’s PHP web UI for Serviio. You will need to have enabled Web Station for the directory /volume1/web to exist.

mv serviio-0.5.2 /volume1/web/serviio

You should already be able to browse to http://your_NAS_IP/serviio and see the user interface, though it will complain with a big red X that Serviio is not running.

FFmpeg depends on the libbz2 and zlib libraries, and although both are installed along with the optware-devel package, FFmpeg will only look for them in /lib rather than in their actual location in /opt/lib. Copies of the existing symbolic links will be fine:

cp /opt/lib/ /lib
cp /opt/lib/ /lib

Compile the patched version 26303 of FFmpeg from the Serviio download page. Running cat /proc/cpuinfo it is clear that the DS111 is an ARM 5TE platform so I enabled those specific optimizations:

cd /volume1/@tmp
tar xvzf ffmpeg-26303.tar.gz
cd ffmpeg
./configure --arch=arm --enable-armv5te --prefix=/opt --extra-cflags='-I/opt/include' --extra-ldflags='-L/opt/lib' --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame

Notice that the ./configure command is line wrapped – it’s all one command. The make command takes approximately 25 minutes on the 1.6GHz CPU and will show many warnings during compilation, but this is expected.

Update – Thanks to bakman for pointing out that for Intel Atom CPUs you will need to install the assembler YASM and also use the following ./configure parameters:

ipkg install yasm
./configure --arch=x86_64 --enable-ssse3 --prefix=/opt --extra-cflags='-I/opt/include' --extra-ldflags='-L/opt/lib' --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame

Another Update – Thanks to gregorio for parameters for Freescale PowerPC processors:

./configure --arch=powerpc --disable-altivec --prefix=/opt --extra-cflags='-I/opt/include' --extra-ldflags='-L/opt/lib' --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame

When the compile is done, install it.

make install

Try running ffmpeg and check the compile time to make sure the newly compiled one is running. You should see this but with your compilation date and time:

FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers
built on Feb 6 2011 01:14:38 with gcc 4.2.3
configuration: –arch=arm –enable-armv5te –prefix=/opt –extra-cflags=-I/opt/include –extra-ldflags=-L/opt/lib –enable-static –disable-shared –disable-ffplay –disable-ffserver –enable-libmp3lame
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 0 / 0.16. 0
libavcodec 52.108. 0 / 52.108. 0
libavformat 52.92. 0 / 52.92. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1.72. 0 / 1.72. 0
libswscale 0.12. 0 / 0.12. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…

Use -h to get full help or, even better, run ‘man ffmpeg’

If you see the text below then something is wrong – this is the version included with DSM 3.0:

FFmpeg version SVN-r20167-snapshot, Copyright (c) 2000-2009 Fabrice Bellard, et al.

In the DSM User Control Panel create a new user called serviio and set a password. Give that user access to the paths that contain the media you want to serve. Click the User Home button and enable the User Home Service. Go back to your SSH session and type:

nano /etc/passwd

Be very careful editing this file. A wrong move here could trash your system. Notice that the serviio user has a shell of /sbin/nologin. Change this to /bin/sh like the admin user has. Nano may try to line wrap this line as you type if you added an long account description. If it does, delete the carriage return before the line break and pull it back onto one line. Save and exit.

Now we’ll create the Serviio daemon start and stop script:

nano /volume1/@tmp/

Paste in the following text (mouseover and use the icon in the top right to copy):



case "$1" in

        echo "Stop Serviio..."
        su -l $User -c "/opt/serviio/bin/ -stop" > /dev/null 2>&1 &

        # start Serviio in background mode
        su -l $User -c "/opt/serviio/bin/" > /dev/null 2>&1 &
        echo "Start Serviio..."

        #check libs FFmpeg depends on (in case DSM was upgraded)
        if [ ! -f /lib/ ]; then
                cp /opt/lib/ /lib
        if [ ! -f /lib/ ]; then
                cp /opt/lib/ /lib

        $0 stop
        sleep 1
        $0 start
        echo "usage: $0 { start | stop | restart}" >&2
        exit 1


Now make it executable and set the serviio user to be the owner of the Serviio folder (so it can create the media database, and log files):

chmod +x /volume1/@tmp/
chown -R serviio /opt/serviio

Test the script manually by running:

/volume1/@tmp/ start

The running process list should show the serviio user running the Serviio launcher shell script and the JVM like so:

 2542 root      9080 S N  /usr/syno/sbin/synomkflvd
 2589 root      3908 S    /usr/syno/sbin/sshd
 2591 root      5376 S    /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/
 2599 root      5944 S    /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/
 2600 root      5936 S    /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/
 2628 root     58920 S    /usr/syno/apache/bin/httpd
 2687 nobody   58920 S    /usr/syno/apache/bin/httpd
 2688 nobody   58920 S    /usr/syno/apache/bin/httpd
 2689 nobody   59500 S    /usr/syno/apache/bin/httpd
 2695 root     11560 S    /usr/syno/sbin/mDNSResponder -f /tmp/mDNSResponder.c
 2703 root      5568 S    /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/
 2949 root      5568 S    /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/
 3025 root      5568 S    /usr/syno/apache/bin/httpd -f /usr/syno/apache/conf/
 3087 root      8664 S N  /bin/ntfs-3g -o uid=1024,gid=100 /dev/sdk1 /volumeUS
 3518 root      8852 S    /usr/syno/sbin/cnid_metad
 3524 root     15132 S    /usr/syno/sbin/afpd -c 256 -g guest -n SynologyDS111
 3566 nobody   58920 S    /usr/syno/apache/bin/httpd
 7747 root      6660 S    sshd: root@pts/0
 7826 root      5404 S    -ash
13567 serviio   2940 S    -sh -c /opt/serviio/bin/
13570 serviio   2940 S    /bin/sh /opt/serviio/bin/
13575 serviio   501m S    /opt/java/ejre1.6.0_21/bin/java -Xmx384M
13917 root      5404 R    ps

Stop the daemon with:

/volume1/@tmp/ stop

Check the web UI or the process list again and make sure it did indeed stop. If it’s all ok, we need to move the daemon launcher script so it starts automatically on boot:

mv /volume1/@tmp/ /opt/etc/init.d

Shutdown the NAS and restart.

Update – previously I had used the directory /usr/syno/etc/rc.d, but this is destroyed when the DSM software is updated. /usr/local/etc/rc.d is the official Synology location for 3rd party daemon init scripts but I found that it doesn’t work, so I used /opt/etc/init.d instead which also survives a DSM upgrade. I just tested this by upgrading to DSM 3.1-1605 and Serviio remained intact. I only had to copy the sym links for the libraries FFmpeg needs (“cp /opt/lib/ /lib” and “cp /opt/lib/ /lib”).


Web UI integration with the Synology DSM

I read the official Synology notes for 3rd party developers and decided to make some icons. The result is pretty neat:

Open an SSH session:

cd /usr/syno/synoman/webman/3rdparty
nano serviio/config

The file loaded into nano will look like this, and you need to edit the IP address to match the IP of your Synology (either put your syno on a static IP, or set a reservation in your broadband router’s DHCP server options).

 ".url": {
    "org.serviio.serviio": {
      "type": "legacy",
      "allUsers": true,
      "title": "Serviio",
      "desc": "DLNA Media Server",
      "icon": "images/icon_{0}.png",
      "url": ""

I can’t find a way to avoid manually specifying the IP address like this – relative paths can’t be used because the Synology runs two different webservers: the DSM one on port 5000 without PHP, and the PHP-enabled Web Station one on port 80.

Log out of DSM and log back in. You will see the Serviio icon in the pull down menu in the top left, which you can drag to the desktop if you prefer:


Serviio settings

Navigate to the Transcoding tab. Set the transcoded files location to /volume1/@tmp. Failure to do this will result in temporary files being written to /tmp which will fill up the partition it’s on the moment you remux a 4GB movie, which would prevent you from logging into the NAS.

I recommend de-selecting Generate thumbnails for local videos in the Metadata tab. Note that you have to click Save on each tab or any change will not take effect. As you’ll see if you have a DLNA renderer that supports thumbnails, Serviio retrieves good ones from the online databases it checks so they’re not really needed. Often FFmpeg will get stuck trying to generate a thumbnail for a video and will lock the CPU at 100% for long periods of time. This issue was raised in this Serviio forum thread.

You can use the Library tab to add the media folders you want to share. Note that the Add Local… button will fail because the web service user does not have access to the root of the filesystem (probably a good thing security-wise). Use Add Path… instead and express the paths as I have done in the first screenshot above. Be sure that the serviio user has been granted read privileges over the folders you add (User Control Panel in DSM).

Update – If you really want to use the Ajax file browser UI, then go to DSM Control Panel > Web Services > PHP Settings tab > open_basedir and append /volume1: to the start of that list. Then on the Web Applications tab, disable Web Station, Ok, enable Web Station. Go back to your SSH session and run:

nano /volume1/web/serviio/afb/config.php

Change the value of $path from / to /volume1/public (or the top level shared folder where your media resides). You’ll notice however that when you use Add local button in the Serviio Library tab it’s very buggy. It will only list a maximum of 5 child folders from each node.



The Synology seems perfectly able to transcode DTS audio in a hi-def Matroska file down to 2 channel AC3 in MPEG-TS while copying the H.264 stream. The CPU use leaps up to 100% but I guess that’s because it’s running ahead transcoding down to the end of the file (and is CPU-bound).

If I play something that’s only remuxing the container and copying both audio and video streams then the CPU stays at around 40% (because it’s I/O-bound) then 5 minutes into a film it falls away to pretty much idle – I guess it has finished remuxing to the temporary file.

Memory use even while running Serviio is around 20% at idle, 30% during a remux with audio transcode, though I have noticed that with a larger library this creeps up to around 70%. I have a 2011 product so it has 256MB of RAM. This seems to indicate that the value line of products (with the j suffix) like the DS211j should run Serviio on their 128MB. They have a 1.2GHz CPU though versus 1.6GHz on mine (and the DS110j is only 800MHz), so it would need testing by someone.

All in all it would seem that the Synology products are very capable Serviio appliances!



Log in as root and stop Serviio, then delete a couple of libraries which had been copied to /lib:

/opt/etc/init.d/ stop
rm /lib/
rm /lib/

In the DSM User Control Panel delete the user called serviio. Undo the changes that you made to /opt/etc/profile and /etc/profile (the JAVA_HOME and java path modifications marked in bold earlier in the guide).

To remove the web UI, in DSM go to Web Services > Web Applications tab > Disable Web Station. Then:

rm -r /volume1/web/serviio
rm -r /usr/syno/synoman/webman/3rdparty/serviio

Finally, re-download the bootstrap for your model of NAS and run it again. It will tell you to delete a few folders and restart. This will completely trash all optware ipkg packages (i.e. everything in /opt) and undo everything else you did in this guide without affecting your data partitions. If you had any other ipkg packages installed since installing Serviio, these would also be lost.

231 thoughts on “Serviio 0.5.2 DLNA server on Synology NAS

  1. ipsen

    OK, my bad.

    Deleted the /opt/serviio/library/db forlder
    Set the SUID bit with chmod +s /opt/serviio

    and restarted, seems to be working now!

    I suggest you ammend the howto with the SUID to ensure that all files created below the /opt/serviio directory have the serviio user as their owner.


  2. Jax


    Serviio is great!!!!

    However it doesn’t start automatically when I moved to /opt/etc/init.d. I have to start manually every time in ssh.

    Any ideas?


      1. sam

        didnt work for me either, gonna try /usr/syno/etc/rc.d

        ds3.1 (latest of juli2011) DS111

  3. Khuong

    Hi Platter…

    I have followed your instruction but all i get when i start the server in the control panel is a big red X…

    it says………. Required Serviio 0.5.2, but found ” Cannot connect to serviio server, it does not seem to be running. exiting…

    please help me…

    1. patters Post author

      Some people have had problems with strange characters/line wraps while copying and pasting the script. Try writing that out by hand and see if it starts ok.

  4. rhofman88

    Hi Patters,

    Thank you for the instruction however im not that pro in this kind of things and maybe you can help me out via mail or something?
    I really want to work serviio on my ds211 because I bought a ps3 for streaming but noticed that synology has no dlna programs that I can install normally.

    Please help

  5. cd

    I have a problem with getting the serviio to work.

    > which java

    however when I run I get line 67: /opt/java/ejre1.6.0_25/bin/java: not found

      1. cd

        It makes no difference it stills gives the same error. If I run echo $JAVA_HOME and $PATH everything looks allright. What to do?

      2. cd

        I may be something simple, but I am not that used to linux:d

        If I do a
        > /opt/java/ejre1.6.0_25/bin/java
        I get
        /opt/java/ejre1.6.0_25/bin/java: not found

        but in the /opt/java/ejre1.6.0_25/bin/ folder I see two objects java and keytool

        But thank you for your help

      3. patters Post author

        Make sure you do all the archive extraction on the Syno, not in Windows, or you’ll end up with damaged file permissions. In Linux a file needs to have the execute permission for it to be executable. That’s what chmod +x does. When unTARed on the Syno all this will be fixed automatically.

      4. cd

        Hmm, I have tried removing java and then downloading it again directly to the syno (DS107+). which java gives the correct path. It just seems as if the java is not executable. The permissions in the bin-library are
        -rwxr-xr-x 1 10 dovecot 58545 Apr 14 14:43 java
        -rwxr-xr-x 1 10 dovecot 58568 Apr 14 14:43 keytool

        Strange… I guess that it is a java problem.

      5. patters Post author

        Maybe you have the wrong processor build. Your NAS has the mv5281. Is that definitely an ARM v5 core? Check by running cat /proc/cpuinfo

      6. cd

        cat /proc/cpuinfo gives
        Processor : ARM926EJ-Sid(wb) rev 0 (v5l)
        BogoMIPS : 499.71
        Features : swp half thumb fastmult vfp edsp
        CPU implementer : 0x41
        CPU architecture: 5TEJ
        CPU variant : 0x0
        CPU part : 0x926
        CPU revision : 0
        Cache type : write-back
        Cache clean : cp15 c7 ops
        Cache lockdown : format C
        Cache format : Harvard
        I size : 32768
        I assoc : 1
        I line length : 32
        I sets : 1024
        D size : 32768
        D assoc : 4
        D line length : 32
        D sets : 256

        Hardware : MV-88fxx81
        Revision : 0000
        Serial : 0000000000000000

        I am not sure were to find the required information.

        Thank you for taking the time to help me

      7. patters Post author

        Yours is CPU architecture 5TEJ and mine is 5TE. I thought that would be ok, but I’ve looked up the definition of ARM 5TEJ and apparently it’s a feature called Jazelle. It’s a technology to allow the processor to execute Java bytecode directly:

        I would guess that’s likely to be in conflict with Java Embedded. My recommendation would be to ask on the Synology Forums.

      8. cd

        Thank you for all your help.

        I was actually testing it on my DS107+ before installing Serviio on the DS209, which is my main NAS. I followed the instructions again and there was no problems in installing and running Serviio on DS209. Excellent! Now I just have to figure out how to play my AVI-files.

        Thank you

  6. sam

    hmm, installation went fine, nice guide!

    however, im finding that my avi stutter after like 5 minutes on my DS111

    any tips to increase performance? Also, im not noticing the transcoder coming down from 100% CPU.

    I used a Bravia 32w5500 player and ofcourse disabled all the thumbnails…

    1. patters Post author

      The Bravia 5500 series can’t play AVI natively (I have one) so your Syno is trying to transcode to mpeg2video which it can’t manage in realtime. It’s only really got the power to remux containers like mkv and transcode audio. Can you use a different renderer? Games console, or Bluray player perhaps?

      1. sam

        well, i’ve got an Xbox360 which can render it i suppose… Not too sure but i think that xbox does play .avi natively :) i could have done that with synology’s built in UPnP functionality xD

        No chance to increase performance? Like force the buffer to load longer before playing or something else ^^

        thanks for your reply btw

  7. ds211j

    How in the world can we uninstall? I setup everything, though the setup simply didn’t have enough power for the use I wanted out of it. I have tried resetting many times to no avail. I accidentally removed a few of the original directories, so make remove is not an option. I want to go back to a clean slate, without all of the packages from this tutorial. Thank you!

    1. patters Post author

      Check the Synology forums for how to reset the firmware. However it normally clears the drive too (though I did see a post about how to get around that).

      1. ds211j

        I did that to no avail, even cleaned my drives. Serviio still exists in the menu, which I could edit out by backtracking. However, ffmpeg and other depends still exist on the system that I would like to remove. The original directories do not exist though, so I cannot make remove. I want a way to “truly” reset the device back to scratch and cannot seem to do it via the rear button or default settings reset.

      2. patters Post author

        As I understand it most of the modifications live in /opt which is actually on your hard drive. Those that don’t should be reset when you re-apply DSM. So you could maybe try removing the disks and destroying their partition tables, then putting them back in.

  8. rhofman88


    I have the ds211 and trying to stream to my ps3.
    Tried to follow your guide via a XP machine because I couldn’t find Putty for MAC.
    Also this is not really my thing and already on the first line it didn’t work for me. I have enable SSH, installed Putty, logged on the synology and after that ipkg is not a good command.

    Please can you help me because im a noob in this..

    Thank you

    1. sam

      first, i wanted to flame mac users ^^ and then im going to help you:

      you need a ‘bootstrapper’. A piece of software, specificly designed for your Synology NAS’s hardware that enables the use of the ‘ipkg’ command.

      After a quick google, i have found the following site for you:

      follow these staps to make the bootstrapper work (read: ipkg command works) and then follow the rest of this guide.

      Also, make sure you dont just follow these steps because somewhere in this post you will be asked to download DS111 specific software (ARMv5 software) which might not be compatible with your NAS.

      but, if step 1 was hard for you, perhaps you should try to contact someone near you who can do it for you (and ofcourse has the needed experience in linux)

    2. patters Post author

      PuTTY is not necessary on Mac OS as it includes an ssh client in the OS. Open Utilities -> Terminal and type:
      ssh root@x.x.x.x

      where x.x.x.x is the IP of your NAS. As for the bootstrapper – clearly you didn’t read the guide properly, it’s all there (search for “Read this Synology wiki document about modifying your NAS carefully and install the bootstrap for your model”)

      I think though that if you missed those things I’d probably recommend that you avoid trying to do this without the help of someone near to you that knows a bit more about Linux. Though a few people have offered me money to install Serviio for them remotely, I’m afraid it’s not something I’m interested in doing.

      1. rhofman88

        I think I am the lazy one then ;) but indeed maybe it is better to ask someone with more linux experience to help me out. I will try this weekend to follow step by step and if I get problems I reply on this posts.

  9. Kdansky

    I’m stuck at the script part:

    $> /opt/serviio/bin/
    Illegal instruction (core dumped)

    Cannot figure out why that happens (permissions? I tried it as both root and serviio login via SSL, same result). I also installed sudo via ipkg, but that didn’t help. My paths seem fine:

    >echo $JAVA_HOME

    >echo $PATH

    And even if I get it running, I wonder if my 411j will actually be able to handle the transcoding (though I think I have a lot of data which only needs audio transcoding).

  10. iomega

    Setting for ffmpeg which worked for my iomega storcenter ix4-200d.

    ./configure –enable-cross-compile –cross-prefix=/opt/bin/ –arch=arm –enable-armv5te –prefix=/opt –extra-cflags=’-I/opt/include’ –extra-ldflags=’-L/opt/lib’ –enable-static –disable-shared –disable-ffplay –disable-ffserver –enable-libmp3lame –enable-gpl –enable-postproc –target-os=linux

    I had to do a lot of other tweaks to get the job done, but seems to work…

  11. hr79

    Hi all! Many thanks to Patters for putting up this amazing guide! I have been running Serviio on a pc for a while now and was looking forward to get it running on my PPC based DS210+ but unfortunately it looks like I’m stuck until jamvm supports 1.6.

    Any worthy alternatives I might be able to give a shot in the meanwhile?

    Btw, as others have mentioned earlier I wasn’t able to copy the contents of either. Manually editing did the trick though.

  12. extenue

    Thanks for this very detailed tuto , i have still not finished as i am stuck as i am not sure to know the correct version of Java SE Embedded Runtime i need to use for my 411+ (intel atom)
    Is anyone can drive me ?



    1. sam

      yes, get java from the java suplier?

      simple google return from this query: ds411+ java

      first hit got me java download instructions?

      1. extenue

        that’s fine , i used my brain and took the x86 version and just finished the tuto , everything has been good ! Thanks to all the contributors

        now i need to wait once back home to test stream to my bravia 32ex500 and my PS3 , i’ll share my experience as soon as i can

      2. sam

        hmm, extenue, i can tell you that stram to Bravia will not work well, it will stutter (transcoding on the fly to MPEG2) However Xbox (no transcoding) will be fine. I havent tried subbing because im lacking some Mplayer skills, so please tell me your findings

  13. extenue

    arghhhh , i receive an error when i want to add a local path
    Error encountered:
    LOCATION: /volume1/web/servioo/afb/browse.class.php, line 68

    i will try to fix myself but is anone know this problem ?

    Else , is it possible to manually edit a file and add patch ?


  14. extenue

    by the way , i was disconnected each time from ssh few seconds after performed this two commands

    i checked and the files were really copied but don’t know why the session died after that ..

    cp /opt/lib/ /lib
    cp /opt/lib/ /lib

    was it normal ? is it a newb question ?

  15. Anthony Lucent

    I dont suppose you could show me how to make the ffmpeg install work with the –enable-shared in place? Everytime I change it fails to install properly. I must admit I dont want Servilio, I am only trying to install ffmpeg-php on my synology ds411j nas for a website and when I attempt to compile ffmpeg-php it tells me I need to compile ffmpeg with “–enable-shared” first…

    1. sam

      that, sir, was EXACTLY WHAT I WAS LOOKING FOR!!!!eleven11!! I myself do not have the neccesary linux / ffmpeg skills to make this work!

      I havent even clicked your link, because i’m too exited :) I will try to make this work for my DS111 as well, would be epic!

  16. Jibee73

    Hi, thx for this guide,

    I’have a problem.
    when i test the script manually by running:
    /volume1/@tmp/ start

    He is not appear in process.
    I try to log with serviio user and it’s ok permissions is ok

    Please help, i’m near the end of install :)

    Ps: sorry for my porr language, i’m a french guy.

    1. patters Post author

      Did you use chmod +x to make it executable?
      Can you verify you can launch Serviio manually without the script (/opt/serviio/bin/

      1. Jibee73

        Yes i did use chmod +x
        I can’t launch Serviio Manually, when i do it the response is:
        “JibDiskStation> /opt/serviio/bin/ start
        Illegal instruction (core dumped)”

        Is it a bad Compile?

        I have Ds211 Synology Nas with DSM 3.1

        Thx for your help

  17. Harsh

    Hi Patters,

    Thanks for the excellent guide.
    I have finally installed Serviio on Sunology DS411slim and i can see it on my PS3 and TV.
    The issue is, i don’t see my media from the NAS. in the serviio i have configured the path as /volume3/music
    I can only see some on the music files but no video and photos. some music files are also missing. I have given all access to serviio user and even made it a admin. still no luck. thumbnails are off. i have read through the serviio forum but couldn’t find any solution.

    Any help will be appreciated.

    1. patters Post author

      Look at the serviio log for clues. Could it be that you forgot to set the permissions for the /opt/serviio folder, preventing the database from being created?

      1. Harsh

        Hi Patters,

        it helped as i executed chmod 777 /opt/serviio using root login. Now i see ONLY 1 movie in the video folder whereas there are more than 10 movies.

        I still do not see any photos in the photo folder whereas there is more than 10 GB of photos.

        What else can i do to start using SERVIIO. I’m quiet eager to start using it. Please help.


      2. patters Post author

        Did you chown /opt/serviio for the serviio user? You can diagnose library problems by looking at Serviio’s log in /opt/serviio/log if I recall correctly.

  18. Harsh

    Hi Patters,

    I did change the user to serviio for /opt/serviio and i have also seen the serviio log. not much i can conclude from the log. what i did notice is that now i have the videos for only ine folder but other folders are missing. Music and photos folders are still blank.

    I there a way i can erase the library or database and then build it again? my conclusion is that since i changed the setting too many times, the library does exists and if i’m correct in interpretting the log, i did notice some of the music and photos being added to the library. os if i erase the library and database then i might succeed in rebuilding the folders. any suggestions on the process to rebuild the library?


    1. Harsh

      Hi Patters,

      I figured out the problem. i had not configured the option “scan for file additions and updates”. As soon as i did the folders started to appear and it takes a long time.

      Thanks for the support.


  19. David

    All works fine in my ds210j since the web configuration step .
    When i try to load defaults folders i get an error (cannot put repository).
    All folders that serviio use are with 777 permission for test pourpose.
    On serviio forum i found that maybe it’s the java version that it’s not so good.
    So, maybe i’ts cause serviio acatually it’s not compatible with the version i found on java web site that is ejre-7-fcs-b147-linux-arm-sflt-headless-27_jun_2011.tar .
    Can you send or load to a hosting site (Megaupload similar) your ejre-1_6_0_21-fcs-b09-linux-arm-sflt-eabi-headless-27_sep_2010.tar.gz .

    Thanks in advice .

    1. patters Post author

      Don’t use the latest Java 7. It’s a major version change and Serviio is not yet ready for it. Have another look at the Oracle download site, they still have the Java 6 version there too.

  20. Mark Grimmond

    Hi Patters,

    Excellent guide. First time i’ve touched linux (or any nix based OS really) and you provided enough details to get me through with limited issues along the way. Now have serviio installed on my DS211+, thanks!

    I wanted to check one point with you. Once I got this running I noticed that the CPU usage was consistently high, 85-90% even once library updating etc. was complete and the box should have been idle. Checking the log confirmed Serviio was not doing very much. I notice that several people also reported the same issue. This is not thumbnail related as I definitely have that switched off and there is no ffmpeg process running. the process consuming the CPU is Java.

    What I have narrowed this down to is the setting for the “Keep library automatically updated” check box. When it is ticked the CPU is high, as soon as I remove the checkbox the CPU drops to a few % as expected, checking it again CPU jumps up again etc. You did not seem to have this issue so I would like to know how you have that value set? If you do have it set, then I would like to try and work out whar is different about my install that might be causing this. Other than that all works as expected.


    1. patters Post author

      Thanks for the feedback – I tried to write the guide to be workable for non-Linux familiar people, and hopefully you’ll have taken away some concepts which will be useful to know in future!
      As for the library updating I set mine to only update at 720 minute intervals. I’ll add that to the guide. I’ve written a revised one ready for when Serviio 0.6 is released (it’s beta only at the moment).

  21. Siegfried

    thx. a lot. i have spent a lot of time for my DS209. At last, the Java-Version 1.7 was the problem :)
    now i have taken the following version.
    So, iam a totally linux newbie. so i dont`t understand what can i do with the
    when i add folders, what is the right one?

    or the name of my nas?

    thx. for helping.

    1. patters Post author

      By default the first partition you create on the NAS will be /volume1.
      You can check where your video files are by changing directory:

      cd /volume1

      then looking at the contents:


      Which is the equivalent of ‘dir’ in Windows.

  22. Jeff

    Hello I Have a little problem of encoding :

    2011-08-07 11:36:16,688 WARN [LibraryManager] Cannot read metadata of file /volume1/Videos/Series/Cougar Town/Saison 1/15 La mauvaise ��ducation.m4v via extractor EMBEDDED. Mes
    2011-08-07 11:36:16,731 WARN [LibraryManager] Cannot read metadata of file /volume1/Videos/Series/Cougar Town/Saison 1/12 Une relation trop s��rieuse.m4v via extractor EMBEDDED
    2011-08-07 11:36:16,773 WARN [LibraryManager] Cannot read metadata of file /volume1/Videos/Series/Cougar Town/Saison 1/21 Dr��les de drames.m4v via extractor EMBEDDED. Message:
    2011-08-07 11:36:17,43

    all characteres with accent are replace by ?? !

    I put UTF8 in Java option but that change nothing .

    # Setup Serviio specific properties
    JAVA_OPTS=” -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME -Dserviio.remoteHost= -Dfile.encoding=UTF-8″

    I didn’t found solution on internet
    I run on DS710+ on DSM 3.1.

    Thanks for your reply !

    1. patters Post author

      Not sure on this. I have a file with Cyrillic metadata that is added ok using the default settings. Maybe ask on the Serviio forum.

  23. David

    Ok i have tested servillo 0.52 on my DS210j …
    It works! But is sucks!
    The video/audio are played on my Sony Bravia but they are laggy as hell .
    FFmpeg takes all my cpu to transcode…
    Bad luck, and lack of money when i choose a J version -.- next time i’ll take a + version ç_ç
    Anyway thanks for your howto and for your support :)

    1. patters Post author

      Thanks for the feedback. Bravia TVs (2009, and 2011 until someone figures out native AVI playback) aren’t ideal renderers. Rather than replacing your NAS though, you could always consider a Sony Bluray player. Similar money, and then you have bluray playback too.

    2. sam

      you can do what i do: script the transcode to occur when download is complete. takes 2 scripts and transcodes it mpeg2ts (playable by Bravia 2009)

      it works!

      1. David

        Can you postit down here?
        I’m not good at all in scriting :P
        Maybe Patters can use it to do a howto including integration in Synology and the startup of the script during the post download .
        This will be useful to those who have this problem and have an old version or low Mhz processor like me .

        Thanks David

  24. sam

    okay, well, you need to know a little bit:

    -what does my played support?
    -can my diskstation stream without transcoding on the fly.
    – do i mind more power consumption

    ah well, i dont want to spend too much time on this, so you can tweak these scripts to what you like. At this moment i will have 2 versions of the movie when transcoded: the originals and the transcoded.

    you will need 2 scriptfiles, mine are /volume1/scripts/ and /volume1/scripts/ You can run the ‘’ when you finish dowloading something, or run a crontab for it (use ‘vi /etc/crontab’ ) to schedule it to run like every hour or so. sidenote: when a file is already converted, it will no be overwritten by FFMPEG by default
    #find files like ‘*.avi’ and EXEC my convert script FOR EACH
    find /volume1/video/originals -type f \( -name “*.avi” -o -name “*.mkv” -o -name “*.vob” \) -exec sh /volume1/scripts/ “{}” \;

    #echo “$# parameters”
    #just for testing. As you might notice this .sh file needs an input parameter, and ONLY ONE

    echo “start converting file: “$@” ”

    #controleer of er niet al getranscode wordt
    #check for current transcoding by searching for ‘ffmpeg’ proces
    proccount=`ps | grep “ffmpeg” | grep -v grep | wc -l`
    #do not edit aboven line, will give problems without ` (tilde thingy)

    if [ “$proccount” -eq 0 ]

    filename=$(basename “$1”)
    echo “filename = $filename”

    ffmpeg -i “$1” -vcodec mpeg2video -f mpegts -target pal-dvd -aspect 16:9 “$NEW_NAME”
    #above line depends on what you will use. Im using a Bravia 32w5500 (2009 model) wich
    #only supports MPEG2 TS.

    #add to synology indexer, without need to re-index everything.
    synoindex -a “$NEW_NAME”

    echo “last FFMPEG transcode did not finish. Skipping”


  25. romeop

    Hello i have a brand new DS211j and i followed this guide, right now i have no effects in starting the service, if i start manually Serviio by running /opt/serviio/bin/ i have this error:

    DiskStation> /opt/serviio/bin/ start
    /opt/serviio/bin/ line 67: java: not found

    How can i solve this?

    1. patters Post author

      If you haven’t already done so, log out of SSH then log back in – the changes you made to /etc/profile will only take place at login.

      1. romeop

        solved, i just copy/pasted your code but the actual java version is ejre1.6.0_27 not ending with 21, so edited the shells and go further….

        now i have the problem the PS3 did not show any movie…..

  26. Rob Nancarrow

    Thanks heaps for the guide Patters.. Spent a couple of hours running through it today on a DS1511+ and it works perfectly. I’ve changed the Serviio profile for PS3 a little to force some transcoding to see what the performance is like, and so far the 1.8GHz Atom seems to be capable of doing the job, I’ve had no issues at all, and the CPU sits on about 30-60%. Pretty cool little device. I spose time will tell whether or not it’ll cope with the full HD stuff..

    Thanks again for all your hard work in writing this all up!

    Cheers, Rob.

    1. patters Post author

      It’s not nearly as good as Serviio. I’m close to releasing a .spk package for Serviio 0.6 (when it comes out of beta) so if you’re daunted by the process, hang back a little. Should be within a couple of weeks.

      1. Sebby

        I was wondering about quality of the built in DLNA server. I am thinking about purchasing the NAS. The package would be great to enhance its capabilities. I have a netbook with Atom CPU 330 1.6 GHz. Wonder how it compares to DS111’s CPU?

  27. Pingback: Modificar Synology Server | A quien pueda interesar ...

  28. Pingback: Instalar Seviio en Disco Nas Synology | A quien pueda interesar ...

  29. Hans

    I installed everything without any problems, set permissions, set owner to serviio user and added /volume1/video/complete to the library list and added an avi and mkv to the folder.

    I refreshed the library manually. The tv does see the complete folder but no videos in it. The serviio logs show I press the force refresh button but nothing is found.

    I restarted serviio but no luck.

    What can I do to find out what is wrong?

    1. patters Post author

      Did you allow the Serviio user read access to your video share (in the Users control panel in DSM)? To troubleshoot, perhaps try to add some media that’s in the public share (which all users can access).

      1. Hans

        Serviio has read/write permissions on the video share. I don’t seem to have a ‘public share’ so I created a new share called ‘public’ and gave serviio read/write access. No success. I also used a dlna client on my pc but this one also does not see any files. So the tv client is not the problem.

        Is it possible to query the derby database? Is there a client installed on the nas? Do you know the port and database name? If its an embedded database, do you know the jdbc string? Would it be possible to turn on debug logging or database logging in serviio?
        Any other ideas?

        Sorry for the bulk of questions…

    1. Eric

      Jep me,
      I’m running a DS 110j now on DSM 3.2

      Serviio is running without any troubles oder changes.

      The only thing that doesn’t work is the left click on the serviio icon in the DSM.
      If I enter the url of the serviio config it or if I press the icon with a right click and press “open in new window” it works.

      Any ideas how to fix it?

      Thanks again Patters for this great tutorial. My serviio is running fine for three months now.

  30. quietseb


    thank you Patters for this excellent guide. I applied it successfully on a DS210j with DSM 3.2 (started on 3.1, got a system partition crash, restarted on brand new 3.2)
    couple of things that put me back a little:
    * the wget thing : I also had to get open-ssl manually
    * I assumed java 7 would be good to go, found only in the comments that it was not. Would you make a note about that in the main text ? btw, I tried your package but with no success (modified the scripts to point to correct directories on my box, the package said it installed successfully but did nothing really).
    * same as Eric, on DSM 3.2 the DSM integration doesn’t work : nothing happens when clicking the icon.

    I’m seeing lots of stuff on my NAS from my Sony Bravia that I didn’t before, so I’m happy… just hopping everything will be ok performance-wise.

    Thank you again for well-detailed installation instructions !

  31. Eric

    I’ve had some problems while uninstalling.

    After I stopped and deleted the libraries the DSM didn’t work, so i tried to restart my DS 110j.
    But it just beeped once an the status LED was flashing orange. The DSM wasn’t running and the Synology Assistant didn’t find my device.
    So i pressed the reset button 4secs until the beep and again until the second beep.
    After that the Synology Assistant did find the DS again and i could reinstall the DSM.
    I lost all my settings but none of my data.

    Just a quick guide if anyone has similar problems…

  32. Puiu

    Hi all.
    How can I change the IP of Serviio, because i have the icon on screen, but, when i put the mouse over i see the IP…
    My DS is an…


    1. patters Post author

      Look at the guide again – you forgot to edit /usr/syno/synoman/webman/3rdpartyserviio/config to put your ip address in instead of

  33. Martin nielsen

    Hi Patters i got this problem when i try to compile the ffmpeg.. iv’e tried two times over now, and get to the same problem, howcome i get this problem?

    plz help me
    this is what i get when i type in the command!!

    Teglgaardsvej> ./configure –arch=arm –enable-armv5te –prefix=/opt –extra-cflags=’-I/opt/include’ –e
    xtra-ldflags=’-L/opt/lib’ –enable-static –disable-shared –disable-ffplay –disable-ffserver –enable-

    gcc is unable to create an executable file.
    If gcc is a cross-compiler, use the –enable-cross-compile option.
    Only do this if you know what cross compiling means.
    C compiler test failed.

    If you think configure made a mistake, make sure you are using the latest
    version from SVN. If the latest version fails, report the problem to the mailing list or IRC #ffmpeg on
    Include the log file “config.log” produced by configure as this will help
    solving the problem.
    Teglgaardsvej> make
    Makefile:234: /d/java/workspace/ffmpeg/tests/fate.mak: No such file or directory
    Makefile:235: /d/java/workspace/ffmpeg/tests/fate2.mak: No such file or directory
    Makefile:237: /d/java/workspace/ffmpeg/tests/fate/aac.mak: No such file or directory
    Makefile:238: /d/java/workspace/ffmpeg/tests/fate/als.mak: No such file or directory
    Makefile:239: /d/java/workspace/ffmpeg/tests/fate/fft.mak: No such file or directory
    Makefile:240: /d/java/workspace/ffmpeg/tests/fate/h264.mak: No such file or directory
    Makefile:241: /d/java/workspace/ffmpeg/tests/fate/mp3.mak: No such file or directory
    Makefile:242: /d/java/workspace/ffmpeg/tests/fate/vorbis.mak: No such file or directory
    Makefile:243: /d/java/workspace/ffmpeg/tests/fate/vp8.mak: No such file or directory
    make: *** No rule to make target `/d/java/workspace/ffmpeg/tests/fate/vp8.mak’. Stop.


Leave a Reply to cd Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s