[debian] Howto install mini DLNA server

minidlna is a lightware DLNA server allow to stream media files (musics, pictures, and videos) on your Smart TV or Smartphone on a network.

Let’s start:

Install the server with apt:

apt-get install minidlna

Edit config file:

nano /etc/minidlna.conf
# set your media dir
media_dir=A,/home/alexis/musics
media_dir=P,/home/alexis/pictures
media_dir=V,/home/alexis/videos

# uncomment log_dir if you want
log_dir=/var/log

# uncomment max_connections
max_connections=50

Open UDP port 1900 and TCP port 8200 in your firewall, for iptables add the following rules:

iptables -A INPUT -i eth0 -p udp --dport 1900 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 8200 -j ACCEPT

Restart the server:

service minidlna restart

Job done!

Note: to regenerate minidlna’s database type:

minidlnad -R

Note2: to view MiniDLNA status open http://127.0.0.1:8200/ in your browser

Note3: Working great on Samsung Smart TV