Home NAS Server User Manual

Development Kit Accessories List

Component Name Quantity Specifications
PI-SG565D Single Board Computer 1 Quectel PI-SG565D Smart Ecosystem Development Board for Linux Learning with Python Programming and AI Kit
For more specs, refer to PI-SG565D Product Page
USB-A Power Adapter 1 Power Adapter
USB-C DP Cable / HDMI Cable 1 DP 1.4 spec; Length: 1m; USB-C (male) to USB-C (male)
HDMI 2.0 spec; Length: 1m; HDMI-A (male) to HDMI-D (male)
Ethernet Cable 1 Length: 1m; Gigabit transmission rate
SSD Solid State Drive 1 Official Raspberry Pi SSD Kit
CPU Cooling Fan 1 Raspberry Pi 5 Official Active Cooler with Heatsink and Thermal Pad
Display Screen 1 HDMI Monitor

Reference Image of Accessories

image-20251020140231957

  • Development Setup

    The PI-SG565D comes pre-installed with Debian 13, so no re-flashing is required. Just follow the steps below:

    Hardware Connection Steps

  • Install CPU Cooling Fan: Plug the fan cable into the FAN header on the board, then secure the heatsink clips into the mounting holes as shown:

image-20251017135403315

  • Install SSD:
    1. Install 3 nylon standoffs using short screws.
    2. Attach the GPIO adapter firmly.
    3. Insert the PCIe ribbon cable into the board’s PCIe slot and secure both sides.
    4. Place the M.2 HAT+ on top and secure it with 3 long screws.

Front view after installation:

image-20251017154640006

Back view:

image-20251017174920100

Side view:

image-20251017155047092

Finally, place the M.2HAT+ on top of the nylon post and use the remaining 3 long screws to secure the M.2HAT+ in place.

image-20251017170504185

  • Display Connection:Connect one end of the HDMI cable to the HDMI port of the single-board computer and the other end to the HDMI port of the monitor.

image-20251017144027933

  • Input Devices: Plug USB keyboard/mouse into the USB-A ports. Wireless dongles also supported.

image-20251017144124363

  • Network: Connect Ethernet cable from board to router (ensure internet access).

image-20251017144224927

  • Jumper: Ensure the AUTO_POWER_ON pins are shorted with a jumper cap.

image-20251017144330473

  • Power: Connect USB-A power adapter to the POWER IN port.

image-20251017172353513

  • Final setup reference: image-20251017171408602

Implementation Steps

  • Update package list
sudo apt-get update
  • Install Samba
sudo apt-get install samba
  • Create mount folder
sudo mkdir /mnt/resource
  • Set permissions
sudo chown -R username: /mnt/resource/
  • Check disk info

1.List partitions

awk 'NR > 2 {printf "%-10s %s\n", $4, $3 / 1024 / 1024 " GB"}' /proc/partitions

image-20251016202247363

2.Check filesystem type(Note: The PI-SG565D board is mounted with ext4 by default, If the file type of the external storage device does not match the system, the storage device needs to be reformatted.)

sudo blkid

image-20251016200134877

3.Check current mounts(If there is a mount point under /mnt/resource, you need to uninstall the mount point first)

df -h

image-20251016172803110

4.Get UUID and user UID/GID

ls -lha /dev/disk/by-uuid
id username

image-20251016200316142

  • Edit /etc/fstab

Here we use a 256GB solid-state drive as the NAS server, so we select nvme0n1 as the extended partition to mount and modify the fstab file.

sudo vim /etc/fstab

Add the following statement at the end of the file. After adding, press ESC+":" and then enter wq and press Enter to save and exit.

#Use ext4 as the file system, refer to the partition file type found in the previous step.
#Add the nofail option. The nofail option allows normal booting even if the device does not exist.
UUID=The UUID queried in the previous step /mnt/resource ext4 defaults,nofail 0 0

image-20251016201525703

  • Mount the drive
sudo mount /mnt/resource

image-20251016201719605

  • Configure Samba user
sudo smbpasswd -a username

Note: Enter the current user name and password. Please note that the user here must be an existing Linux user.

  • Edit Samba config

Enter the following command to open the configuration file

sudo vim /etc/samba/smb.conf

Add(The disk name in brackets is displayed externally)

[resource]
    comment = Resource
    create mask =0777
    directory mask = 0777
    path = /mnt/resource
    valid users = pi
    read only = no
    vfs objects = catia fruit streams_xattr
  • Test config
sudo testparm -s

image-20251016144346485

  • Restart Samba
sudo systemctl restart smbd
sudo systemctl enable smbd
  • Test access
sudo -u username touch /mnt/resource/test_from_kane.txt

img

  • Test from Windows CMD
net view \\[NAS_IP]

img

Connecting to the NAS

  • Windows File Explorer (Easiest)

  • Set full permissions.

cd /mnt
sudo chmod 777 resource/
  • Get NAS IP.

  • In Windows Explorer, input"\\ <NAS_IP>",You’ll see shared folders.

image-20251018113321801

  • Open resource to add/delete/edit files.

img


  • SCP Commands

  • Upload files from Windows to NAS server.

scp "local_file_path" username@nas_ip:/mnt/resource/
  • Upload an entire folder to the NAS server from Windows.
scp -r "local_folder_path" username@nas_ip:/mnt/resource/
  • CasaOS Web Access

  • Add GPG key

#1. Open the image source file
sudo vim /etc/apt/source.list
#2. Add mirror source
deb https://mirrors.tuna.tsinghua.edu.cn/debian trixie main contrib non-freeeeee
deb https://mirrors.tuna.tsinghua.edu.cn/debian trixie-updates main contrib non-freefree
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security trixie-security main contrib non-free
#3.Enter the following command in the console to add the GPG key of the software source
echo \  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://mirrors.aliyun.com/docker-ce/linux/debian \  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
#4.Update the installation source after adding and saving
sudo apt update
  • Configuring iptables Rules

Check the current iptables version. If "no alternatives for iptables" appears, you need to install iptables-legacy.

sudo update-alternatives --config iptables

After entering the command, it displays:

img

You can see that our Pi development board is using the iptables-nft policy. Enter 1 (corresponding to /usr/sbin/iptables-legacy) in the console prompt and press Enter.

Similarly, enter the following command to enable ip6tables. Enter 1 (corresponding to /usr/sbin/ip6tables-legacy) in the console prompt and press Enter to complete the configuration.

sudo update-alternatives --config ip6tables

img

  • Check the current iptables version
sudo iptables --version

image-20251016151602949

Displaying the version number of iptables-legacy proves that the policy is effective.

  • Install Docker
sudo apt install docker.io
  • Start the Docker service
sudo systemctl start docker
sudo systemctl enable docker
  • Check Docker service status
sudo systemctl status docker

After successful startup, the following is shown:

img

  • Full installation of wget
sudo apt install wget -y

When the following option box appears, just press Enter.

img

  • Install CasaOS
curl -fsSL https://get.casaos.io | sudo bash

After successful installation, copy the URL in the red box and open it in the browser.

img

After creating a user, log in and click Files. After finding the folder mounted on the NAS server in the Root directory, you can directly upload, delete, modify, etc.

img

image-20251016151457658