Alright, so you’ve read my previous article introducing you to what a network attached storage (NAS) device is and you’ve decided to implement such a device on your home network. Awesome! So what’s next? Well, now comes the hard part. Sort of. You see, I’ve done the initial research for you and here in this article, I’ll walk you step by step on how you can simply get a NAS box up and running before the day’s end. Granted, like I’ve said in my previous article, there are numerous steps you have to perform and each step is equally important. One skipped step and you might have a file server not working how you want it to. As another fair warning, following the steps presented in this article will only get you started with NAS4Free. However, you will at the end of the tutorial have a completely functional NAS box with a couple of files shares that will be accessible from the other computers on your home network. There are many, many features that you can implement on your NAS box such as configuring a RAID setup to disk encryption. If you are completely new to NAS4Free and configuring a NAS box in general, this tutorial is meant for you. Once you’ve gotten the basics down, then I would recommend you to research the many other functions that this free operating system provides to enhance the capabilities of your NAS box.This article is intended to go into how to configure your NAS box. If you want an introduction to what NAS is and whether or not you should use one, then please read my previous article!
What You’ll Need
- A dedicated NAS box – This computer will be your NAS server. The computer can be as barebones as possible! You do not need a fancy graphics card nor tons of RAM. If it turns on and boots, you’re good to go! Granted, NAS4Free does have a supported hardware list which you can find here. My advice is to just boot the operating system and see where that gets you rather than spending too much time worrying about whether your hardware is compatible or not. I did notice that NAS4Free needed at least 512MB of RAM. It kept rebooting when it only had 256MB.
- NAS4Free – The FreeNAS operating system is technically the operating system of choice for NAS builders. However, I find that OS to be buggy when I first embarked on this project (it wouldn’t even let me create a single user as it kept saying I didn’t fill out the required fields even though it doesn’t tell me exactly what those fields are!). I then found out that FreeNAS is now operated by a different group of users hence the changes. NAS4Free is a version that is built on top of FreeNAS 7 series. During my experimentation, NAS4Free works magically and that is why I am using it as the operating system of choice for my NAS box. You can download a free copy of NAs4Free here.
- Management computer – This is the computer that you use day in and day out. We will use it to do the majority of the configuration tasks once we have NAS4Free up and running.
- WinSCP – This awesome utility allows us to FTP into our NAS box to perform configuration and maintenance. You can download the free utility from here.
- Hard disk(s) – You’ll definitely need empty hard disks to use with your NAS box to actually store your data. If you are just starting out, feel free to start with a single disk just to get a hang of how NAS4Free works. Once you are more comfortable with NAS4Free, you can easily add additional hard disks in the future for added storage space. In this tutorial, I am assuming you have just one physical hard disk installed in the NAS box.
- A working network – You obviously need a connected home network to work with data to and from your NAS box.
- A client computer – This is just a regular computer connected to your home network to test with NAS4Free. You can just as easily use your own management computer or spin up a virtual machine.
My End Results..
The demo I will be showing here is fairly simple. At the end, I will have a fully functional NAS box on my network. I have two users named Alice and Bob that need to store their data on my file server. Each user needs their own private folder where only they are able to access it and no one else. However, they also need a general public folder to share files between each other when the occasion calls for it. Both Alice and Bob should have read and write access to this public folder. On both Alice’s and Bob’s computer, they will map two network drives corresponding to the two folders I’ve just talked about so that they can have access to them whenever they turn on their computer while on the home network.
- Burn the NAS4Free ISO to a CD or DVD.
- Connect a keyboard and monitor to your NAS computer. A mouse is not needed as there is no graphical interface when installing NAS4Free initially on the NAS box itself.
- Pop the NAS4Free CD into the computer and boot from it. You can change the device boot order by heading into your computer’s BIOS screen.
The beauty with NAS4Free is that it boots and loads very quickly as the operating system is very lightweight. Eventually, you’ll get booted into the NAS4Free boot option menu. Let the timer run down automatically or press the number 1 on your keyboard. This instructs NAS4Free to start in the default installation mode. Here is where you cross your fingers and pray that everything goes well because here is where NAS4Free will probe and inspect your computer hardware. NAS4Free automatically loads a compatible device driver for your detected hardware. Once you get to the screen where you are once again presented with a menu option and you see that NAS4Free has been assigned an IP address, then congratulations because NAS4Free has been completely loaded! If not, then you’ll have to investigate the problem and try again.
While you can run the NAS4Free operating system from a LiveCD (which is what you have at this very moment), I would recommend you to actually install the OS onto your hard drive directly. Trust me, this saves a lot of headache in the long run. Although NAS4Free needs very little maintenance once you get things started, there will still be times when you need to reboot the server or if the system crashes. By installing the OS onto the hard drive, you can save the networking information on future reboots without you have to reconfigure things. To start the installation, press number 9 on your keyboard and then the Enter key.
On the initial screen, choose option 3 and hit OK. On the next warning screen, read the prompt and hit OK again. This is basically telling you that NAS4Free will install itself on the first partition and it will automatically create another partition for you to use as the “data” partition. In past versions of FreeNAS, I believe it was impossible to use the hard drive you’ve installed the OS on as a data drive as well. This lead many users to install the OS onto a USB thumb drive instead. Next, you select the source to install from. If you’ve booted NAS4Free from a CD, this will be your source. Next, pick the drive to install NAS4Free. This should be on your first hard disk. Next, you get to choose how big a partition to install the OS on. The minimum needed is 380MB. Finally, you get to choose whether or not to create a Swap partition. This partition space is used to help boost systems with low amounts of memory. I chose to not create this partition. Once the OS is installed, you will get a nice warning prompt about how to use your hard disk when you later use the GUI management utility. Basically it’s warning you against reformatting the drive!
Now that the OS has been installed locally on the hard disk, test it out by removing the installation CD and rebooting the computer. If all goes well, you should end back up at the console setup screen!
Configuring Static IP AddressTechnically you really don’t have to perform this part of the procedure. It’s just that it has always been drilled in my head that for any kind of server, it should always be assigned a static IP address instead of getting one from a DHCP server. With NAS4Free however, I do notice that it always assigned me the same IP address upon each reboot.
As with any server or computer on a network where users rely on it for certain services, it’s imperative that we assign the server a static IP address rather than it getting one from your router. However, from my testing with NAS4Free, I noticed that it always assigned my NAS box with the same IP address of 192.168.1.250. To play it safe, I’m going to assign it a static IP instead. For that we press the number 2 on our keyboard.
– First it will ask us if we want to use DHCP. My answer is no.
– On the next screen, I’ll assign my NAS box with a static IP address of 192.168.1.240. You obviously should use an IP address that sits in the range of your own home network IP address range.
– In the subnet screen, I’ll stick with the default of a /24 notation.
– For the gateway address, I will leave it blank here because my NAS box does not need any outside access to the Internet. Usually your gateway address is the IP address of your home router. However, a user commented that his machines could not find the NAS server on the network until he issued a default gateway address. Since there is no harm in specifying one, feel free to go ahead and do just that here.
– In the DNS screen, I will leave it blank as well. Once again, I am on a home network and therefore a DNS server is not required for my machines to find the NAS box. Feel free to enter in an address here. Usually this will be either your router’s IP address or a specific DNS server of your choosing.
– For the IPv6 configuration screen, I simply skipped it.
Finally, NAS4Free will configure the network adapter with the options I chose and lets me know that my server can now be managed via the static IP address. To make sure it sticks, reboot your server and check if the NAS box is configured with the static IP address.
Time to Finally Get Started!
Still with me so far? Good because things are about to pick up! As far as your NAS box is concerned at the moment, it is all configured and the next time you need to touch the box again is when you need to add in additional hard disks! The second half of this tutorial deals with getting our hard disk ready, adding users and groups, creating directories and sharing out folders. Right about now, we should try and initiate a connection to the NAS box from our management computer. Simply fire up a web browser and type in the IP address of the NAS box in the address bar. If you get the NAS4Free login screen prompt, you can then safely remove the keyboard and monitor attached to the NAS box. The server is now considered ‘headless’.Throughout your time following my instructions here, I would advise you to pay attention to some of the other features and settings that you come across in NAS4Free. Remember, there’s just too much to list here and so I definitely will not be going over each setting in detail. If something strikes you as interesting, be sure to follow up on it to see if you should apply it to your NAS box in the future.
Configuring Our Disk
First things first, we need to prepare our hard disk for use. At the login prompt, type in the username and password for a default installation of NAS4Free which is admin and nas4free, respectively.If you are only performing a trial run of NAS4Free, you can leave the default password as is. However, you should definitely change the default password once you are confident that you will be using NAS4Free for good on your network. You can change the password by heading into System –> General and clicking on the Password tab.
To prepare our disk, head into Disk –> Management. By default, there shouldn’t be any entry listed here. Click on the blue plus symbol located on the far right side. In my demo, I only have one physical hard disk installed and so that will be the one I import here. Fields that are not bolded are not required to be filled out. Therefore, I only select my one disk and hit the Add button.
At the next screen, notice that the changes have not been committed. We actually have to click on the “Apply Changes” button to commit the change. This is how NAS4Free works. Therefore, for the rest of the tutorial, I will not repeat this part so please remember to hit the Apply Changes button if applicable!
Once our disk has been imported and online, it’s now time to mount it. Normally, we would need to perform a format of the disk but because we chose to install the NAS4Free OS directly onto the hard disk, it did this for us! Therefore, do not format this disk. If you have other blank hard disks, then you will need to format it first prior to mounting it. You can do so by heading into Disks –> Format. You then select the disk and choose to format it with the UFS file system. Because I only have one disk in this tutorial, I can go straight to mounting it by heading into Disks –> Mount Point. Hit on the blue plus symbol.
Here we need to configure a mount point for our disk. Think of a mount point as the starting place to store our folder directories. Users on your network won’t see this mount point though but only the directories created within it. Here are the settings I’ve configured. Make sure in the Partition Number field box, type in the number 2. Partition 1 is where NAS4Free is installed at so we need to leave that alone. For the Mount Point Name, you can use whatever you want. Under Access Restrictions, you can completely leave that part alone.
Adding Users and Groups
Once our disk has a mounted volume point, we can then begin to creating our users and groups. Basically, you should create a user account in NAS4Free for every user on your network. So in my example, I will create two: one for Alice and one for Bob. This allows us to grant granular access permissions on shared folders. However, it doesn’t make sense to grant individual users access to the same folder, which in our case is the Public folder. Therefore, we create groups and make users a part of that group. We then grant folder access permissions using those groups. This works very similarly to Microsoft Windows.
First we create our group. Head over to Access –> Users and Groups. Switch over to the Groups tab and click the plus symbol. You just basically need to give the group a name and description. Since this group is used to grant users on my network access to the public folder, I will call this group Public. Please jot down the Group ID number because we will need this information later in the tutorial.
Now we switch over to the Users tab. Once again, click on the blue plus symbol to begin creating users. I will create Alice here but Bob will be created similarly. Here, make sure to set the user’s primary group to ‘nogroup’ and in the Additional Group field, put them in the group we’ve just created above. In my case, it will be ‘Public’. Once again, make note of the User ID number.