I’ve bought Raspberry Pi 4 to use it as a DaaS (Desktop as a Service). I’ve needed a VPN server to securely connect to when I am traveling. I’ve needed a Cloud Server to replace Dropbox to have unlimited space. I’ve needed a NAS (Network-attached storage) to share files among my laptops and computers. I’ve also needed a Music Player Server to manage my music files and serve as a source for my amplifier. I’ve also needed a media player like Apple TV to play my movies, youtube etc.

In summary Raspberry Pi as:

  1. Cloud server
  2. VPN server
  3. NAS (this post)
  4. Music server
  5. Media Player

To be able to do all of the above, I think it is better to keep the original Raspbian distribution.

For achieving this I have installed Samba Server:

sudo apt-get install samba samba-common-bin  
sudo mkdir -m 1777 /share  
sudo emacs /etc/samba/smb.conf  

add the following:

[share]  
Comment = Pi shared folder  
Path = /share  
Browseable = yes  
Writeable = Yes  
only guest = no  
create mask = 0777  
directory mask = 0777  
Public = yes  
Guest ok = yes  

Create a Samba user:

sudo smbpasswd -a pi  
sudo /etc/init.d/samba restart