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 (phones,tablets and smart TV's) 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, or use a pen drive and sync media. 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 Cockpit 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 :-

See the instructions section on how to set up and upgrade

have fun.

pi-setupV1-9.zip

New version has a ncurses mini-pi-setup script thatguides the user through setup with option to disable swap which is good on a pi 4b but not on a Pi Zero 2w also added a USb auto sync which will automatically mount the pen drive and sync Music and Video folders. cockpit log shows the status and when the user can unpplug the USB pen drive

Zip Archive - 46.56 MB - 07/16/2025 at 20:52

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.9 new and improved

    diddy2 days ago 0 comments

    Version 1.9 now has a ncurses setup script (mini-pi-setup.sh) that guides the user through setting up along with the option to configure wifi and also asks the user if they want to turn on or off the swap file.

    On a Pi4b, the swap file can be turned off but its best to leave on for a Raspberry Pi zero 2w due to only 512mb ram.

    also added a USB sync service that runs in the backgorund to sync Music and Video from a plugged in pen drive

    Picture shows the log view in Cockpit showing the sync service and that the user can now unplug the pen drive.

    also a picture of the ncurses setup script running through Cockpit's Terminal window.

  • version 1.81 is out

    diddy3 days ago 0 comments

    Version 1.81 now has an updated setup script (mini-pi-setup.sh) that now asks a user at the end of the setup if they would like to reconfigure wifi settings.

    selecting no will reboot the mini-pi server.

    selecting yes will then open the reconfigure wifi script (reconfigure-wifi.sh) and take the user through setting up a 5ghz or 2.4ghz connection, country type and if they want a fallback network incase the main wifi connection does not work.

    The user will also be asked for a hotspot connection ssid and password.

    within the zip file contains not just configs and files but also the following scripts :-

    mini-pi-setup.sh  (setup this mini server). can be reran to set everything back to default.

    reconfigure-wifi.sh (reconfigure wifi cards and bring them back up on next reboot)

    usb-sync.sh (mount a usb pen drive and sync the Music and Video folders then unmount the pen drive afterwards)

    Enjoy.

  • version 1.75 is now available

    diddy4 days ago 0 comments

    The school of hard knocks decided to pay a visit last night when I found out the Pi OS Bookworm no longer uses wpa_supplicant.conf for wifi networks.

    as a result, running my script to configure wifi is ignored. the Pi just carries on using what ever wifi was set at the time of creating the sd card image using pi imager.

    so an updated reconfigure-wifi.sh script was written to handle wifi using nmcli and storing the hashed wifi passwords.

    Not so much of an issue on a Pi zero 2w as it only has 2.4Ghz wifi but if this project runs on a Pi 4B or above, the 5ghz network was just ignored.

    the upshot is that now a secondary wifi connection is handled now ( hotspot connection).

    to run, ./reconfigure-wifi.sh (within the pi-setup folder)

    the user is asked the country they are in (for wifi bands availability)

    wether to set up a 5Ghz wifi connection or a 2.4Ghz connection

    The wifi ssid and password

    The user is then asked if they want to set up a fallback wifi network just in case the 5Ghz wifi is not good enough or in range.

    the script then searches for this entered wifi connection and if this works then asks for a hotspot connection ssid and password.

    These are written to the correct locations and the mini-pi server rebooted.

  • USB pen drive sync function added

    diddy5 days ago 1 comment

    Version 1.7 now includes a 'usb-sync.sh' script that will copy all media on a USB pen drive to the /var/lib/minidlna folder. 

    subsequant runs will only sync the changes to /var/lib/minidlna folder

    It uses rsync to copy only changes from the pen drive.

    so only new media files added on the pen drive will be copied after the first copy has happened.

    to run, log into cockpit and type 'cd  /home/pi/pi-setup'

    then type 'sudo ./usb-sync.sh'

    example running in cockpit's terminal window :-

  • Version 1.61 now has Millau Viaduct

    diddy6 days 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

    diddy07/08/2025 at 19:15 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 6 project logs

  • 1
    how to setup / update

    Instructions to set up :-

    do the usual raspberry pi imager stuff and set the settings with a name of mini-pi (ideally this name).

    set the wifi to your wifi (and password) and set the user as pi and set to use ssh services.

    write the image

    once done power up the pi and log into your router to find the mini-pi ip address (or use a network tool like fing or angry ip scanner).

    once found then use a tool like scp (or winscp) to copy this pi-setup.zip file up to the mini server.

    for example (replace with the mini-pi ip address):-

    scp ./pi-setupV1-9.zip pi@192.168.8.10:/home/pi

    then ssh into the mini-pi using the ip address.

    once in unzip the pi-setupV1-9.zip file and this will decompress all files.

    cd into the pi-setup folder (cd ./pi-setup)

    then run chmod +x ./*.sh

    then finally run the mini-pi-setup.sh file by typring sudo ./mini-pi-setup.sh

    this will then run the setup and install all files and copy config files.

    you will be promted for a samba user password (its easy to use the same password as your ssh login).

    you can select to turn off the swap file or leave it on.

    you will also be asked if you want to reconfigure wifi settings (you can run this at anytime from within the pi-setup folder by running ./reconfigure-wifi.sh.

    then you can press enter to reboot.

    All setup now. have fun.

    if you are updating, its similar.

    just scp the zipped up file to the mini-pi, and then follow the instructions from the point of unzipping the file above

View all instructions

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