RedPanther
Posts: 6
Joined: Thu Sep 12, 2019 9:20 pm

How to set up a MiniDLNA media server(painless!!)

Sat Sep 14, 2019 5:17 am

Warning, this process has required a lot of time, patience, and rebooting. Set up process so far:

To make things easy for this whole process, you can use the command “sudo su” then “cd” to run as the root user and not have to type sudo every time

1) Updating the system:

Code: Select all

sudo apt update && sudo apt full-upgrade -y
and reboot:

Code: Select all

sudo reboot -h now
2) Install basic utilities for desktop DLNA server:

Code: Select all

sudo apt install ntfs-3g minidlna -y
3) Identifying and Mounting drives to system at boot
Identify drives:

Code: Select all

sudo blkid
Mount drives to the system:

Code: Select all

sudo nano /etc/fstab
Here we add our drives the system. I added mine using the PARTUUID identifiers to the end of the file. A quick example of how I added my drives:

Code: Select all

PARTUUID=06ecb0e7-01   /Server/Drive01    vfat    defaults    0    2
PARTUUID=b32565ef-01    /Server/Drive02    vfat    defaults    0    2
PARTUUID=bd4189b5-34cd-49e9-b7d3-2b72055263c7    /Server/Drive03    ntfs    defaults    0    2
PARTUUID=64318921-01    /Secure    vfat    defaults    0    2
Using PARTUUID is more reliable than using say “/dev/sda1”. If you unplug a drive from your computer, it may not have the same identifier the next time it’s plugged in otherwise, and thus won’t mount properly to your system. The second area is where you want your drives mounted. Next, we choose the drive format. Then we set our mounting options, feel free to edit these if you’re more familiar with them. Followed by a couple more mounting identifiers. Since I chose defaults mounting options, my identifiers are 0 and 2.
After you have finished editing your mounting options you can run “sudo mount -a” to ensure all your drives are properly mounted, then reboot.

4) Once your rebooted, we move on to editing our MiniDLNA server configuration.
In terminal enter the following:

Code: Select all

sudo nano /etc/minidlna.conf
In this file, go down until you see the line:

Code: Select all

#user=minidlna
and remove the #. Keep going in the file until you see a section reading:

Code: Select all

# Path to the directory you want scanned for media files.
At the end of this paragraph you should see an example directory already made for you. Add your own media directories here, making sure to delete the example one they gave you. Here are my directories:

Code: Select all

media_dir=V,/Server/Drive03/Movies
media_dir=A,/Server/Drive03/Music
media_dir=P,/Server/Drive03/Pictures
Almost done! After you’ve added your directories, go down until you see the line

Code: Select all

#friendly_name=
Delete the # and add whatever name you want for your server at the end:

Code: Select all

friendly_name=Pi Media
Yes, you can use spaces, as long as it’s on the same line. Save changes to the conf file and close it.
Finally, we are ready to get the DLNA server going. So we run a couple commands in terminal before we start:

Code: Select all

sudo services minidlna restart && sudo services minidlna force-reload

Once you’ve finished everything here, hop on your favorite DLNA client and enjoy!
Oh yeah, one last thing. Reboot. :lol:

Return to “Beginners”