User Tools

Site Tools


OpenBSD Installation Guide

The following instructions will guide you through installation of Serviio onto an OpenBSD server. They have been verified to work with Serviio up to and including v1.8 and OpenBSD 6.0 amd64.

Ensure you have a clean working base install of OpenBSD (amd64 variant)

Install required packages and download Serviio
Once you have OpenBSD installed login to either a remote (SSH) or local console. If you logged on as any other user than ROOT start a new root level session by issuing:

$ sudo -s

Once we have a root level session we can begin the installation.

Use the OpenBSD PKG_ADD command to install the required pre-built packages. To do this we set the PKG_PATH environment variable to the appropriate URL. (See for a full list of mirrors).

At the command prompt enter:

# export PKG_PATH=

In order to run Serviio, OpenBSD needs three core packages to be installed, namely JDK-1.8 / FFMPEG / DCRAW. To install these we issue the following commands:

# pkg_add jdk

As of OpenBSD 5.8 there are two versions of the JDK available from the packages repository v1.7 and v1.8 as we will be using v1.8.x of Serviio when prompted choose option 2 to install the v1.8 JDK release.

Ambiguous: choose package for jdk
a 0: <None>
1: jdk-
2: jdk-
Your choice: 2

Then add FFMPEG and DCRAW using the following commands:

# pkg_add ffmpeg
# pkg_add dcraw

The system is now ready to run Serviio so lets download the latest release.

First lets add the WGET package in order to download the Linux GZIP from the Serviio website, do this by issuing the following command:

# pkg_add wget

Once installed lets download and extract the Serviio GZIP itself. I like to install Serviio in the /var directory on my server.

# cd /var
# wget http://
# tar -xvzf serviio-1.8.linux.tar.gz
# mv serviio-1.8 serviio
# rm /var/serviio-1.8-linux.tar.gz

Modify the Serviio launcher file
OpenBSD uses a slightly different layout for system and user binaries and given that the script isn't coded to handle OpenBSD by default the script is unable to find the necessary Java runtime to allow Serviio to launch.

My simple, if inelegant, solution is to edit the script to set the local path where the said Java runtime can be found. Using vi open the Serviio startup script.

# vi /var/serviio/bin/

Once open add the following line directly below the PROGNAME variable declaration.


Once done the file will look like this:

DIRNAME=`dirname $0`
PROGNAME=`basename $0`

One other quirk I discovered running Serviio on OpenBSD is that it can take a LONG time for the server to appear in the list of DLNA clients. This appears to be due to the beaconing interval default used within the Serviio code. In order to overcome this problem we need to add the following to the JAVA_OPTS string within the script:


The new launch command will look as follows:

# Setup Serviio specific properties
JAVA_OPTS=" -Djava.awt.headless=true -Dorg.restlet.engine.loggerFacadeClass=org.restlet.ext.slf4j.Slf4jLoggerFacade -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME -Dffmpeg.location=ffmpeg -Ddcraw.location=dcraw -Dserviio.advertisementDuration=60"

Save the file and exit vi, your Serviio instance is now ready to start. Do this by issuing the following:

# /var/serviio/bin/ &

Below is the log output (/var/serviio/log/serviio.log) of Serviio 1.5.2 successfully running on a new OpenBSD install. Unlike a standard Ubuntu install transcoding, including the Flash media browser, works straight out of the box!

2015-12-15 15:36:57,665 INFO [MediaServer] ————————————————————————
2015-12-15 15:36:57,670 INFO [MediaServer] Serviio DLNA media streaming server v 1.5.2 (rev. 4b9ce176daa1)
2015-12-15 15:36:57,670 INFO [MediaServer] Petr Nejedly 2009-2015
2015-12-15 15:36:57,670 INFO [MediaServer]
2015-12-15 15:36:57,671 INFO [MediaServer]
2015-12-15 15:36:57,671 INFO [MediaServer] Java 1.8.0_45-Oracle Corporation amd64
2015-12-15 15:36:57,672 INFO [MediaServer] OS OpenBSD 5.8
2015-12-15 15:36:57,672 INFO [MediaServer] File encoding: US-ASCII
2015-12-15 15:36:57,675 INFO [MediaServer] Headless mode enabled: true
2015-12-15 15:36:57,676 INFO [MediaServer] User: root
2015-12-15 15:36:57,676 INFO [MediaServer] User home dir: /root
2015-12-15 15:36:57,676 INFO [MediaServer] Temp dir: /tmp/
2015-12-15 15:36:57,677 INFO [MediaServer] ————————————————————————
2015-12-15 15:36:58,302 INFO [WebServer] Socket buffer set to 65535 bytes
2015-12-15 15:36:58,305 INFO [RestletServer] Starting Restlet server (/rest) exposed on port 23423
2015-12-15 15:36:58,615 INFO [RestletServer] Starting Restlet server (/cds) exposed on port 23424
2015-12-15 15:36:58,617 INFO [RestletServer] Starting Restlet server (/mediabrowser) exposed on port 23424
2015-12-15 15:36:58,682 INFO [DBSchemaUpdateExecutor] Checking if DB schema needs to be updated
2015-12-15 15:36:58,717 INFO [DatabaseManager] Using DERBY database language
2015-12-15 15:37:01,525 INFO [MediaServer] ————————————————————————
2015-12-15 15:37:01,526 INFO [MediaServer] License: PRO (EVALUATION, id: 11111111-1111-1111-1111-111111111113)
2015-12-15 15:37:01,527 INFO [MediaServer] ————————————————————————
2015-12-15 15:37:01,547 INFO [Device] Created UPnP Device with UUID: f021f470-ae6b-37c6-94c1-1703e9ab0cdc, bound address:

2015-12-15 15:37:07,582 INFO [FFMPEGWrapper] Found FFmpeg: ffmpeg version git-N-72901-g15466db Copyright © 2000-2015 the FFmpeg developers
2015-12-15 15:37:07,584 WARN [FFMPEGWrapper] FFmpeg is not compiled with librtmp support, RTMP streaming will not work.

2015-12-15 15:37:34,800 INFO [LocalLibraryManager] Starting automatic library scan
2015-12-15 15:37:34,803 INFO [LibraryDeltaScanner] Starting the library delta scan
2015-12-15 15:37:34,808 INFO [PlaylistMaintainerWorker] Started looking for playlist changes

Launch Serviio at boot
In order to succesffuly launch Serviio at system startup we must again amend the startup script , this time to include the full path for the FFMPEG and DCRAW binaries.

Change to the 'BIN' folder located within the newly created installation directory.

# cd /var/serviio/bin

Issue the following command to update the paths within the file:

# sed -i 's/=ffmpeg/=\/usr\/local\/bin\/ffmpeg/g'
# sed -i 's/=dcraw/=\/usr\/local\/bin\/dcraw/g'

Finally add the required launch command to the rc.local startup script:

# vi /etc/rc.local

Add the line :

echo 'Starting SERVIIO' && /var/serviio/bin/ &

All done!

howto/bsd/install/openbsd.txt · Last modified: 2017/06/08 08:05 by manxmann