When you surround your tech spaces and have valuable information on your devices, A very useful addition to your environment is one where you can store all that data.
The means to create said cloud, is through a network attached storage device, or. The function of this device is to make copies of your information.
Among the many functions attributed to Raspberry Pi, there is also the possibility of turning it into a perfectly functional home NAS server to keep the data and files on your computers safe. If you are interested in knowing how to do it, we will explain it to you right now.
What is a NAS server and what is it for in computing?
A NAS server It is a device connected to the network that works as a storage unit for data and files. of all configured and connected devices. Its main function is to act as a kind of remote hard drive with the ability to create your own cloud storage.but unlike the cloud of companies like Google, the hard drives on which the information is stored are stored in your own home.
Advantages of using your Raspberry Pi as a NAS server Why should you do this project?
The Raspberry Pi has both advantages and disadvantages over its commercial counterparts when it comes to functioning as a NAS server, however, in this case, the pros outweigh the cons. As the first point in favor of the Raspberry Pi, there is the fact that its affordable price makes it a much more attractive option than a preconfigured NAS system. Besides that, It has the advantage of having a very low electrical energy consumption.to the point that a battery pack is enough to make it work as a NAS server.
Which is very good for a team that must be constantly running. Its compact size and easy portability also qualify as advantages, although it also we must take into account that it offers considerably lower storage capacity and processor performance than commercial NAS serversAlthough, when purchasing a private cloud service, this project is an elegant and functional solution.
What are the best Raspberry Pi to use as a NAS server? The most profitable models
To turn your Raspberry Pi into a NAS serveryou must select the versions that are optimal for this project.
Here is a list of the three most viable options:
Raspberry Pi 2B
The first model to take into account time to create your NAS server is the . It has a Broadcom BCM2836 processor, Quad Core ARM Cortex a7, which has a response capacity of 900 mHz. This machine barely has 1GB of RAM, giving it just enough processing power for the private server task.
Raspberry Pi 3B+
The Raspberry Pi 3B+ offers a solid option to host your NAS server, thanks to its processor Broadcom BCM2837 with Quad Core, running at 1.4GHz. These specifications, along with your 1GB RAM, They give you a high quality of data transmission between the computers on your local network.
Raspberry Pi 4
The Raspberry Pi 4 made a leap in terms of technical capabilities in relation to its predecessors. It has a powerful processor Broadcom BCM2711 at 1.5GHz and a brand new 8Gb RAM capacity, making it the best-equipped model to function as a NAS server in your virtual spaces. Each of these models has its own individual capabilities, these are the best options if you want to make your own private network server.
Materials and requirements to use the Raspberry Pi as a NAS server What do I need to carry out the entire project?
The first thing you will need to create your NAS server is a Raspberry Pi in the layout of your choice; this must have one micro SD memory in which we will install the required operating system. Besides that, you need at least two medium to high capacity storage drives. For this, you can have some memories 100 GB powered USB or more capacity that will be connected to the Raspberry Pi.
However, the most widely used alternative is External hard drivesthese can be 2.5 inch with USB HUB or of 3.5 inches with its own electrical network. of course, also you need a stable internet connection for your Raspberry Pi. The most reliable connection method is by since it provides a better quality of data transmission.
Learn step by step how to create your NAS server with a Raspberry Pi from scratch
Once you have all the materials, you can now proceed to the installation:
Download OpenMediaVault OS
The first thing you should do is get the right operating system and install it from an external computer. From the website of Source Forge you can find the corresponding image files for each version of the Raspberry Pi. All you have to do is download it and write it to the SD memory.
Start the operating system and set the input method
For this step you need to have the computer peripherals connected (keyboard, mouse and monitor). Start the Raspberry Pi and follow the steps to finish the installation process until the system prompts you for login information.
In this instance, enter the following data:
- Username: “root”.
- Password: “openmediavault”.
The standard keyboard configuration will be in English, so you must modify that aspect, this is achieved by the following command:
- dpkg–reconfigure keyboard-configuration
Then select other Y “Spanish”. The last thing you’ll see is a series of dialogs where you can accept the default settings or set your own keyboard specifications.
Modify the password and get the IP address
To prevent unauthorized third party access to server settings, enter the following command:
Now all you have to do is enter the new password twice and confirm with the key “Enter”after which the message pops up “Password updated successfully”. Now, run the ipconfig command to display the lines of information for the network your Pi is connected to, the IP address will be identified as “inet addr” and registered under “eth0”. Write down and keep this address handy, as it is the address assigned by the router to the NAS server.
Sign in to the web interface and secure NAS
For this step, you need a computer apart from the Raspberry, it must be connected to the same network. Enter the IP address of the NAS server in the address bar of the browser.
The login credentials are:
- Username: “admin”.
- Password: “openmediavault”.
You now have access to the OpenMediaVault start menu, which will allow you to view the available services and make any necessary settings. To secure the interface, follow the path “System”, “General settings” and “Secure connection”.
You need a certificate to be able to secure the network through SSL, to create it go to “Systems”open the option “Certificates” and click on SSL, then press “Add” Y “Save” in the popup window that will appear. You just have to enable the certificate in the general settings and save the changes made.
Now what you have to do is close the current session and replace HTTP in the address bar with HTTPS and start a new session via SSL. The browser will probably show a notification since it doesn’t recognize the certificate, in which case you should add it as an exception. As soon as you have logged in again, change the password using the path “Systems”, “General settings”, “Web administrator password”.
Connect storage units
This step is simply to connect the storage media (hard drives or USB sticks) to the Raspberry Pi NAS and configure it in the web interface. through the option “Data Storage” in the section “File System” you will be able to see the actual hard drives connected to the Raspberry Pi. In case it does not recognize them automatically, you can look for instructions in the section of “Search”.
Configure the user profile
In the access control section of the web interface you will find the option “User”. Select the option “Add” and fill in the requested information.
Adjust file storage settings and customize access
In the access control option you will have the possibility of adding partitions of the storage units to keep your files organized. To do this click on “Shared folders” and press the option “Add”. From there you find the “Home” directory, from where you can configure the paths to the folders the way you want.
at the function “User”, You will be able to add and delete access profiles to the NAS server, in addition to modifying the access permissions of said profiles. For this, go to “Users” and select “Add”, then enter the corresponding data, and in the option “Modify access”, You will be able to grant or revoke permissions to users so that they can modify the stored content, read-only permissions, or no permissions at all.
Connect to the NAS server
With all the settings ready, all that’s left to do is connect to the server.
The methods vary from one operating system to another:
- for linuxFor example, you will access the file manager and select the option “Connect to server”then you enter the prefix “sbm://” followed by the IP address of the server.
- To be able to connect Windows to the NAS server just open windows explorer and insert double backslash “\\”, before the IP address.