When or­ga­niz­ing digital files (text, pictures, videos, music, etc.), you use the same method as filing paper documents. With well labeled folders, you can create valuable storage struc­tures that are useful when it comes to searching for documents later. However, the more folders there are, the more shelves you need – the archive could even spill over into different rooms in a company, for example. In the case of digital documents, the folders become file folders, shelves become di­rec­to­ries, and the archive rooms become storage media like hard disks (internal, external), USB sticks, SD cards, CDs, or cloud servers.

$1 Domain Names – Register yours today!
  • Simple reg­is­tra­tion
  • Premium TLDs at great prices
  • 24/7 personal con­sul­tant included
  • Free privacy pro­tec­tion for eligible domains
Tip

During the course of dig­i­tal­iza­tion, the paperless office is becoming in­creas­ing­ly important (in companies, but also on the computer at home). It therefore makes sense to come up with practical solutions for or­ga­niz­ing your own digital documents in good time.

In both cases, the search effort depends primarily on how many storage locations the various documents are saved in – a problem that can hardly be solved with paper documents. The digital flood of data, on the other hand, can be con­trolled by dedicated storage systems like file servers, storage networks or NAS systems (Network-Attached Storage). The latter are also becoming more and more popular in the private sector, probably because NAS servers can easily be created using a Raspberry Pi and a bit of patience.

Raspberry Pi as an NAS server – is it a good choice?

There are many good reasons for setting up a Raspberry Pi NAS server: your own server based on a mini­com­put­er is cheaper than buying a completed NAS system. Energy costs in par­tic­u­lar are much lower due to Raspberry having low re­quire­ments. It is also im­pres­sive­ly compact and portable. If there are no other power sources, the Raspberry Pi NAS system runs on a standard battery pack. Of course, the Raspberry Pi network storage is also inferior to com­mer­cial coun­ter­parts in some respects – for example, they have more processor power and offer better trans­mis­sion rates. However, the DIY project is def­i­nite­ly a good solution for file storage in the private sector.

What you will need to create a Raspberry Pi NAS server

To create a Raspberry Pi NAS, you will first need to get the necessary equipment. Of course, the mini­com­put­er itself is the focal point: you can choose between the Raspberry Pi 2 and the newer Raspberry Pi 3, both of which have enough power to run the server.

-XtxE7EZqug.jpg To display this video, third-party cookies are required. You can access and change your cookie settings here.

In addition to a mini­com­put­er, you also need two media storage units. These can be ordinary USB sticks, which commonly have 100 gigabytes of storage space and can be powered directly by the Raspberry Pi. More common, however, are external USB hard drives – 2.5 via USB hub or 3.5 with their own power supplies. Native WD PiDrives are also rec­om­mend­ed, as long as they are 250 gigabytes, 375 gigabytes (WD PiDrive Foun­da­tion Edition), and 1 terabyte (WD PiDrive BerryBoot Edition) in size. The man­u­fac­tur­er also rec­om­mends a custom-fit power supply kit as an option to cover the energy demand that connected PiDrives have.

Tutorial: how to set up Raspberry Pi as NAS?

If you have the required hardware for your own NAS server, you can devote yourself to in­stalling and setting up the software required to operate it. There are several ways to do this, and one of the most popular ones is to download the GPLv3-licensed Open­Medi­aVault, which has come to be con­sid­ered the standard. The Debian-based Linux/Raspberry Pi dis­tri­b­u­tion includes services like SSH, (S)FTP, RSync, and a Bit­Tor­rent client, which can be operated through a web interface, making it the perfect out-of-box solution for con­fig­ur­ing a Raspberry Pi NAS. Thanks to its modular structure, the range of functions can be extended at any time through plugins. In the following tutorial, you will learn how to install Open­Medi­aVault and what steps are required to implement the procedure from your own Raspberry Pi NAS server.

Step 1: download and install Open­Medi­aVault

Like with Raspbian or other Raspberry Pi versions, you need an external computer to download and install Open­Medi­aVault. On this page, you can access the official Source­Forge directory for the open source software, which contains the cor­re­spond­ing image file for the Raspberry Pi models 2 and 3. Download the file, which is just over 300 megabytes in size, and write it into a microSD card using imaging software like Etcher.

Tip

Before ini­ti­at­ing the automatic in­stal­la­tion process, you should configure your network router to assign the mini­com­put­er the same IP address each time it is started up, otherwise it will change with each restart.

Step 2: start the Raspberry Pi NAS and change the keyboard layout

In most cases, it is necessary to connect the monitor and keyboard to the Raspberry Pi to proceed further. Once you have done this, start the boot and in­stal­la­tion process using the microSD card, until you can log into the NAS program through the shell for the first time. You can do this using the following standard login data:

Username: root
Password: openmediavault
Note

You do not need to operate the Raspberry Pi through the keyboard and monitor if your router au­to­mat­i­cal­ly outputs the IP address that the mini-computer uses for NAS dis­tri­b­u­tion. If this is the case, you can ad­min­is­ter a second computer through the web interface right from the beginning.

Since the American keyboard is pre­s­e­lect­ed in Open­Medi­aVault, you may need to change the keyboard layout if you are accessing from a different country.

Step 3: change password and display IP address

After switching to the ap­pro­pri­ate keyboard language, it is time to assign a new root password for shell access to your Raspberry Pi NAS to prevent unau­tho­rized users from logging in using the familiar default password. The required command is as follows:

passwd

Enter the new password twice and confirm the entry in both cases by pressing the enter key. If the change was suc­cess­ful, the command line displays the message (“password updated suc­cess­ful­ly”).

Use the command “iconfig” to start the command line program of the same name, which provides you with all important network in­for­ma­tion. The IP address (“inet addr”) listed under “eth0” is par­tic­u­lar­ly important to further configure your Raspberry Pi NAS server. This is the address assigned by your router to the NAS server.

Step 4: logging onto the web interface

After you have laid the foun­da­tion for using the Raspberry Pi as NAS server in the previous steps, you can now log on to the web front end where the actual con­fig­u­ra­tion takes place. To do this, you switch from the Raspberry Pi to another computer that is only on the same network and must have a standard Internet browser. Start the browser and enter the IP address that your router has assigned to the Raspberry Pi NAS into the address line. There is also a pre­de­fined default login for the NAS dis­tri­b­u­tion.

Username: admin
Password: openmediavault

After a suc­cess­ful login, Open­Medi­aVault’s start menu opens, providing an overview of the available services and various service in­for­ma­tion. A first possible con­fig­u­ra­tion step is to adjust the system date and time (“Date and Time”). If your network is connected to the Internet, you can check “Use NTP server” – otherwise simply enter the cor­re­spond­ing times manually.

Step 5: securing the web interface

Since you make all the important settings on your Raspberry Pi NAS server through the web interface, it makes sense to secure the con­nec­tion as thor­ough­ly as possible. This is done by default through the un­en­crypt­ed HTTP protocol, which is why it is advisable to activate the encrypted pendant HTTPS coun­ter­part. To do this, select the menu item “General Pref­er­ences” in the “System” par­ti­tions and move the slider to “Secure Con­nec­tion”. To use TLS/SSL, you also need a cer­tifi­cate that can be created under “System” -> “Cer­tifi­cates” -> “SSL”. Just click on “Add” and in the following pop-up window, click on “Save”.

Note

If desired, you can also fill in the in­for­ma­tion fields for the cer­tifi­cate and determine the key length and validity period of the cer­tifi­cate yourself.

Enter the cer­tifi­cate in the general settings, click again on “Save” and confirm the decision. Using the three-point symbol, you then dis­con­nect the current con­nec­tion from the web interface and replace the HTTP in the address line with HTTPS to initiate a new con­nec­tion (this time through TLS/SSL). Since the browser does not yet know the cer­tifi­cate, a warning will appear until you have added the cer­tifi­cate as an exception. Log in one last time with the standard data to enter your own password under “System” -> “General Settings” -> “Web Ad­min­is­tra­tor Password”.

Step 6: con­nect­ing the storage media to the Raspberry Pi NAS

For the NAS server to work as a central file storage location, the re­spec­tive storage media needs to be connected to the Raspberry Pi and con­fig­ured to the web interface. If there is a power supply and physical con­nec­tion, then you can display the data carriers in the “Real Hard Disks” partition of the “Data Storage” partition. If Open­Medi­aVault does not au­to­mat­i­cal­ly detect a disk, you might need to use the “Search” button. Different par­ti­tions of your connected media can be found under “File Systems”. If one of the storage units you added is missing, you can add it using the “Create” option. Then mark the in­di­vid­ual storage units you want to include, and add them to the Raspberry Pi NAS system using “Mount”.

Note

The “boot” and “omv” par­ti­tions are part of the NAS dis­tri­b­u­tion on the microSD card. Leave it unchanged as the data partition of the card, listed sep­a­rate­ly.

Step 7: setting up file sharing on the included par­ti­tions

To allow users to store files on the connected data storage devices later, share the cor­re­spond­ing folders under “Access Control”. To do this, click on the submenu item “Shared Folder” and then “Add”. Start with the user directory (also called the “home” directory), which you need to assign the path homes/ for. With all other folders, however, you can let your imag­i­na­tion run wild with regard to name and path.

Tip

Open­Medi­aVault offers the option to combine several removable media storage units into a RAID network. In doing so, the in­di­vid­ual memories are converted into a single logical drive, which then guar­an­tees a higher data through­put and/or higher re­li­a­bil­i­ty. Depending on the selected RAID level, a certain minimum number of disks is required.

Step 8: creating user profiles to access to Raspberry Pi NAS Server

Once you have added storage capacity to the Raspberry Pi NAS and struc­tured it ac­cord­ing­ly, the next step is to create a user profile. You can do this in the “User” section of the menu (or through “Access Control”). Click on the “Add” option and type in the cor­re­spond­ing user data (name and password). Move the slider across under “Change Access” if you want to allow a user to adjust their login in­for­ma­tion. Then open the overview of shared folders again, select the folders that are relevant for access, and assign the cor­re­spond­ing rights (read/write, read-only or no access).

Tip

If you activate the “User’s Home Directory” option in the user settings, newly-created users will au­to­mat­i­cal­ly receive their own folder in the user directory created in step 7.

Step 9: setting up access services for the Raspberry Pi NAS Server

Finally, it is important to clarify how users can exchange data with the NAS server. SSH (secure shell) is enabled by default, but can only be used by Linux users (through the terminal) without needing ad­di­tion­al software. Windows users need client ap­pli­ca­tions such as PuTTY or WinSCP for data transfer through the network protocol.

A more con­ve­nient solution is therefore the cross-platform SMB (Server Message Block), which you can activate under “Services” -> “SMB/CIFS”. Windows has been sup­port­ing the protocol by default for years, while Linux and macOS have been using Samba which is also a suitable solution. When ac­ti­vat­ing the service, also check “Activate home di­rec­to­ries for users” before adding the folders you want to be ac­ces­si­ble through the protocol under the “Shares” tab.

Step 10: accessing the Raspberry Pi NAS

All important points for operating and using the Raspberry Pi NAS server are now fixed, so that the starting signal for the central file storage can be given. The users only have to connect to the server. If using Linux or Ubuntu, open the file manager and select the option “Connect to server”. Then enter the server address including the prefix smb: //, and the con­nec­tion is initiated.

Windows users establish the SMB con­nec­tion to the Rasbperry NAS through Windows Explorer. In this case, it is enough to just enter the IP address after inserting the double backslash (“\\”).

Go to Main Menu