Serving Files With Samba
The first networked Pi to put into service will likely be a LAN file server. Why Samba? Tried and true. Samba plays nice with Windows, Linux and Mac and file managers on client computers present the file system in a traditional expected fashion, such that casual users are familiar with the interface. The process for building the file server is fairly straight forward.
- Download the DietPi (Debian OS) iso for your SBC.
- Write the iso (image) to a micro SD card with Balena Etcher or Raspberry Pi imager.
- You have two choices for the first boot.
- An Ethernet connection permits an SSH connection on the first boot
- If Ethernet is not available then you need a keyboard and monitor to set-up WiFi
- Set-up your SBC, insert the SD card and power on.
- When the SBC boots, login as root:dietpi either via SSH or monitor/keyboard
- Go through the first boot process dietpi-config , setting time zone, name, passwords, etc.
- Use dietpi-software to install Avahi and Samba
- Reboot and you can then perform all set-up via SSH
- Plug in a USB SSD for file storage and mount the drive using dietpi-drive_manager
- Reboot to make sure the drive mounts properly
- Add users to Debian
- Set-up Samba so that your users have access to the drive
- Done!
Of course Samba is not your only access to your file server. SFTP is available by default because SSH is active on all instances of DietPi. As well as the command line over SSH (mv, cp, rsync,etc...).