Do it your self Hobby

Install Samba server on a Raspberry Pi 4

You can have your own file server at home using a Raspberry Pi and Samba server installed on it. Connect to your raspberry pi and enter this command to install samba:

sudo apt-get update
sudo apt-get install samba samba-common-bin

Let’s add pi user to Samba

sudo smbpasswd -a pi

You will be prompted to enter the password twice.

Now we will create a share folder to the home directory of pi

mkdir /home/pi/share

Configuring Samba

Let’s make a backup of the original configuration of Samba first.

sudo cp /etc/samba/smb.conf /etc/samba/smb.bak

Now open the configuration file:

sudo nano /etc/samba/smb.conf

Go down to the bottom and paste this code:

     comment=Shared Files
     only guest=no
     create mask=0777
     directory mask=0777

Save the file and restart samba

sudo service smbd restart

You can use a windows computer to see if it works. Open a file explorer and on the address type the ip address of your PI


You should see your shared folder.