Skip to content

AssachanDev/Nas-Setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 

Repository files navigation

NAS Setup Guide

A professional guide for setting up a private NAS using Ubuntu Server, Samba, and Tailscale.

Build your own private cloud storage with secure remote access and cross-platform compatibility.

Ubuntu Samba Tailscale License


✨ Features

  • πŸ“‚ Simple Storage: Minimalist setup with a single root directory for all your files.
  • πŸ” Secure Access: User-based authentication for Samba shares.
  • πŸš€ Remote Ready: Integrated with Tailscale for secure access from anywhere without port forwarding.
  • πŸ’» Cross-Platform: Easy mounting on Linux (Arch/Ubuntu), Windows, and macOS.
  • βš™οΈ Auto-Mount: Support for persistent connections via /etc/fstab.

πŸ”§ Stack

Tool
OS Ubuntu Server (LTS recommended)
Sharing Samba (SMB/CIFS)
Networking Tailscale (WireGuard-based Mesh VPN)
Editor Neovim / Vim / Nano

πŸš€ Setup Steps

1. Prerequisites & Preparation

Ensure you have a fresh Ubuntu Server install and Tailscale connected.

# Check available disk space
lsblk
df -h /

2. Install & Configure Samba

# Install Samba
sudo apt update && sudo apt install samba -y

# Create NAS Root Directory
sudo mkdir -p /mnt/nas
sudo chown -R $USER:$USER /mnt/nas
sudo chmod -R 775 /mnt/nas

3. Edit Configuration

sudo nvim /etc/samba/smb.conf

Add the following to the bottom of the file (replace <YOUR_USER> with your actual system username):

[NAS]
   path = /mnt/nas
   browseable = yes
   writable = yes
   valid users = <YOUR_USER>
   create mask = 0775
   directory mask = 0775

4. User Setup & Service Start

# Set Samba password
sudo smbpasswd -a <YOUR_USER>

# Enable and Start Samba
sudo systemctl enable smbd
sudo systemctl restart smbd

πŸ’» Client Connection

Manual Mount (Linux/Arch)
# Install client tools
sudo pacman -S smbclient cifs-utils

# List shares
smbclient -L //TAILSCALE_IP -U <YOUR_USER>

# Mount
sudo mkdir -p /mnt/nas-name
sudo mount -t cifs //TAILSCALE_IP/NAS /mnt/nas-name -o username=<YOUR_USER>
Auto-Mount on Boot

Add to /etc/fstab:

//TAILSCALE_IP/NAS /mnt/nas-name cifs username=<YOUR_USER>,password=YOUR_PASSWORD,_netdev 0 0

πŸ› οΈ Troubleshooting

Problem Solution
Connection timeout Check Tailscale status: tailscale status
Login failure Reset Samba password: sudo smbpasswd <YOUR_USER>
Share not found Restart Samba service: sudo systemctl restart smbd
Permission denied Verify folder ownership: ls -la /mnt/nas

πŸ“„ License

MIT

About

Minimalist and secure private NASsetup guide using Ubuntu Server, Samba, and Tailscale. Access your files from anywhere!

Topics

Resources

Stars

Watchers

Forks

Contributors