Set up a home media server with Raspberry Pi3

I’m turning this blog into a Raspberry Pi 3 project list..

Motivation

I was searching SlickDeal for a speaker one day for my home theater (literally just a projector + its curtain and stand), and found a deal on Samsung R3 Radiant 360 Speaker. MSRP is 300 and the deal price is only 120 bucks. The reviews for the speaker are pretty positive so I paid the money.

When I opened the associated Samsung Multiroom app for the speaker, I found that beyond toll free bridging to most popular music services, my router’s media server is also listed:

So I was thinking, if I’m able to run a local media server in LAN and connect this speaker to the server, I don’t need to connect my phone to the speaker all the time. Anyone in house is able to tap and play with the speaker.

However, my router’s media server is BS. No matter what kind of file system the USB drive I tried to connect to the router, nothing was added to the storage of the media server, always 1.6k storage. I turned to my Raspberry Pi again for an in house media service.

Steps

The steps to set up a media server is much less involved than setting up a Hadoop cluster since it is a single machine service.

  1. Prepare the storage. You can connect any portable disk(even NTFS format works) to your Raspberry to increase the storage. I already did this to serve HDFS so I’ll skip the details of this step, like below:

I partitioned my 1TB disk into 4 partitions, used 3 for my HDFS and the last one for my media server. If you are interested in how to partition a disk under Raspberry Pi, you can read this article. I mounted the partition under /media/HDD:

2. Install miniDLNA

3. Modify configuration file in /etc/minidlna.conf :

Also, change /etc/default/minidlna

You must have guest/users ready for sure, if you don’t know how to create a user or user groups on Linux, check this post.

4. Pull all your music files into /media/HDD:

Make sure the files have the correct permission — 660. You can change the permission with:

5. Now you’re all reset, load the library and start the service:

6. Verify the service with service minidlna status :

You can also goto RASPBERRYPI-ADDRESS:8200/ in your browser to check if all the music files are listed:

That’s it! Now you can access your media server anywhere from your local network!

hacker, lifetime learner