Raspberry Pi Samba Local File Server
by Abhishek Bestha in Circuits > Raspberry Pi
421 Views, 4 Favorites, 0 Comments
Raspberry Pi Samba Local File Server
![C3C2BE4C-28E1-4B3D-BF07-3E4E1004B006.jpeg](/proxy/?url=https://content.instructables.com/FMI/7MNK/KHXF3Q9H/FMI7MNKKHXF3Q9H.jpg&filename=C3C2BE4C-28E1-4B3D-BF07-3E4E1004B006.jpeg)
![E8F47BCF-BE81-4D0E-AF93-9FB8DFBE1F8E.jpeg](/proxy/?url=https://content.instructables.com/FJO/LE08/KHXF3Q7X/FJOLE08KHXF3Q7X.jpg&filename=E8F47BCF-BE81-4D0E-AF93-9FB8DFBE1F8E.jpeg)
Step by step procedure for installing local file server
Requirements
- Raspberry pi
- 8GB SD card
- hard disk
Optional
- monitor
- keyboard
- mouse
- 8GB SD card
- hard disk
Optional
- monitor
- keyboard
- mouse
Installing Raspberry Pi OS
![8AF1D326-DAE4-4A8E-8BDD-7B5205143D97.jpeg](/proxy/?url=https://content.instructables.com/FUB/W7WK/KHXF3P0O/FUBW7WKKHXF3P0O.jpg&filename=8AF1D326-DAE4-4A8E-8BDD-7B5205143D97.jpeg)
![581B0A7F-56E9-4734-A683-C3FD515A78EA.png](/proxy/?url=https://content.instructables.com/FXZ/BQTE/KHXF3P0R/FXZBQTEKHXF3P0R.png&filename=581B0A7F-56E9-4734-A683-C3FD515A78EA.png)
1. Download Raspberry pi OS from Raspberry official website
2. Download balena etcher from below link
- https://www.balena.io/etcher/
3. Next insert an 8GB memory card to your PC or laptop
4. Just your inserted SD card and choose OS
Click on FLASH
2. Download balena etcher from below link
- https://www.balena.io/etcher/
3. Next insert an 8GB memory card to your PC or laptop
4. Just your inserted SD card and choose OS
Click on FLASH
Connecting Raspberry Pi Through Ssh
![5D08FC9A-5A6D-4F83-9011-CED3350F8535.jpeg](/proxy/?url=https://content.instructables.com/F8N/C9L0/KHXF3PFX/F8NC9L0KHXF3PFX.jpg&filename=5D08FC9A-5A6D-4F83-9011-CED3350F8535.jpeg)
- Once flash is completed, open memory card and and create an empty notepad
- Name it as “ssh” remove extensions.
After this insert SD card to raspberry pi and wait for sometime to boot up.
- Open terminal from your PC or laptop
- Type “ ssh pi@IPADDRESS OF YOUR PI ”
Note:
If now you have monitor directly connect to monitor no need of ssh.
- Name it as “ssh” remove extensions.
After this insert SD card to raspberry pi and wait for sometime to boot up.
- Open terminal from your PC or laptop
- Type “ ssh pi@IPADDRESS OF YOUR PI ”
Note:
If now you have monitor directly connect to monitor no need of ssh.
Follow Terminal Commands
Open terminal and follow below commands
sudo update && sudo upgrade
INSTALL SAMBA
sudo apt-get install samba samba-common-bin
NTFS
Sudo apt-get install ntfs-3g
TO SEE ALL CONNECTED DRIVES MOUNTED OR NOT
Sudo lsblk
FIND DRIVE UUID
Sudo blkid
DRIVE SETUP IF NOT MOUNTED
sudo nano -Bw /etc/fstab
Hard Drive mount
UUID=0000000000000000 /mnt/USB1 auto defaults,user,nofail 0 2
UUID=0000000000000000 /mnt/USB2 auto defaults,user,nofail 0 2
Note: copy and paste UUID number from blkid
SAMBA SETUP
sudo nano /etc/samba/smb.conf
[Movies] //This is the folderswhichwecan share
comment = Movies
public = yes
writeable = yes
browsable = yes
path = /mnt/USB1/Movies
create mask = 0777
directory mask = 0777
guest ok = yes
only guest = no
[TV]
comment = TV
public = yes
writeable = yes
browsable = yes
path = /mnt/USB2/TV
create mask = 0777
directory mask = 0777
guest ok = yes
only guest = no
RESTART SAMBA SERVICES
sudo service smbd restart
sudo update && sudo upgrade
INSTALL SAMBA
sudo apt-get install samba samba-common-bin
NTFS
Sudo apt-get install ntfs-3g
TO SEE ALL CONNECTED DRIVES MOUNTED OR NOT
Sudo lsblk
FIND DRIVE UUID
Sudo blkid
DRIVE SETUP IF NOT MOUNTED
sudo nano -Bw /etc/fstab
Hard Drive mount
UUID=0000000000000000 /mnt/USB1 auto defaults,user,nofail 0 2
UUID=0000000000000000 /mnt/USB2 auto defaults,user,nofail 0 2
Note: copy and paste UUID number from blkid
SAMBA SETUP
sudo nano /etc/samba/smb.conf
[Movies] //This is the folderswhichwecan share
comment = Movies
public = yes
writeable = yes
browsable = yes
path = /mnt/USB1/Movies
create mask = 0777
directory mask = 0777
guest ok = yes
only guest = no
[TV]
comment = TV
public = yes
writeable = yes
browsable = yes
path = /mnt/USB2/TV
create mask = 0777
directory mask = 0777
guest ok = yes
only guest = no
RESTART SAMBA SERVICES
sudo service smbd restart
Accessing the Server Files
![A3AD7ADB-19E7-442C-9051-6ADD71A227C3.jpeg](/proxy/?url=https://content.instructables.com/FY4/NQKN/KHXF3Q09/FY4NQKNKHXF3Q09.jpg&filename=A3AD7ADB-19E7-442C-9051-6ADD71A227C3.jpeg)
![AA8D881E-70C4-422A-8603-08D9C4734EC4.jpeg](/proxy/?url=https://content.instructables.com/FE5/H6L4/KHXF3Q0X/FE5H6L4KHXF3Q0X.jpg&filename=AA8D881E-70C4-422A-8603-08D9C4734EC4.jpeg)
![813A6EEF-D954-43CD-A677-D9F83E8C926D.jpeg](/proxy/?url=https://content.instructables.com/FYP/P6P5/KHXF3Q14/FYPP6P5KHXF3Q14.jpg&filename=813A6EEF-D954-43CD-A677-D9F83E8C926D.jpeg)
![18A4EC15-D4CB-424F-B163-6F0BD556D3B2.jpeg](/proxy/?url=https://content.instructables.com/FMG/L43C/KHXF3Q0G/FMGL43CKHXF3Q0G.jpg&filename=18A4EC15-D4CB-424F-B163-6F0BD556D3B2.jpeg)
In Mac
- Go ➡️ Connect to server ➡️ Type IP address of your pi
In windows
- This PC ➡️ Networks
- Go ➡️ Connect to server ➡️ Type IP address of your pi
In windows
- This PC ➡️ Networks