Code Monkey home page Code Monkey logo

pi_nas's Introduction

Raspberry Pi SAMBA NAS Setup Script

This script automates the setup process for creating a Network-Attached Storage (NAS) server using a Raspberry Pi. It installs necessary packages, mounts an external drive for storage (which you select), configures a Samba share for file sharing.

Prerequisites

  • Raspberry Pi running Raspberry Pi OS (I went with legacy 64 bit lite)
  • External storage device (SSD or hard drive)

Configuration

Before running the script, make sure to adjust the configuration variables in the script according to your preferences (can leave default):

  • MOUNT_POINT: The directory where the external drive will be mounted.
  • SHARE_NAME: The name of the Samba share.
  • USER_NAME: Pi username. pi by default.
  • GROUP_NAME: Pi groupname. pi by default.

Usage

Clone this repository to your Raspberry Pi

git clone https://github.com/MrLately/pi_nas.git

Navigate to the repository directory

cd pi_nas

Make the script executable

chmod +x pi_nas.sh

Run the script with root privileges

sudo ./pi_nas.sh

Further Configuration

I ran these after setup because they are what i wanted, you may want different:

mkdir -p /mnt/nas/Movies

mkdir -p /mnt/nas/Series

mkdir -p /mnt/nas/Pictures

mkdir -p /mnt/nas/Documents

To edit the SAMBA config further run:

sudo nano /etc/samba/smb.conf

Accessing the Samba Share

Once the setup is complete, you can access the Samba share from any device on your network. Use the following steps:

  1. Open File Explorer (Windows) or Finder (macOS).
  2. Enter the following address in the address bar: \RASPBERRY_PI_IP\SHARE_NAME Replace RASPBERRY_PI_IP with the IP address of your Raspberry Pi and SHARE_NAME with the configured share name.
gh gh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.