# STEP17
# OPTIONAL: Install a DLNA server (browse and stream the music very easily with your Upnp music player client )
# MiniDLNA Project:
https://sourceforge.net/projects/minidlna/
# Install DLNA server type:
$ sudo apt install minidlna
# Edit configuration the server:
$ sudo nano /etc/minidlna.conf
media_dir=A,/mnt/media friendly_name=MusicLounge
# CTRL+O to save
# CTRL+X to exit
$ sudo systemctl enable minidlna
$ sudo systemctl start minidlna
$ sudo systemctl status minidlna
# That’s it! you can now browse the music library with your Upnp music player like BubbleUpnp
# to check the status of the DLNA server open your net browser and type the ip address of the Raspberry followed by the dedicated port 8200:
# http://192.168.x.x:8200
TROUBLESHOOTING
# force update minidlna database
$ sudo systemctl stop minidlna.service
$ sudo systemd-run -t /usr/sbin/minidlnad -r -f /etc/minidlna.conf
$ sudo systemctl restart minidlna.service
# you can monitor DLNA database update
# “Finished parsing playlists” means it’s completed
$ sudo tail -f /var/log/minidlna/minidlna.log
# check the minidlna log
$ sudo cat /var/log/minidlna/minidlna.log
# in case of error:
WARNING: Inotify max_user_watches [16384] is low or close to the number of used watches [2] and I do not have permission to increase this limit.
# edit /etc/sysctl.conf to change the limit
$ sudo nano /etc/sysctl.conf
# add these lines
fs.inotify.max_user_instances=8192 fs.inotify.max_user_watches=524288
#
# check the status of minidlna service
$ sudo systemctl status minidlna
# in case of error related to autofs
/lib/systemd/system/minidlna.service:4: Failed to add dependency on autofs, ignoring: Invalid argument
# edit service to apply this fix
$ sudo nano /lib/systemd/system/minidlna.service
# and replace autofs by autofs.service
# CTRL + X and Y to SAVE
$ sudo systemctl daemon-reload
$ sudo systemctl restart minidlna