# Raspberry Pi NAS

# Preparation

### Requirements

#### Hardware

- A Raspberry Pi 4B with 8 GB RAM 
    - It includes USB 3.0
    - [![image.png](https://wiki.togogo.ch/uploads/images/gallery/2022-07/scaled-1680-/37yimage.png)](https://wiki.togogo.ch/uploads/images/gallery/2022-07/37yimage.png)
- A SSD Drive around 1TB. 
    - [![20220710_145038.jpg](https://wiki.togogo.ch/uploads/images/gallery/2022-07/scaled-1680-/20220710-145038.jpg)](https://wiki.togogo.ch/uploads/images/gallery/2022-07/20220710-145038.jpg)
- 32GB SD card for OS Storage

#### Software

- Operating System: Raspberry Pi OS Lite 64-bit 
    - Important: OMV can't be installed on a Desktop version
- OMV for NAS Server
- Plex media server

[https://www.packetmania.net/en/2021/12/29/RPi-NAS-Plex/](https://www.packetmania.net/en/2021/12/29/RPi-NAS-Plex/)

# Raspberry Pi setup

## Bake OS

Download the Raspberry Pi imager from [https://www.raspberrypi.com/software/](https://www.raspberrypi.com/software/) and install write the OS on your SD card.

1\. Select: Raspberry Pi OS Lite (64-bit) [![image.png](https://wiki.togogo.ch/uploads/images/gallery/2022-07/scaled-1680-/8X6image.png)](https://wiki.togogo.ch/uploads/images/gallery/2022-07/8X6image.png)

2\. Select the SD card as Storage device

3\. Define the hostname and enable SSH  
[![image.png](https://wiki.togogo.ch/uploads/images/gallery/2022-07/scaled-1680-/sXyimage.png)](https://wiki.togogo.ch/uploads/images/gallery/2022-07/sXyimage.png)

4\. Enter your credentials which you want to login later  
[![image.png](https://wiki.togogo.ch/uploads/images/gallery/2022-07/scaled-1680-/7jhimage.png)](https://wiki.togogo.ch/uploads/images/gallery/2022-07/7jhimage.png)

5\. If you are not via LAN connected you can configure the Wifi as well in the setting.

6\. Execute it! After that stick the SD card into the Raspberry Pi and power it on.

## Connect via SSH

### Windows

Download [https://www.advanced-ip-scanner.com/de/](https://www.advanced-ip-scanner.com/de/) and scan your network. You'll see the IP address and hostname.

Connect with putty [https://www.putty.org/](https://www.putty.org/) or use WSL (Windows Subsystem for Linux) [https://docs.microsoft.com/de-de/windows/wsl/install](https://docs.microsoft.com/de-de/windows/wsl/install)

Enter `ssh <a href="mailto:username@192.168.1.222">username@192.168.1.222</a>` and provide your password

### MAC / Linux

Open the terminal and scan the network with NMAP.

```
nmap -sn 192.168.1.0/24
```

Then enter `ssh <a href="mailto:username@192.168.1.222">username@192.168.1.222</a>` and provide your password

## Install OMV

First of all make sure your Raspi is updated and upgraded.

```
sudo apt update

sudo apt upgrade
```

Afterwards download the OMV install script.

```
wget -O - https://raw.githubusercontent.com/OpenMediaVault-Plugin-Developers/installScript/master/install | sudo bash
```

<span class="line">The installation takes a while. To make sure your files were downloaded enter following:</span>

```
dpkg -l | grep openme
```

That was it already now enter the IP of your Raspberry Pi in your browser.

# Configure OpenMediaVault

## First Login

Enter the IP of your Raspberry in your Browser.[![image.png](https://wiki.togogo.ch/uploads/images/gallery/2022-07/scaled-1680-/qTjimage.png)](https://wiki.togogo.ch/uploads/images/gallery/2022-07/qTjimage.png)

Default credentials are admin:openmediavault.

<p class="callout danger">Change the password immediately!</p>

[![image.png](https://wiki.togogo.ch/uploads/images/gallery/2022-07/scaled-1680-/uEVimage.png)](https://wiki.togogo.ch/uploads/images/gallery/2022-07/uEVimage.png)

## Configure File Services

Make sure you connected the SSD to your Raspi.

### Scan your disk

1\. Navigate to Storage and select Disks

[![image.png](https://wiki.togogo.ch/uploads/images/gallery/2022-07/scaled-1680-/Wgximage.png)](https://wiki.togogo.ch/uploads/images/gallery/2022-07/Wgximage.png)

If your disk disk was not found in the first place click on the magnifying glass in the top ribbon.

### Mount the drive

1, Navigate to Storage again and select File Systems

[![image.png](https://wiki.togogo.ch/uploads/images/gallery/2022-07/scaled-1680-/pw0image.png)](https://wiki.togogo.ch/uploads/images/gallery/2022-07/pw0image.png)

Click **Storage &gt; File Systems** from the sidebar menu to enter the file system management page. If the storage device does not have a file system yet, click + to Create or Mount file system. OMV can create/mount ext4, ext3, JFS, xfs file systems, but only mounts are supported for the NTFS file system. So use NTFS.

### Set Shared Folders

1\. Navigate to Storage and select Shared Folders

[![image.png](https://wiki.togogo.ch/uploads/images/gallery/2022-07/scaled-1680-/WQ7image.png)](https://wiki.togogo.ch/uploads/images/gallery/2022-07/WQ7image.png)

From the sidebar menu, click **Storage &gt; File Systems** to access the shared folder management page. Here, click + to create a shared folder. When creating it, specify the name, corresponding file system, and relative path, and you can also add comments. Select the created folder and click the pencil icon again to edit the related information.

### Create access user

[![image.png](https://wiki.togogo.ch/uploads/images/gallery/2022-07/scaled-1680-/ucgimage.png)](https://wiki.togogo.ch/uploads/images/gallery/2022-07/ucgimage.png)