Simple Raspberry Pi NAS management system with guided storage setup, Samba sharing, safe-mode controls, and one-command network storage deployment.
Turn a Raspberry Pi and a USB storage device into a personal network-attached storage server with guided setup, simplified administration, and built-in recovery tools.
- Guided storage setup wizard
- Automatic drive detection
- Mount and unmount controls
- NAS-mode and external mount awareness
- Storage validation and storage-only status reporting
- Safe storage handling and recovery
- Samba-based network file sharing
- Automatic multiple shared-folder configuration
- Cross-platform device compatibility
- Share status monitoring
- Share user management
- Panic Lock emergency shutdown
- Safe Mode protection
- Service validation checks
- Samba repair utilities
- Startup service management
- Interactive terminal dashboard
- Storage and share status reporting
- Configuration management
- Mount point visibility
- Share user visibility
| State | Purpose |
|---|---|
| Offline | Storage safely unmounted and sharing offline |
| Mounted | Storage mounted in NAS mode or mounted elsewhere |
| Shared | Storage mounted in NAS mode and sharing online |
| Safe Mode | Sharing services disabled until manually started |
| Panic Lock | Emergency shutdown of active shares |
Each state is designed to provide visibility into the current status of your NAS while keeping storage management simple and predictable.
sudo nasberryConfigure storage devices, mount points, and NAS settings.
sudo nasberry setupRun a complete health check of storage, Samba, permissions, configuration, and system requirements.
sudo nasberry doctorNetwork share running and accessible from other devices.
Immediately stop sharing services and secure storage access.
git clone https://github.com/WastelandSYS/nasberrypi.git
cd nasberrypi
chmod +x install.sh uninstall.sh
sudo ./install.shLaunch with:
sudo nasberryNasberry currently supports Debian-family systems that provide apt-get, including Raspberry Pi OS, Debian, Ubuntu, and Kali Linux.
cd nasberrypi
sudo ./uninstall.shThe uninstaller removes the global nasberry shortcut and related application files. It does not remove your cloned repository folder.
Preview an uninstall without changing the system:
sudo ./uninstall.sh --dry-runUse --purge to also remove Nasberry's configuration and managed Samba settings. Storage data is never deleted. Run sudo ./uninstall.sh --help for all options.
Attach a USB SSD, HDD, or flash drive to your Raspberry Pi.
sudo nasberryUse the setup wizard to configure your storage device and mount point.
Create or configure your Samba share user.
Enable network sharing through the dashboard.
Windows:
\\hostname\Public
macOS/Linux:
smb://hostname/Public
Public remains the default shared folder. Add more managed shares with:
sudo nasberry sharesAndroid:
Use an SMB-compatible file manager such as:
- CX File Explorer
- Solid Explorer
- X-plore File Manager
Server:
hostname
Port:
445
Sign in using your Nasberry username and password.
iPhone / iPad:
- Open the Files app
- Tap the menu button
- Select Connect to Server
- Enter:
smb://hostname
- Sign in using your Nasberry username and password.
Launch the dashboard:
sudo nasberryMain management functions:
| Option | Description |
|---|---|
| Setup Storage | Configure NAS storage device |
| Mount Storage | Mount configured storage in NAS mode |
| Unmount Storage | Safely unmount storage |
| Start Share | Enable network file sharing |
| Stop Share | Disable network file sharing |
| Manage Shares | Add, remove, enable, disable, or toggle read-only shared folders |
| Repair Samba | Repair Samba configuration |
| Safe Mode CLI | Disable automatic sharing services |
| Panic Lock | Immediate shutdown of sharing services |
| Status Dashboard | View NAS health and status |
Help menu:
nasberry -hStorage-only status:
sudo nasberry storageThis reports the configured storage device, whether it is present, its filesystem, mount state, active mount point, configured Nasberry mount point, and disk space. Mount state is reported as mounted in NAS mode, mounted elsewhere, or safely unmounted.
If nasberry mount finds the configured drive mounted elsewhere, interactive use shows the current and configured Nasberry mount points and asks before moving the drive into NAS mode. Press Enter or answer n to leave the existing mount untouched.
Designed primarily for Linux systems.
Tested on:
- Raspberry Pi OS
- Kali Linux ARM
- Raspberry Pi 4B
- Raspberry Pi 5
- Raspberry Pi Zero 2w
Supported storage:
- USB SSD
- USB HDD
- USB Flash Drive
Supported clients:
- Windows
- Linux
- macOS
- Android
- iOS
Notes:
- Samba is installed automatically by the installer.
- ext4 is the recommended filesystem for Linux-based NAS deployments.
- Desktop environments may mount a configured drive outside the Nasberry mount point. Nasberry reports this as mounted elsewhere and asks before moving it into NAS mode.
- Setup creates a default
Publicshare and stores managed shared folders in/etc/nasberry/shares.json. - Nasberry updates only the clearly marked NasberryPi section in
/etc/samba/smb.conf. The previous file is backed up before changes, and unrelated Samba configuration is preserved. - Network share discovery behavior may vary by operating system.
Nasberry validates a candidate Samba configuration before replacing the live configuration and saves the previous configuration as /etc/samba/smb.conf.nasberry.<timestamp>.bak.
To inspect available backups:
sudo ls -1 /etc/samba/smb.conf.nasberry.*.bakBefore restoring a backup, validate it with testparm. Take Nasberry offline first, copy the selected backup to /etc/samba/smb.conf, validate the restored file, and restart Samba:
sudo nasberry offline
sudo testparm -s /etc/samba/smb.conf.nasberry.<timestamp>.bak
sudo cp /etc/samba/smb.conf.nasberry.<timestamp>.bak /etc/samba/smb.conf
sudo testparm -s /etc/samba/smb.conf
sudo systemctl restart smbdNasberry's core configuration is stored at /etc/nasberry/config.ini, and managed shared folders are stored at /etc/nasberry/shares.json. Run sudo nasberry doctor for diagnostics, sudo nasberry shares to manage folders, or sudo nasberry repair-samba to recreate and validate the managed Samba section.
The Nasberry PIN protects selected actions within Nasberry. It does not replace Linux account security, Samba passwords, SSH security, disk encryption, or physical security.
Nasberry performs privileged storage and Samba administration. Review release notes before upgrading, keep backups of important data, and test storage-related changes with a disposable drive first.
NasberryPi was built to simplify self-hosted network storage.
Instead of manually configuring Samba, mount points, permissions, and services, NasberryPi provides a guided interface that transforms a Raspberry Pi and a storage device into a reliable personal NAS in minutes.
The project focuses on:
- simple deployment
- safe storage handling
- reliable file sharing
- recovery and repair tools
- lightweight terminal administration
NasberryPi is released under the GNU General Public License v3.0. See LICENSE for the full license text.




