Serviio 0.6 package for Synology NAS with Web UI


The Serviio Web UI, styled to look like the regular DSM control panel widgets


UPDATE – This is no longer the most recent package. I have released a new version and created a new blog post to keep the comments on topic.

My guide for installing Petr Nejedly’s excellent Serviio 0.5.2 on Synology has been a very popular post, and many people have got it running. However, the process is still complex enough to deter a lot of people and, as I learned more about my Synology NAS, I realised that I could automate the whole thing. The biggest obstacle was creating a package for Java, but adding locale support to the syno Linux also proved difficult.

The PHP Web UI is now included which you can use to manage Serviio once it’s installed. I have tried to fix most of the localization issues with it, and have edited the CSS to give it the look and feel of DSM as much as I could. You could also use Serviio Remote Console from another computer if you prefer. Any online content plugins (ending in .groovy) that are found in your NAS ‘public’ share will also be installed into Serviio’s plugins folder automatically during installation.

The package will allow future upgrades while preserving the media database and the online plugins, as long as Serviio itself is ok with that. You can see Serviio’s log by clicking More in the Package Centre. DSM Package Center installs the application to /volume1/@appstore/Serviio though from what I understand, on multi-volume systems the user is prompted for a destination volume. If you need to edit device profiles, add online content plugins, or look at the log in detail that’s where you’ll find the files. Bear in mind that a NAS, even an Intel Atom powered one, is unlikely to have sufficient CPU power to manage realtime video transcoding (e.g. from DivX to MPEG2), though it will manage remuxing MKV to M2TS and realtime audio transcoding.



If you have DSM 3.2, you can install directly from Package Center. In Settings -> Package Sources add my package repository URL which is

If you’re still on DSM 3.1, download one of the following packages. Right-click, Save As:

Serviio uses some open source libraries without which it would not have been possible.
By downloading the software on this page you are agreeing to the terms of the original Serviio End User Licence Agreement.
I accept no liability for any damage that may occur to your data or your cat’s health as a result of using this software :) The scripts are shown in full below, so you are free to assess any risks yourself.



This package can be installed on an unmodified NAS – no hacking is required. It has been tested on DSM 3.1 and DSM 3.2. Here’s what you need to do:

  • In the DSM User control panel enable the User Home service
  • In the DSM Web Services control panel enable Web Station
  • Using the DSM Package Center install my Java SE for Embedded Synology package
  • Download any online content plugins that you require and leave the .groovy file for each in your NAS’s public shared folder
  • Determine your NAS’s CPU type, and install the appropriate Serviio Synology package from the download link above
  • Give it some time to start (click More Info in Package Center to see the Log tab – check it has loaded all the renderer profiles), then you can use the Serviio icon in the DSM drop down menu in the top-right to launch the Web UI. This Serviio icon will only be visible to admin users in DSM
  • To use the Serviio Remote Console from a Windows PC edit ServiioConsole.exe.vmoptions in the Serviio folder and add the line: -Dserviio.remoteHost=192.168.x.x (replace with your NAS’s IP address). It can take a minute or so to start – this is normal. For details on how to configure the Remote Console on other operating systems refer to the Serviio FAQ. It seems that the first time Serviio starts with a blank database the Remote Console will get stuck showing the message “Serviio is updating its Media Library”. If that happens wait a couple of minutes, stop and restart Serviio via the Package Center. Give it another couple of minutes then the remote console should work fine.
  • Once the console is up, disable ‘Generate thumbnails for local videos’, and set the ‘Transcoded files location’ to /volume1/@tmp. Don’t forget to use the Users control panel in DSM to grant permission for the Serviio user to read your files (if they’re not in the public share)
  • When you add folders to your library you need to use the ‘Add path…’ button (not ‘Add local…’) and give the full Linux path (e.g. /volume1/share-name/Movies). There are issues with the Add Local ajax file browser which mean that it doesn’t work properly even if you give PHP access to the filesystem root

The DSM main drop-down menu, showing the Serviio Web UI icon


Upgrading from 0.5.2

If you want to upgrade from a manually installed 0.5.2, you will need to follow the steps below. I was considering automating it, but it gets complicated trying to remove people’s edits from /etc/profile which may not be entirely consistent.

  • Stop the Serviio 0.5.2 daemon by running: /opt/etc/init.d/ stop
  • Copy your media database somewhere safe: cp -R /opt/serviio/library/db /volume1/public
  • Follow the uninstallation steps at the bottom of my original guide
  • Install my Java Synology package
  • Install the Serviio Synology package from the download link above but don’t start it yet
  • Copy your saved database into position: cp -R /volume1/public/db /volume1/@appstore/Serviio/library (warning – for people with multiple volumes, the @appstore folder is not always on /volume1 apparently)
  • Force ownership on database files: chown -R serviio /volume1/@appstore/Serviio/library
  • Force ownership on transcode cache: chown -R serviio /volume1/@tmp/Serviio
  • Start Serviio in the DSM Package Center
  • Follow the rest of the settings guidelines from above

Package scripts

For info, here are the scripts inside the package. The security-conscious among you can untar the package and take a look at the contents for yourself.



#--------SERVIIO preinstall script
#--------package maintained at

source /etc/profile

if [ -z ${JAVA_HOME} ]; then
        echo "Java is not installed or not properly configured. JAVA_HOME is not defined. " > $SYNOPKG_TEMP_LOGFILE
        echo "Download and install the Java Synology package from" >> $SYNOPKG_TEMP_LOGFILE
        exit 1

if [ ! -f ${JAVA_HOME}/bin/java ]; then
        echo "Java is not installed or not properly configured. The Java binary could not be located. " > $SYNOPKG_TEMP_LOGFILE
        echo "Download and install the Java Synology package from" >> $SYNOPKG_TEMP_LOGFILE
        exit 1

exit 0



#--------SERVIIO postinstall script
#--------package maintained at

#create serviio daemon user
synouser --add serviio `${SYNOPKG_PKGDEST}/bin/passgen 1 20` "Serviio daemon user" 0 "" ""

#determine the serviio user homedir and save that variable in the user's profile
#this is needed because librtmp needs to write a file called ~/.swfinfo
#and new users seem to inherit a HOME value of /root which they have no permissions for
SERVIIO_HOMEDIR=`cat /etc/passwd | sed -r '/Serviio daemon user/!d;s/^.*:Serviio daemon user:(.*):.*$/\1/'`
su - serviio -s /bin/sh -c "echo export HOME=${SERVIIO_HOMEDIR} >> .profile"

#change owner of Serviio folder tree
chown -R serviio ${SYNOPKG_PKGDEST}

#reset ownership on any pre-existing transcoding temp folder (same volume as appstore)
if [ -d ${SYNOPKG_PKGDEST}/../../@tmp/Serviio ]; then
        chown -R serviio ${SYNOPKG_PKGDEST}/../../@tmp/Serviio
#reset ownership on any pre-existing transcoding temp folder (on volume1 in case app was installed on a different volume)
if [ -d /volume1/@tmp/Serviio ]; then
        chown -R serviio /volume1/@tmp/Serviio

#create symbolic link to Serviio's version of FFmpeg
if [ -f /opt/bin/ffmpeg ]; then
        mv /opt/bin/ffmpeg /opt/bin/ffmpeg.bak.serviio
        ln -s ${SYNOPKG_PKGDEST}/bin/ffmpeg /opt/bin/ffmpeg
        ln -s ${SYNOPKG_PKGDEST}/bin/ffmpeg /bin/ffmpeg

#set up symlink for the DSM GUI
if [ -d /usr/syno/synoman/webman/3rdparty ]; then
        ln -s ${SYNOPKG_PKGDEST}/DSM /usr/syno/synoman/webman/3rdparty/Serviio

#move web UI files to Webstation root folder
mv ${SYNOPKG_PKGDEST}/web /volume1/web/serviio

#find path of public share (it might not be on /volume1)
PLUGIN_PICKUP=`cat /usr/syno/etc/smb.conf | sed -r '/\/public$/!d;s/^.*path=(\/volume[0-9]{1,3}\/public).*$/\1/'`

#pick up any plugins from the public share
mv ${PLUGIN_PICKUP}/*.groovy ${SYNOPKG_PKGDEST}/plugins

exit 0



#--------SERVIIO start-stop-status script
#--------package maintained at

daemon_status ()
        ps | grep '^ *[0-9]* serviio' > /dev/null

case $1 in
                #start Serviio in background mode
                su - serviio -s /bin/sh -c "${SYNOPKG_PKGDEST}/bin/ &"
                exit 0

                su - serviio -s /bin/sh -c "${SYNOPKG_PKGDEST}/bin/ -stop"
                exit 0
                if daemon_status ; then
                        exit 0
                        exit 1
        echo "${SYNOPKG_PKGDEST}/log/serviio.log"
                exit 0



#--------SERVIIO preuninstall script
#--------package maintained at

#make sure that Serviio is stopped
${SYNOPKG_PKGDEST}/bin/ -stop
sleep 6

exit 0



#--------SERVIIO postuninstall script
#--------package maintained at

#remove serviio daemon user
synouser --del serviio

#remove symlink and reinstate any backed up version of FFmpeg
if [ -L /opt/bin/ffmpeg ] && [ -f /opt/bin/ffmpeg.bak.serviio ]; then
        rm /opt/bin/ffmpeg
        mv /opt/bin/ffmpeg.bak.serviio /opt/bin/ffmpeg
if [ -L /bin/ffmpeg ]; then
        rm /bin/ffmpeg

#remove DSM icon symlink
rm /usr/syno/synoman/webman/3rdparty/Serviio

#remove web UI
if [ -d /volume1/web/serviio ]; then
        rm -r /volume1/web/serviio

exit 0



#--------SERVIIO preupgrade script
#--------package maintained at

#make sure that Serviio is stopped
${SYNOPKG_PKGDEST}/bin/ -stop
sleep 6

#if a media database exists we need to preserve it
if [ -d ${SYNOPKG_PKGDEST}/library/db ]; then
        mkdir ${SYNOPKG_PKGDEST}/../serviio_db_migration
        mv ${SYNOPKG_PKGDEST}/library/db ${SYNOPKG_PKGDEST}/../serviio_db_migration

#if online plugins exist we need to migrate them
if ls ${SYNOPKG_PKGDEST}/plugins/*.groovy; then
        mkdir ${SYNOPKG_PKGDEST}/../serviio_plugin_migration
        mv ${SYNOPKG_PKGDEST}/plugins ${SYNOPKG_PKGDEST}/../serviio_plugin_migration

exit 0



#--------SERVIIO postupgrade script
#--------package maintained at

#use the backed up media database from the previous version
if [ -d ${SYNOPKG_PKGDEST}/../serviio_db_migration/db ]; then
        mv ${SYNOPKG_PKGDEST}/../serviio_db_migration/db ${SYNOPKG_PKGDEST}/library
        rmdir ${SYNOPKG_PKGDEST}/../serviio_db_migration

        #serviio daemon user has been deleted and recreated so we need to reset ownership (new UID)
        chown -R serviio ${SYNOPKG_PKGDEST}/library/db

#use the backed up plugins from the previous version
if [ -d ${SYNOPKG_PKGDEST}/../serviio_plugin_migration/plugins ]; then
        cp ${SYNOPKG_PKGDEST}/../serviio_plugin_migration/plugins/*.groovy ${SYNOPKG_PKGDEST}/plugins
        if [ ! -z ${SYNOPKG_PKGDEST} ]; then
                if [ -d ${SYNOPKG_PKGDEST}/../serviio_plugin_migration ]; then
                        rm -r ${SYNOPKG_PKGDEST}/../serviio_plugin_migration
        #serviio daemon user has been deleted and recreated so we need to reset ownership (new UID)
        chown -R serviio ${SYNOPKG_PKGDEST}/plugins

#reset ownership on transcoding temp folder (same volume as appstore)
if [ -d ${SYNOPKG_PKGDEST}/../../@tmp/Serviio ]; then
        chown -R serviio ${SYNOPKG_PKGDEST}/../../@tmp/Serviio
#reset ownership on transcoding temp folder (on volume1 in case app was installed on a different volume)
if [ -d /volume1/@tmp/Serviio ]; then
        chown -R serviio /volume1/@tmp/Serviio

#restart Web Station to clear webserver caches
if [ -f /usr/syno/etc/rc.d/ ]; then
        /usr/syno/etc/rc.d/ restart

exit 0


  • added Web Station dependency, EULA dialog, and links for Web UI and user forum in More Info
  • test for package repo to allow update notification
  • v3 hopefully fixed an issue with the Serviio DSM icon in DSM 3.2 on NAS units without Optware installed
  • v2 inclusion of a modified version of the PHP Web UI
  • v1 new minor Serviio release with some updated international translations – will upgrade 0.6 preserving the media library
  • 0.6 v1 first public release
  • 0.6b4 v2 fixed permissions on transcode temporary folder following upgrade, avoiding the need for a reboot
  • 0.6b4 v1 added upgrade scripts to allow media database migration (install future packages over the top of this one – database is preserved)
  • 0.6b3c v2 fixed HOME env var for serviio user (to fix librtmp issues with BBC iPlayer) and removed the need to edit the passwd file to change the shell (safer)
  • 0.6b3c v1 initial spk test release


173 thoughts on “Serviio 0.6 package for Synology NAS with Web UI

  1. Peter59

    Hi Patters. I wish you the best for 2012 !!
    I’m commenting you great “how-to” to report an issue I’m having with the installation of the servioo package. I have a DS1511+ Synology NAS running DSM 3.2-1955 and There’s no way for me to get Servioo working. Do I need to disable the DSM built-in DLNA server ?

    I’ve installed Java 7 and servioo of course. Java is reported as stopped, and Servioo is stopped too. when I click on its icon in the admin tab and I get the big red cross saying that the servioo service has not been found. I’m kinda disapointed, servioo seems so powerfull :-(
    I uninstalled thoose twice with no luck :(

    When you get back from holidays, maybe you could help me with few advices ? Maybe java 7 isn’t working afterall, need I to uninstall Java 7 and install Java 6 ?

    ANyway, thanks for your help

    1. patters Post author

      Can you try connecting to your NAS via SSH and running the command:
      java -version

      Is there an error? No one has yet given me feedback as to whether Oracle’s Java 7 works on Intel (I don’t have an Intel syno to test). Their last version didn’t but that could just have been a bug (possibly with DSM).

  2. Peter59

    Hi, sorry for the version 7 feedback, I uninstalled it, I installed version 6, and this time it worked… Except, Servioo doesn’t work either way after a fresh install.

    I saw a lot of things in the log.. then after a while of nothing new in the log, I stopped the Servioo, then launched it again, and Voila !!
    It worked, I mean, the only thing working right now is the UI with all the options. But this is a start.

    Thanks for your support.

  3. batserra


    First thanks for the program, but i have a error ,when i try in transcode change tmp folder i get the errno: 2 , i had the same error in library but i changed to /volumne1/video folder. But when i try to change in the transcode to /volume1/tmp i get the same error.

    I’m using Serviio v with Dsm 3.2 and 110j Nas server, also ,in the control user ,servioo user have read permisions. How i can fix it?

    Sorry with my english

    Thanks for all

      1. batserra

        Thanks patters, but the same ,after some seconds with a busy ,the windows change to ajaxx tree file browser in the windows and a this message to you want to change transcoded files location from “/volume1/@tmp” to “/”?
        What i’m doing wrong?

  4. Pete

    This worked brilliantly for me on my ds212j. Thanks a great deal for putting the package and instructions together, much appreciated.

    One serviio related gotcha that tripped me up for a while was that it doesn’t seem to like library paths with spaces escaped, but once I discovered this everything was downhill.


  5. Pavol

    Hi, thanks for great package. I managed to install it to my ds212+ BUT there is one little problem – my NAS is now always running, it does not go into sleep mode. Is it because automatic update of library is on?

  6. Jon

    Hi there,

    Wow this looks awesome…feel gutted I am on my second SyNo nas and have only just found it!!!! Thank you for all your work on this, sure im not the first to say that!

    Have installed as instructed, webservices enabled, java sorting out (yikes pain, but worth it) and servio package installed….

    When I go to run I get a big red circle of doom and the following underneath…

    Cannot get status
    Cannot connect to Serviio server, it does not seem to be running. Exiting

    Its late and im probably doing something stupid, but would really appreciate a pointer.

    Thanks again

    Jon :0D

    1. patters Post author

      It most likely is working, it’s just that the PHP Web UI seems to flake out when the server is busy. I’m switching to a different Web UI in the next version of the package which should fix that issue. You could use the Serviio Remote Console to configure Serviio from another computer. See the FAQ on the Serviio site for details.

  7. batserraluis

    New update to 0.6.1-006 ????

    Hi today i find that i cap upgrate my serviio to another new version, but always when i try to download there is an error.
    Can i download manually?

    Whats new in this version?

    Thanks a lot

  8. Tibi

    Hi there! Great post!
    Can you take a look at my error and tell me more precisely from where i can download the rquested file?

    i just have to copy this file into public folder?

  9. ben

    can you post an spk link for the java installation? i cant seem to add the repo in my isp.. i think it is being blocked by my isp.. i tried with another syno on another isp and it was ok but not with this isp..

  10. Chey

    Hello, Happy New Years !
    Thx for ur job.

    I have a 110J synology with the 4.1 DM.
    All seem to be working fine… but i have some Pb…
    I can’t see the Serviio Icon on my dsm menu to manage it ? java 7 is installed on my nas synology.

    Thx for ur reponse.


Leave a Reply to Tibi 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