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:
media_dir=V,/mnt/pool/movies media_dir=A,/mnt/pool/music media_dir=P,/mnt/pool/photos 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_enable="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.