How to Set Up a Raspberry Pie 4 As a NAS Server
How to Set Up a Raspberry Pie 4 As a NAS Server
Setting up a Raspberry Pi 4 to be a dedicated NAS (network attached storage) is a simple process. A little knowhow and following this tutorial will make the process simple and easy from start to finish. A NAS in the home can be a personal cloud to store all your data without paying monthly fees. The planning phase of the build will determine the amount of files, pictures, or videos that can be stored depending on personal needs currently and in the future.
Steps

Preparation for Raspberry Pi NAS build

Pick your Raspberry Pi 4. There are four different options depending on budget and how much performance needed for this NAS. The most expensive option is the Raspberry Pi 4 Model B with 8GB of DDR4 RAM. The second option is the Raspberry Pi 4 Model B with 4GB of DDR4 RAM. The third option is the Raspberry Pi 4 Model B with 2GB of DDR4 RAM. Lastly, the final option is the Raspberry Pi 4 Model B with 1GB of DDR4 RAM. The choice made between these four models will dictate how quickly the Raspberry Pi will process each transfer of data. If slower processing is not a concern, any of the Raspberry Pi options will work. The main part of the planning process and most important is staying on budget.

Pick a case for your Raspberry Pi 4. This step is all personal preference as any case will do and it is not recommended not to have the Raspberry Pi enclosed and protected.

Pick the display cable, ethernet cable, and power supply. These three items are very important to grab the correct cord and power supply as picking the wrong one could delay the build. The power cord needed is a 15W USB-C power supply. The second cable needed is a HDMI to Micro HDMI cable. This will be used in the initial setup of the Raspberry Pi and will not be used often. The last cable needed is an ethernet cable to hook the Raspberry Pi to the network.

Pick your Micro SD Card for the Operating System and a SD card reader. The micro SD card’s primary role is to host the operating system, but choosing a micro SD card with a large capacity and choosing another hard drive for the storage will not be necessary. The choice for the micro SD card can be personal preference. An optional purchase would be an SD card reader if one is not on the personal computer needed during the initial setup.

Choose an external hard drive. This decision is based on personal need, but planning for future needs will allow for larger space to store important pictures or documents on this NAS. Any external hard drive will do but a one terabit hard drive will have enough storage for a long time, but an additional hard drive can be added at a later date to increase the storage capacity. A cheaper route is to buy a bigger micro SD card so an additional hard drive is not needed, but a micro SD can work as well as a 512GB flash drive.

Download Raspberry Pi Imager. For this task, the Raspberry Pi Imager has to be downloaded and installed onto a computer to install the operating system on the micro SD card. The website to download the Raspberry Pi Imager is https://www.raspberrypi.com/software/. Follow the prompts during the installation of the Raspberry Pi Imager.

Setting up and Installation

Grab the Raspberry Pi and Case. Take the Raspberry Pi out of the box and prepare to place it into the case chosen. Depending on the case there might be extra steps needed to hook up fans to cool the Raspberry Pi, so following the manufacturer’s instructions is advised. Once the Raspberry Pi is installed in the case it can be set aside for later.

Install the Operating System on the Micro SD card. Open the Raspberry Pi Imager along with inserting the micro SD card into slot on my or a micro SD card reader. After inserting the SD card, open file explorer and look for the USB drive to verify the SD card is showing and close the file explorer. First, when the Raspberry Pi Imager opens select your Raspberry Pi device by clicking the icon on the left. Second, select the button under the operating system and select the Raspberry Pi OS (Legacy, 64-bit) lite. It is vital to select the Lite version with the Debian Bullseye as Open Media Vault will not work with the other OS. Third, select the storage micro SD storage as the application would show and click next at the bottom of the window. The next window that appears click the edit settings. In the general tab, change the password away from the default password. Click on the services and verify that the Enabled SSH is checked and the Use password authentication is selected. After saving the changes click yes to apply the changes and yes to continue erasing all data on the micro SD card.

Plug in mouse, keyboard, monitor, external hard drive, and ethernet cable. The last thing to plug in is the power cable. The initial startup will take a few minutes, but after it is finished it will load a home screen.

Update the operating system. Navigate to the top left of the screen and click the black a blue icon that is the Terminal that code will be entered to update the operating system. Type in each of the commands below and press enter after each line. Number 4 on the list is to reboot the Raspberry Pi to finalize the updates and upgrades. sudo apt-get update - sudo apt-get upgrade sudo reboot

Install Open Media Vault. Run the commands below in the terminal and reboot the Raspberry Pi. wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash sudo reboot

Find IP Address of Raspberry Pi and Open Media Vault. Open the terminal type in hostname -I and press enter. Look for the eth0: and right after inet is the IP address. Next open a browser and type in http:// followed by the IP address. At the log in page type in the default Username of “admin” and Password of “openmediavault” and click log in.

Change default password. Click on the general settings under system in the left pane. Next click the Web Administrator Password tab and click save when done.

Create a New Filesystem. In the left pane under the Storage folder click file systems. Click the /dev/sda1 in the main pane then right above it click mount. Next click the Shared Folders and click add at the top of the middle pane. The popup that comes up will give options to name the folder and can be changed for personalization. For this tutorial the rest can remain the same then click save.

Enable SAMBA/CIFS in Open Media Vault. This is an important step as it allows users to access the shared folder with different operating systems. Under the service folder click SMB/CIFs. The general setting area in the main screen click on the Enable to turn it on then click save. Next click the Shares tab and click the add button then select the shared folder and next to public select Guests allowed and click save. At the top a yellow will display a message and on the right click the apply button to allow the changes to take affect.

Add Users. Under the Access Rights Management, click the user tab to start creating users and at the top of the main pane click add. Fill in the user’s details along with the password and click on the save button. This step can be done for as many users as needed. After all users are added, the open media vault is ready for use and ready for all storage needs creating a personal cloud at home.

Connect File Explorer to Open Media Vault. Open File Explorer and right click in the main pane and select Add a network location and click Next for the next two windows. Type, \\{YourIPAddress”}\{Name of NAS} (note: replace information in brackets with IP address of NAS and name of NAS) and click next. The next window will allow personalization to what is displayed in File Explorer and once changed click next and click finish.

What's your reaction?

Comments

https://234470.3pybb.group/assets/images/user-avatar-s.jpg

0 comment

Write the first comment for this!