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.

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 (usefull for ssh logging in).

You can use the zip file attached to this project and unzip it into the /home/pi folder on the SD card that has just been created or follow the instructions below.

edit the wpa_supplicant.conf file setting up your wifi name and password. also the hotspot name and password can be edited here for your mobile hotspot when mobile.

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 use this ip address to SSH into the server

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 the mini-pi-setup.sh script in the /home/pi/mini-pi folder OR run the instructions below the dotted line.

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.

You will be prompted for a samba password for accessing the media file shares across the network.

The script will also install Webmin to administrate this server via the web.

-------------------------------------------------------------------------------------------------------------

These are the manual instructions if you cant run the set up script 'mini-pi-setup.sh'.

sudo apt-get install -q -y nano preload samba neofetch minidlna exfat-fuse exfat-fuse zram-tools apache2

From now on, editing of any files can be done by using 'nano' text editor within the SSH terminal remoting into the minipi.

now edit the smb.conf and add at the end :-

[Media]
   comment = Video-and-Music
   path = /var/lib/minidlna
   valid users = pi
   browseable = yes
   public = yes
   writeable = yes
   printable = no
   create mask = 775
   directory mask = 775
   forcegroup = root

Save this file and exit.

To enable user access via network run the command 'sudo smbpasswd -a pi' and add a password.

you need to add the password twice.

make two new directories in the folder /var/lib/minidlna named Video and the other named Music. 

now run 'sudo chmod 775 -Rv /var/lib/minidlna' to set the permissions for easy access and minidlna can read the media files.

save this and then open the index.html located in /var/www/html/ and overwrite everything with :-

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Mini-Pi Media Server</title>
    <link rel="stylesheet" href="./style.css">
    <link rel="icon" href="./favicon.ico" type="image/x-icon">
  </head>
  <body>
    <main>
<center>
        <h1>Welcome to the Mini-Pi Media Server</h1>
<h1>Click links below to view and play media files or check status of media server</h1>
<br>
<br>
<br>
<div>
<h1><a href="/files">List Media Files</a></br></h1>
<br>
  <h1><a id="Earth">Media Server Status</a></h1>
<script>
document.getElementById('Earth').href=''+window.location.origin+':8200';</script>
</div></br>
</div>  
</center>
    </main>
<script src="index.js"></script>
  </body>
</html>

save this.

now edit the wpa_supplicant.conf (changing the BOLD text...

Read more »