A NAS device is a form of storage that has been adapted for multiple different users to simultaneously access files from different devices on a network. Naz stands for Storage net attached Therefore, it is an independent file server. It might be useful to have, for example, backup different computers to a shared disk (which you can then back up for duplicates), store media files for a Plex server that doesn’t have a large hard drive itself, or As a family shared storage without interfering with the cloud.
If you want a NAS unit but don’t want to pay the high prices of most “real” products, it’s possible to build one yourself for much less. Namely, it is possible to create your own NAS using a Raspberry Pi and one or more external hard drives. It’s not particularly complicated, and if you have a hard drive that’s more or less gathering dust, you can reuse it. Otherwise, you can buy a new one, and it will be much cheaper than a real NAS unit.
Hardware you need:
- Raspberry Pi – We recommend a Raspberry Pi 4 with at least 4GB of memory for best performance
- the structure
- Power adapter or USB-C cable and charger
- ethernet cable
- Micro sd card for the operating system
- SD card reader and adapter for micro SD cards
- external hard disk
do not miss: Create your own media center with the Raspberry Pi
Some restrictions
Before powering on and purchasing a Raspberry Pi and hard drive, we must point out that the solution we describe is not 100% comparable to standard NAS devices. The performance is not high, but above all, it does not support multiple hard drives connected to the raid. Many NAS units combine multiple disks with raid 5 or zfs file system for example to provide faster transfer speeds than a single disk and higher reliability where sometimes one or two disks can fail without losing data.
Our recommendation if you store important files on it that also aren’t located elsewhere is to get another hard drive to back up the first one.
suitable hard drives
Any USB hard drive should really work, but we recommend using one with an external power supply. The Raspberry Pi may have problems supplying power to some USB portable hard drives, which can lead to file corruption. An alternative is to connect the USB hub to an external power source and connect your hard drive to it.
There is no point in using an SSD because the network will not be faster than a hard disk. If you have one unused you can of course use it and then you don’t need any external power because ssds are less power hungry than magnetic hard drives.
Luxurious style with a custom built body
Following the success of the Kickstarter project, the Argon Eon, the first NAS chassis designed specifically for the Raspberry Pi, was launched. It is sold by, among others electrokit In Sweden and a little cheaper (even with postal and import VAT) than through my hut in Great Britain. At the bottom of the chassis you can fit a Raspberry Pi 4 Model B, and on top of it are up to four hard drives (two 3.5-inches, two 2.5-inches). Today there are hard drives up to 20TB (3.5″) and 5TB (2.5″) so you can get a maximum of 50TB in the Argon Eon.
Install the system
Since you don’t need a monitor attached to your NAS, the standard Raspberry Pi OS Lite version works just fine. The easiest way is to use the program Raspberry Pi Imager. Choose Other, Raspberry Pi OS Lite (64-bit) As a system, your sd card as a target, and activate ssh In advanced settings via gear wheel bottom right (specify with name and password or fill in the rsa public key if you have one for ssh).
After the program finished writing and testing the sd card, insert it into the Raspberry Pi, connect it to the router with an ethernet cable, and connect the power cable to boot. The red LED will come on and after a while the green one will hopefully come on too. It can then blink the frequency, indicating that it is reading or writing data to the sd card.
Then connect to it via ssh. Windows 10 and later have ssh built in, which you can access in Windows Terminal or Powershell. Enters:
If everything works as it should, you can enter the password you chose above (or consent to the connection if you chose to log in with the rsa key). If it doesn’t work, it might be because it can’t find the IP address. You can then see if you can see your Raspberry Pi among the connected devices in the router’s web interface (it may be under dhcp settings or in a separate section for connected devices).
Openmediavault for easier sharing
You can continue to set up and repair a working network drive yourself at the command line, but it’s neither very easy nor efficient, and it can make a lot of mistakes. Fortunately, there are already ready solutions for setting up and running file servers. Openmediavault is an open source project built for just that, optimized for small office and home use – which is exactly what we’re dealing with in this guide.
To install it, simply login via ssh as above and run one command:
sudo wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
This downloads and runs an installation script from Omv-extras, a group of developers who make many plug-ins for Openmediavault but have also produced this script to automate installation on the Raspberry Pi. Installation takes a while, so you can have a coffee while you wait. When finished, the system restarts, which is also what you see when the ssh session ends.
Basic settings
The next step is to log into the Openmediavault web interface, where you will perform the rest of the settings, manage system updates, and other things. Enters raspberrypi. local or IP address in the browser. Log in with your username supervisor and password openmediavault. The first thing you have to do, of course, is change the password, which you do by clicking on the user icon at the top right and choosing Change the password.
Now it might be a good idea to choose a static IP address, so you can always find the settings if raspberrypi.local doesn’t work. You can either set the router to always give the same IP address to the Raspberry Pi via dhcp or change to a static address below network interfaces (Click eth0 Then on the edit button).
Next, we recommend installing the available updates. Choose System, update, management, updates in the list on the left and click InstallationsClick the list of available updates. Accept and wait for it to complete and possibly reboot.
when you click Dashboard In the list, you just get a blank view and a Not yet set message, with a link to set it up. Click on it and select the things you want to see on the home screen when you sign in. You probably won’t log in often, so it’s not so important what you choose, but for example Smart Status and “Available Updates” can be smart so you can tell if your connected hard drives are showing signs of starting to crash (via Smart Status) and when there are updates to install.
The next step is to format the hard drive and start partitioning it. Choose storage and disks in the list on the left. If you only have a micro sd card and a USB stick connected, you will see them listed here. The hard drive has the name of the device / dev / sda (If you have two, they’ll be hot / dev / sda And the / dev / sdb). Click on it, then press eraser button above to delete it. Confirm and wait a while for it to complete.
Then go to file systems and click plus button Click the empty list then Create. Select your USB disk as the default disk and ext4 as the file system. continue.
Formatting can take some time. Then you have to select the disk again in the next step, choosing how full the disk is before the system warns. Click Save and choose to mount the file system.
After every configuration change like this, you also have to apply the changes, which the system notifies you of in a big yellow warning. Click on the mark on the right. The same warning will appear multiple times – click the checkmark each time to apply the change so that it appears in the next steps.
Create shared folders
Now it’s time to create at least one folder that will be shared on the network. Choose Shared files during storageclick plus button And choose a name for the shared folder. Save and apply.
go to the Services, SMB / CIFS, Settings and check out maybe. Save and apply.
Then go to Involved in the same section and click on plus button to create a new post. Select the shared folder you created above and save it. You can change file permissions and other things if you like, but the default settings are fine for most people.
users accounts)
Before anyone can connect to the shared disk, you need at least one user account. The system has a default account (“pi”) but it usually doesn’t have a password and you shouldn’t use an administrator account for things that don’t need administrator rights, such as file sharing.
Choose Users and Users and click plus button to create a new user. Choose a username and password. You can either create different accounts for each family member so that everyone can have their own folders that others don’t have access to, or a joint account if the idea is that everything on the disk should be accessible to all family members. Save and apply as usual.
Now everything should be ready to start using the shared disk.
Connect from PC
To connect to the shared disk on a Windows PC, you can first see if it has appeared automatically under Network. it’s called Cut the berries If you do not change the name.
If Windows Explorer warns that network discovery is turned off, you can turn it on so that the server can be found automatically. Click on the warning and select Yes when asked if you want to activate it (You can find the setting below Advanced sharing settings in control Board). If it is still not visible, you can enter \\ raspberrypi. local in the track field. If that doesn’t work either, you can use the IP address after \\. You can then fill in your username and password (for the account you just created) and the shared folder should appear shortly.
If you also have a Mac at home, do this: open discoverer And he chose network in the left column. The post should appear here on its own. Click on it, then press ConnectionEnter your name and password as above and connect. If it is not visible, you can choose Go, call the server (poultice–K) and fill smb://raspberrypi. local (or IP address).
Communication from a mobile phone
Built-in IOS app files Has support for someone to share. Select tab browsehe presses button more top right and select Connect to the server. Once added, you can save files from other apps via the sharing dialog, or copy them using Files.
Some Android variants have a built-in file manager with smb support, but not all. If you can’t find it in your area, you can try eg CX File Explorer.
You can also connect directly from media player apps, such as VLC, to play videos, music, and more. If you don’t want to build a media server with Jellyfin or Plex, this can be a rudimentary way to store your media in a central location accessible to all family members.
Use as a backup server
The practical use of Raspberry Pi-nas is a central backup server for all the computers in the house. with a program arq backup or redundant It allows you to maximize disk space through compression and deduplication for incremental backups, and encryption protects each user’s data.
accessed from the outside
Want to access your NAS server from the Internet? It works of course, but many popular technologies like port forwarding and upnp are hard to secure. Our recommendation if you want to is to run a vpn server in the router (using wireguard or openvpn) so you can connect to it and access your network through an encrypted tunnel. How to do this is too big a topic for this guide.
More Stories
EA President Talks New Dragon Age: 'A Return to What Made Bioware Great'
She thought she had bought a phone – she was shocked by its contents
Rumor: Lots of AI in Google's Pixel 10 and 11 cameras