Freenas 8.0.x multimedia: Set up DLNA

In contrast to Freenas 0.7.x brings Freenas 8.0.x no DLNA support yet. This has now been solved with the "Multimedia" build. From the regular Freenas you can easily upgrade to "Multimedia" (even if you have used the same version before, e.g. from Freenas 8.0.3-p1 to 8.0.3-p1-Multimedia. When this is done (i.e. a version with multimedia support is running) DLNA only needs to be activated - you can use minidlna.

First the system must be mounted on the USB stick (or wherever Freenas is installed), with write access:

mount -wu /

Now you have to create a directory on the data pool where the minidlna-Config will be stored later and where the caches for thumbnails etc. "pool" has to be adapted to the counterparts of your own system (in my case the drive is called "data").

mkdir -p /mnt/pool/dlna/var/db/minidlna
cd /mnt/pool/dlna

Now copy the basic configuration into the newly created directory and open it in the editor:

cp /conf/base/etc/local/minidlna.conf .
ee minidlna.conf

In minidlna.conf there are different entries for pictures, videos and music (or a combination of these). There you have to specify the correct directory and configure a name for the DLNA server (further possibilities can be found in the file), e.g:

friendly_name=Media Server

To load minidlna at each startup, it must be enabled in rc.conf:

cd /conf/base/etc
ee rc.conf

There change the corresponding entry from "NO" to "YES":

minidlna_flags="-f /mnt/pool/dlna/minidlna.conf"

That's it - if everything went right, a DLNA server will appear on the network after a reboot. Unfortunately, minidlna does not automatically detect new files and therefore needs to be restarted regularly. The command for this:

service minidlna restart

I put this into a cronjob, run once a day at 04:30 - if you want to see a newly added movie immediately, you have to restart minidlna manually, but if you let the cronjob run more often it will interrupt the movie/music enjoyment. Whether this can be changed in the future is still open. Furthermore, in future Freenas versions (8.2.x and higher) it should be possible to configure DLNA directly via the web interface. Source for this short manual is the corresponding Thread in the Freenas-Forum: it also describes how to enable Bittorrent and iTunes support.

Update:FreeNAS 8.2.0 has been released, which includes minidlna as a plugin. How this can be configured best I describe in the corresponding blog entry: minidlna.conf tuning under FreeNAS.

Update 2: If you want to set up a completely new FreeNAS system, you might find a helpful suggestion in my Shopping list for a NAS based on the HP N40L Microservers. For about 500 Euro you get an expandable system that has enough power for various applications - including a minidlna server.


  1. please send me more infos for noobs: how to mount freenas with access rights so that I can enter the commands, everything is installed but I can't get on :(? thx

  2. If Freenas is running, connect to it via SSH - there you can mount the filesystem with the first command.

  3. Hello Falk,

    first of all, thanks for the manual!!! has worked great so far.

    if there weren't a catch to it... I can see all the folders, but they don't contain any contents!

    could it be because of the missing clearances?!

    1. What rights do the files in the folders have? Actually, even file formats that the PS3 cannot play, for example, at least appear in the list and are then displayed accordingly.

  4. Hey well I'm a complete beginner and I've been looking for a manual to get UPNP or DLNA running on my FreeNAS 8.0.4 Multimedia. I have imported a hard drive on my NAS with the name "Seagate", where all my videos etc. are stored. Do I have to use the 2nd command like this? -> "mkdir -p /mnt/seagate/pool/dlna/var/db/minidlna" sorry for the question, if you are wondering now but was I unsure about this?

  5. You will probably have to omit the /pool/ directory, since your pool is called "Seagate", if I am not mistaken. But if the path is wrong, nothing bad will happen, at most you will get an error message that the directory cannot be created.

  6. Hi. Nice guide. Everything worked out fine so far. The edited minidlna.conf is on the USB drive with the media files that volume is integrated in Freenas. But Minidlna can't be started, because the minidlna.conf can't be accessed from the USB drive from the DLNA service. Probably an authorization problem. What should I do now?

  7. Do you have FreeNAS on the same USB stick? Or is it a second USB stick? Didn't try your variant, in my case the Config is practically on the drive where the data is stored, and of course you can read/write there.

  8. Moinsens,
    you have a very good manual unfortunately i did something wrong he is looking for the minidlna.conf in the wrong directory
    At takeoff, there's always...
    " /mnt/Server/dlna# service minidlna restart
    minidlna not running? [check /var/run/].
    Starting minidlna.
    Error reading configuration file /mnt/pool/dlna/minidlna.conf

    The is in the run folder, not where was my mistake?

Leave a Reply

Your email address will not be published. Required fields are marked *