User Tools

Site Tools


FreeBSD Installation Guide (also Nas4Free applicable)


Serviio via the FreeBSD Ports collection is not too difficult to set up. It will, however, take some time to compile based on the speed of your PC. The following instructions were adapted from my notes taken and posted on Github for my home FreeBSD server. They worked with Serviio 1.2.1_1 and version 1.4beta of the PHP WebUI. If your run into any issues or are looking for more information please check out or submit an issue at
–Jason Unovitch, July 2013
–Updated: lokotito, Sept 2016


* Please substitute, /PATH/TO/MEDIA,, and the email address for what works in your environment. Your chosen '' must be resolvable by DNS in order to prevent issues during startup.

* It's assumed that you have a current ports collection and ports-mgmt/portmaster will be used for installing from ports. If not perform the following

portsnap fetch update
cd /usr/ports/ports-mgmt/portmaster && make install clean

Optional Prerequisite (Serviio via Ezjail)

Serviio can be installed in a Jail and presented access via a read-only Nullfs mount of media directory. If you already have sysutils/ezjail configured then you can do that via the following.

ezjail-admin create
mkdir -p /usr/jails/
echo '/PATH/TO/MEDIA /usr/jails/ nullfs ro 0 0' >> /etc/fstab.pc5dczc_mydomain_name
ezjail-admin console -f

Optional Nas4Free Prerequisite (Serviio via TheBrig jail manager)

Installed in a Jail and presented access via a read-only Nullfs mount of media directory. If you already have TheBrig - one Jail manager for N4F configured then you can add the following full/slim jail.

Start on boot: CHECKED
In jail allow: chflags, mount, mount.devfs, mount.nullfs, mount.procfs, mount.zfs
mount/umount jail's fs: CHECKED
Enable mount devfs: CHECKED

Install Packages from Ports

Set recommended ffmpeg options then install Serviio via the Ports collection. The newest version of serviio (which if you're installing from here it's the version you'll have) will require ffmpeg2 instead of 1. I've also added an install of dcraw, while it's not required you won't be able to use some of the thumbnail and image features of serviio without it.

portmaster graphics/dcraw
portmaster net/serviio

Set 'DLNA' user to a different home directory and let pw create that directory. This is required since Serviio needs a dedicated home directory to write to that is not met through the default 'DLNA' user provide by the Ports collection.

pw usermod dlna -m -d /var/dlna

Update serviio (only if ports are outdated)

At this point, if ports are outdated you can upgrade serviio as recomended F.A.Q. - Upgrade Serviio, then continue the installation.

Activate Serviio

* Note the shorter advertisement duration ensures device on your LAN see the server quicker than the default 3 minute possible wait. It is not required.
* If you wish to use the web interface, you may leave the remoteHost variable set to your local IP.
* If you decide to remotely manage this Serviio instance via a PC on your network, you can set that address as needed to a PC on your LAN and skip out on the remaining steps for setting up Apache/PHP and the PHP WebUI.

echo 'pc5dczc_enable="YES"' >> /etc/rc.conf
echo pc5dczc_args=\'-Dserviio.advertisementDuration=\"15\" -Dserviio.remoteHost=\"\"\' >> /etc/rc.conf
service serviio start

Congratulations! You can now access your Serviio page via serviio own web based console

If it's not running

If it doesn't run right away don't panic. There is a very verbose logfile here:


For starters check the ownership of all the files in the following files and directories. If they are not all owned by the DLNA user serviio will exit on it's own with no CLI messages.


Install Apache 2.4 and PHP5 prequisities for PHP WebUI Interface (not needed since 1.6 version)

If you are installing +1.6 version these steps are not necesary, however boot consoles can coexist in same instalation.

portmaster www/apache24
cd /usr/ports/lang/php55 && make config WITH_APACHE=YES
portmaster lang/php55 www/mod_php55 ftp/php55-curl textproc/php55-xml converters/php55-mbstring devel/php55-json textproc/php55-simplexml textproc/php55-dom

Fetch the current WebUI (not needed since 1.6 version)

More information regarding the unofficial PHP WebUI can be found at

cd /tmp && fetch
unzip -d /usr/local/www/apache24/data/

Configure httpd.conf file (not needed since 1.6 version)

Copy/paste the following Perl in-place edits to hard set the Serviio PHP directory as the root page served as well as configure required PHP prerequisites.

cd /usr/local/etc/apache24; cp httpd.conf httpd.conf.original
perl -pwi -e 's^DocumentRoot "/usr/local/www/apache24/data"^DocumentRoot "/usr/local/www/apache24/data/Web-UI-for-Serviio-Serviio-1.5"^g' httpd.conf
perl -pwi -e 's^<Directory "/usr/local/www/apache24/data">^<Directory /usr/local/www/apache24/data/Web-UI-for-Serviio-Serviio-1.5>^g' httpd.conf
perl -pwi -e 's^DirectoryIndex index.html^DirectoryIndex index.html index.php^g' httpd.conf
perl -pwi -e 's^AddType application/x-gzip .gz .tgz^AddType application/x-gzip .gz .tgz\n AddType application/x-httpd-php .php\n AddType application/x-httpd-php-source .phps^g' httpd.conf

Optionally, update email contact and host/domain name and copy/paste the following in-place edits.

perl -pwi -e 's^ServerAdmin you\@example\.com^ServerAdmin YOUR.EMAIL\^g' httpd.conf
perl -pwi -e 's^#ServerName^ServerName^g' httpd.conf

Activate Apache (not needed since 1.6 version)

echo 'apache24_enable="YES"' >> /etc/rc.conf
apachectl start

Now you can now access your Serviio page via

howto/bsd/install/freebsd.txt · Last modified: 2016/09/14 18:40 by lokotito