1

I have installed minidlna on my Ubuntu Server installation and set up the .conf file. However, minidlna is not visible to any devices.

I have restarted the daemon by running sudo service minidlna restart as well as rebuilt the database sudo service minidlna force-reload but nothing is permitting minidlna to be visible.

what should I alter so that my devices can stream from minidlna

Here are the settings I have in my .conf file -

media_dir=/media/username123/Media/TV Shows
db_dir=/home/user/.minidlna
log_dir=/var/log
log_level=fatal
network_interface=enp10s0
port=23424
friendly_name=StreamingService
serial=681019810597110
inotify=yes
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg
album_art_names=AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg
album_art_names=Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg
enable_tivo=no
max_connections=5

EDIT
The devices I want to be able to stream to are
1) Smart TV
2) Laptop(s)
3) Smart Phones

EDIT
The error message that the log file shows is

[2016/06/04 17:39:47] minidlna.c:303: fatal: ERROR: Failed to open sqlite database! Exiting...

Running nmap produces this result

ubuntuServer:~$ nmap -PN -p 9500 XXX.XXX.X.XXX

Starting Nmap 7.01 ( https://nmap.org ) at 2016-06-04 20:43 EDT
Nmap scan report for XXX.XXX.X.XXX
Host is up (0.000050s latency).
PORT     STATE  SERVICE
9500/tcp closed ismserver

Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds

4 Answers 4

2

How to for minidlna on ubuntu and mint linux

Open terminal and input the commands

  1. sudo apt-get install minidlna
  2. sudo cp /etc/minidlna.conf /etc/minidlna.orig
  3. hostname -I This will give you ip of your computer e.g. 192.168.1.5 this will be different on your machine.
  4. ifconfig

    enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 192.168.1.5 netmask 255.255.255.0  broadcast 192.168.1.255
            inet6 fe80::e3a5:d2b1:b311:45b1  prefixlen 64  scopeid 0x20<link>
            ether 12:aa:34:22:b3:13  txqueuelen 1000  (Ethernet)
            RX packets 14831  bytes 9222619 (9.2 MB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 10780  bytes 1158279 (1.1 MB)
            TX errors 0  dropped 0 overruns 0  carrier 1  collisions 0
    
  5. Note your interface name in my case its ensp20

  6. sudo nano /etc/minidlna.conf

    nano is a text editor avilable on most of the linux distributions. you can use any other text editor if required like gedit, vi, atom .... remove everything inside the file and paste this content.

    network_interface=enp2s0
    media_dir=A,/home/YOUR-PC-Username/music)
    media_dir=P,/home/YOUR-PC-Username/pictures)
    media_dir=V,/home/YOUR-PC-Username/videos)
    friendly_name=MyMovie
    db_dir=/var/cache/minidlna
    log_dir=/var/log
    inotify=yes
    port=8200
    

save it using Ctrl+X then press Y then Enter

  1. Add content to /home/Your_PC_Usernmae/video and picture and music
  2. sudo service minidlna restart
  3. sudo service minidlna force-reload
  4. sudo minidlnad

Done.

Now open bubbleupnp or upnp supported app of your choice in android. I am using bubble upnp.

  1. click folder in bottom right corner
  2. On top left corner select library
  3. If everything is correct and working properly you will see MyMovie
  4. Select it browse folder
  5. Enjoy!
1
  • I followed these settings and it worked like a charm, thank you
    – SdSaati
    Aug 17, 2021 at 22:03
1

For miniDLNA to be able to run properly we need to make sure we had set te appropriate permissions and directories we point to are present.

A default /etc/minidlna.conf for a service run by root may have the following content (amongst others):

# set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache
db_dir=/var/cache/minidlna

# set this if you would like to specify the directory where you want MiniDLNA to store its log file
log_dir=/var/log/minidlna

Of course we can define another directory for the database or the log files but these directories need to be present, and they need to have write permission from the user that runs miniDLNA.

In addition not all DLNA renderers may be able to see content on non-default ports. Let me suggest you also try to set it on the default port 9500 with

# port for HTTP (descriptions, SOAP, media transfer) traffic
port=9500
8
  • Which user would be running DLNA for streaming? Is it the user that is logged into the computer? Jun 4, 2016 at 20:52
  • I altered the settings above in my conf file (verified the logged in user was owner) as well as changed port to 9500 however my devices are still unable to see minidlna Jun 4, 2016 at 21:44
  • do you see the port open ? nmap -PN -p 9500 [serverIp]
    – bistoco
    Jun 4, 2016 at 23:42
  • @bistoco - see my edit. Seems the port may not be open...how would I open if that is the case? Jun 5, 2016 at 0:46
  • if maybe you're using ufw as firewall, check the status with sudo ufw status verbose. If active, open port 9500 with sudo ufw allow 9500, then run the status command to check if the rule was properly added, and confirm with the previous nmap command.
    – bistoco
    Jun 5, 2016 at 3:15
0

Looks like you have several issues. Then main thing is your conf file is inconsistent. You have the media stored under /media/username123, the database under /home/user and the service running under the default user name which I believe is minidlna. The whole thing makes it very easy to get your permissions wrong.

The syslog error message is saying that it failed to open the database. That indicates eith a permission problem or sqlite is not installed. I'm assuming its installed and that you have a permission problem.

I suggest that you:

  1. Create a username dedicated to minidlna ( I use "minidlna"). It is setup as an account that can't be logged onto;

  2. Put your media files / directories under one directory ( I use /home/minidlna );

  3. Set the ownership to minidlna:minidlna and the permissions to 660;

  4. Change your conf file to reflect this new setup;

  5. If you want to be able to access the media directories from a user account put the appropriate username in the minidlna group.

  6. I'm not sure if dlna will work if you change the port number, the clients have to be able to "discover" the port and IP address somehow and changing it from the default may cause a problem. I'd leave it on the default get everything working and once every one can see the server start playing around.

When setting stuff up for the first time its best to leave as much as possible at default "good" values, get it working and then make one change at a time to get "better". Once you are experienced with it you will know what changes work and can do new setups all at once.

0

I have a Samsung Smart TV, ZyXEL router, and Ubuntu server.

With only the Ubuntu server connected via wired connection, miniDLNA was not visible on any wireless device.

Very interestingly, as soon as I connected my windows laptop to the router to debug (2nd Wired Connection to rounter), miniDLNA started working over WiFi automatically.

I can't explain it, but it seems like a bridge between wired and wireless was created just by plugging in a second device to the wired network.

Hope that helps someone.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .