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.