Close
0%
0%

Pi Zero 2w Mini DLNA Server

Pi Zero 2w mini DLNA Server for use on home wifi or on a phone hotspot

Similar projects worth following
This has to be the cheapest DLNA Server (media streaming server) using a Pi zero 2w that draws less than 2 watts of power usage over USB. Great for in car movie streaming to keep the kids happy on a long drive. For £14 Pi and a £13 SD card or a micro USB, this has to be the cheapest way to stream media to lots of devices. In tests I had up to 4 devices (tablets and phones) watching different films / music at the same time Runs Samba, MiniDLNA, Apache and Cockpit (Web based administration of this server). I am surprised the little PI can run it all but it does. once set up you can access media via Smart TV, SMB over network or via Web browser. Just copy media up to the severs Music or Video folder over network, this does the rest. Tested on Pi Zero 2w and Pi 4B. Thanks to stormandsky.com for the backgrounds and DirectoryLister for file lists. Thanks to Cockpit for remote admin

This simple media server will install and run Samba (for copying media to this server / watching via network), Apache (and PHP) for hosting via a web page to view / listen to media, DirectoryLister for a nice presentation of directory listings of media and Webmin to administrate the server and perform updates (without needing to use the command line) and Mini DLNA server to host your media across the network to your smart devices like TV's.

Demo video of the webserver :-

The following assumes you know some IT administration and are farmiliar with using SSH and Nano text editor.

For me a 128GB SD card is ideal since the OS is only 400Mb in size and there is plenty of room to store films and music.

Steps to set up :-

use a SD card and use the Pi Imager software to write a Pi lite image (no desktop) to the SD card.

before selecting to write the image, edit the settings to allow SSH log in, set your wifi to connect to and its password. set the hostname to 'minipi'. also set a user of pi and set a common password (useful for ssh logging in and logging in via web based administration).

Once done, place the SD card in the Pi and power it on.

log in to your router and list the devices to see 'minipi' and then you can use this ip address  (later on) to SSH into the server. or you can use Angry IP scanner to find the minipi servers ip address.

use SCP (built into linux but can be downloaded for windows) and copy up the pi-setup.zip using :-

scp ./pi-setup.zip pi@<PI SERVER IP>/home/pi

The zip file contains all of the config files and a set up script that installs software and copies the config files into the correct locations.

now you can ssh into the minipi server and run raspi-config and select advanced options. 

Then select to expand storage to use the whole card size.

once complete reboot the pi and then log back in via SSH and run unzip pi-setup.zip.

then move into the directory by using the command cd /mini-pi.

Edit the WPA-Supplicant.config with your wifi and hotspot SSID and passwords.

Run chmod +x ./*.sh to make all sh scripts executable.

Then run the mini-pi-setup.sh script in the /home/pi/mini-pi folder by typing sudo ./mini-pi-setup.sh.

The relevant software will be installed along with the config files needed. You will be prompted for a samba password for accessing the media file shares across the network.

The script will also install cockpit to administrate this server via the web (username pi and the password you have set).

Once complete the user will be prompted pressing a key to reboot the system.

if at any time you want to reconfigure the wifi network settings, just run reconfigure-wifi.sh and these will be written and moved to the correct location. then after rebooting, the mini pi will be on the new network.

to access via network you can put the name 'minipi.local' into your file explorer window and provide the user name of pi and the password you set earlier on. now you can see the Video and Music folders. now you can copy your media up to the server via samba share or via the cockpit web administrations 'navigator' add on.

The cockpit web based administration has a file navigator added on that a user can copy more movies from a USB pen drive to the media location (/var/lib/minidlna folder) but the USB pen drive will need to be mounted first to copy files.

have fun.

pi-setupV1-61.zip

Version 1.61 with changes and tidy up of reconfigure wifi script and setup script. also updated the cockpit log in page with a picture of Millau viaduct. also changes from V1.5 include :- Samba updated as it broke on previous version. Web page updated to only load images when user selects to change background. Web page changed to work properly on mobile devices with small screens (buttons now work). Lm-sensors plug in added to cockpit for live temperature reading of CPU. Added file manager in cockpit so users can upload media. Softlinks added to the Pi Home directory to make navigation to the media folder easier. A few other fixes to the mini-pi-setup.sh file for installation

Zip Archive - 46.56 MB - 07/12/2025 at 14:23

Download

  • 1 × Flirc case for Pi Zero 2 w A nice case to finish the project off
  • 1 × SanDisk 128GB Extreme PRO microSDXC card High performance SD card. dont cheap out. although the Kioxia Exceria Plus U3 is also a good card
  • 1 × Micro USB lead well you do want to power the device, right ?
  • 1 × SanDisk Ultra 256GB Dual Drive A USB and Micro USB pen drive to transfer your videos and music from a pc onto the PI but you can copy media across the network via samba to the Pi server

  • Version 1.61 now has Millau Viaduct

    diddy11 hours ago 0 comments

    The log in screen for Cockpit has been updated with a picture of Millau Viaduct.

  • Version 1.5 is now ready to download

    diddy4 days ago 0 comments

    Lots of changes in V1.5. 

    Samba updated as extended mac support broke samba. 

    Web page updated to only load images when user selects to change background. 

    Web page changed to work properly on mobile devices with small screens (buttons now work). 

    Lm-sensors plug in added to cockpit for live temperature reading of CPU. 

    Added file manager in cockpit so users can upload media. 

    Softlinks added to the Pi Home directory to make navigation to the media folder easier. 

    A few other fixes to the mini-pi-setup.sh file for installation

    Also works a treat on Raspberry Pi 4

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates