At its most basic, Network attached storage, or NAS, is a great way to share files on your local network. But it's also a perfect solution for backing up your computers, streaming media across your home network, or even torrenting files to a central server. If you have an aging computer lying around, you can turn it into a NAS for for free with the open-source FreeNAS operating system. Here's how.

First, we'll take a closer look at what exactly a NAS is and does, then jump into how to set it up. If you want to skip the first part, you can skip straight to the setup section.

Note: This guide uses FreeNAS 7. We now have an updated guide to FreeNAS 8, which includes some information on the difference between the two. We've kept this guide intact because FreeNAS 7—the version we used here—is still available as a separate project called NAS4Free. So, we decided to leave the guide here and change the title. We'll still refer to it as FreeNAS throughout the guide, and while the videos use the old version of FreeNAS, the process should be nearly identical for NAS4Free.

Also, before getting started, make sure NAS4Free is right for you. These days, there are a lot of solid server options out there. Read more here.

Dear Lifehacker, I'm ready to take the plunge and build my own home server, but I'm not…
Read more Read more

What Is Network Attached Storage?

A Network attached storage box is a computer on your network specifically designed to store files. Any computer on the network can access files on a NAS, which makes them great for bigger households, and they're also nice for when you don't want to store a bunch of external drives on your desk. Unlike regular file servers, NAS units are usually built for a specific purpose, like backing up your data or streaming media to other machines. They're also usually quite low power and low cost, and they don't require a monitor, mouse or keyboard—once you've installed the software, you can configure every aspect of your NAS from a web browser on your other computers.

You can find pre-made NAS units for as low as one or two hundred dollars, and they usually come with their own software. However, if you have an old computer lying around, you can actually turn it into a NAS for free with the aptly-named FreeNAS software. It doesn't need much in terms or resources, any old computer will probably do. Alternatively, you can buy or build your own home server box that fits the specifications of what you want to do (and even hide it in some nice-looking box from IKEA). The bottom line is, there's no need to go out and buy a pre-built NAS when you can make one yourself with great, free, open source software and hardware you already have lying around. Heck, if you've got the money, you're better off spending on it on an extra hard drive than you are an entirely new machine.

If last week's look at the five best home server software got you excited about setting up a…
Read more Read more

Here, we'll show you how to set up FreeNAS on the computer of your choice, connect it to your other computers as if it were directly attached to them, and show you a few simple examples of how you could use it for backup, iTunes music streaming, or video streaming to a home theater PC. Photo by Andrew Currie.

What You'll Need

You can install FreeNAS on a ton of different systems using a number of different methods, but here are the things you'll need for our method:

A PC with a minimum of 192MB RAM to act as your NAS. It will also need an Ethernet connection and a bootable CD drive in it from which we can install FreeNAS onto one of its hard drives.

A network with DHCP reservations or static IP addresses. This isn't required, but it's definitely preferred. If you don't have this, managing your NAS can get pretty annoying, since its IP address will change whenever you reboot it (as will your other computers').

FreeNAS is actually designed to run on a flash drive or compact flash card rather than one of the drives in your computer, but since many computers (especially older ones, like the one you might recycle into a NAS) don't support booting from USB, we're going to install FreeNAS to the hard drive for simplicity. If your computer supports booting from USB, you can actually use the live CD to install FreeNAS to a 2GB flash drive and run FreeNAS from that flash drive instead, keeping it plugged into your NAS at all times.

Installing FreeNAS

To install FreeNAS, you'll need the FreeNAS live CD. Head to this page and click on the latest stable build of FreeNAS 7 NAS4Free. Download the live CD image that applies to you—that is, if your NAS has a 64-bit capable processor in it, grab the amd64 version. If not (or if you aren't sure), grab the i386 version. Burn it to disc using something like IMGBurn for Windows or Burn for Mac, and stick it into a computer (any computer, it doesn't matter if its your NAS or not).

Head over to your NAS box and boot up from the live CD. It'll take awhile to boot up, but once you get to the FreeNAS menu, pick option 9: "Install/Upgrade to hard drive/flash device". Pick option 2 on the next screen, "Install embedded OS on HDD/Flash/USB + DATA + SWAP partition" (if you're installing on a flash drive, you can pick option 1 instead). Pick your CD drive and hard drive from the lists it throws at you, and say no to a SWAP partition (unless your computer has less than a few gigs of RAM, in which case it might be a good idea to create a SWAP partition that's twice the size of the RAM in your machine). It will format your drive for you with the UFS file system, and install FreeNAS to a small partition at the beginning of the drive.

Remove the live CD and boot up your computer. You should boot into your new FreeNAS installation, and come up with the same menu the Live CD gave you. This time, pick option 1, "Assign Interfaces". Pick your ethernet port from the list (there's probably only one option), then pick "none, Finish and exit" on the next page. Next, pick option 2, "Set LAN IP Address". Using DHCP should be fine, unless you're using static IPs, in which case you can hit "no" and assign it an address yourself.

When you're done with all the network configuration, it should spit out an IP address for you. This is how you'll access the web interface to configure everything on your NAS, so make a note of it and head over to your desktop computer. You can now unhook the keyboard and monitor from your NAS; you won't need them anymore.

Sharing Your FreeNAS Drive with a Desktop Computer

To access the web interface, open your web browser and type in the IP address you copied down at the end of the installation process. When you first open it up, it'll ask you for a username and password. Type in admin for the username and freenas for the password to gain access.

The first thing we want to do is change these to something a bit more secure. Click on the "System" menu at the top of the page and hit "General". Under WebGUI, change the username to whatever you want, and click save. Go to the Password tab and change your password as well.

Next, we'll add our hard drive(s) to FreeNAS. Hover over the Disks menu at the top of the page and click on Management. Click on the Plus sign to add a new one. On the next page, choose your disk from the "Disk" dropdown menu, type in a description if necessary, and hit Add. The rest of the default settings should be fine for now. Make sure you hit "Apply Settings" back on the Disk Management page when it takes you back there.

If you're running FreeNAS off a flash drive, head to Disks > Format and pick your disk from the dropdown menu. Choose "UFS (GPT and Soft Updates)" and give it a volume label. Hit Format disk. If FreeNAS is installed to your internal hard drive, you can skip this step since you formatted it when you installed FreeNAS.

Next, we need to give that drive a "mount point" in FreeNAS. Head to Disks > Mount Point from the top menu, and click the plus sign. Pick your disk from the dropdown menu. Give the mount point a name and a description if you like. I also turn off "foreground/background file system consistency check during boot process" here, since that's caused problems with slowdowns and crashes for me in the past. Click the Add button and once again, hit Apply Settings on the next page.

We're almost there! The last thing you want to do is share that drive with your other computers on the network. For this example, we're going to use CIFS, since it's compatible with Windows, Mac, and Linux machines (If you're in a Mac-only household, I recommend researching AFP instead, since it'll be a bit easier to set up). Head to Services > CIFS/SMB and hit the Enable checkbox in the right corner. You can change its NetBIOS name, workgroup, and description if you so choose, then scroll down and hit "Save and Restart".

Click on the Shares tab at the top of the settings page, and click the plus sign. Give it a name, comment if desired, and hit the "..." button to tell it which of your FreeNAS drives you want to share. The default settings should be fine for most people, so go ahead and hit Add.

That's it! You should be able to access your network-attached drive from any computer. In Windows Explorer, just type \\192.168.0.10 into the navigation bar, using your NAS' IP address in place of the example I've provided. You should see your NAS show up and you can browse it, create folders, add files to it, and so on. For easy access, you can right-click on it and hit Map Network Drive to put it under My Computer. You should be able to do this with every other computer on the network, and easily share files between all of those computers.

Three Cool Ways You Can Use Your NAS

That's all fine and dandy, but you can do more than just store files on the network. Here are a few cool things you can do with your NAS and how to set them up.

Backing Up Data to Your NAS

Since a NAS can hold many large drives, it's a popular option for backing up data. FreeNAS recommends Rsync for backup, but I've found that it's more trouble than it's worth (not to mention it isn't very good for backup). Instead, I found you can just use Windows' built-in backup system, which is great. In addition, Mac users can use Time Machine with their NAS as long as you're sharing that drive with AFP instead of CIFS.

Backing Up With Windows Backup

Using Windows Backup with your NAS is a cinch, though you'll need Windows 7 Professional or above to do ti. Just open up the start menu and type "backup", and click on "Backup & Restore" when it pops up. From there, click "Set Up Backup" (or "Change Settings" if you already have a backup running), and then click the "Save on a Network" button in the bottom left corner of the window that pops up. From there, type in the path to your NAS' shared drive, or click Browse to find it yourself. You shouldn't need to enter any credentials. Then, click Next, and choose your backup settings (I just use Windows' defaults). Set the schedule to run whenever you want, and let 'er rip. I've found that this only really works well if I'm connected to my NAS via Ethernet; wireless is much, much too slow (and will even fail). Once you're done setting up, you can go about your daily business and return to Backup & Restore if you ever need to restore any lost data.

Backing Up With Time Machine

If you want to back up with Time Machine, you'll need one of the drives in your NAS shared through AFP instead of CIFS, as described in the "Sharing Your FreeNAS Drive" section above. If you do, you can head into Services > AFP > Shares on the web interface, edit the settings for that share, and pick "Time Machine" from the "Automatic Disk Discover Mode" dropdown. The next time you open up Time Machine, your NAS drive will be available as a backup disk.

Note that to do this, you'll want to mount the NAS drive at logon, which you can do by opening up System Preferences on your Mac, going to Accounts > Login Items and dragging the NAS drive from your desktop right into the login items window. That way it will always be connected and Time Machine will be able to access it at all times.

Streaming Media to Other Computers From Your NAS

If you have a home theater PC, Playstation 3, Xbox 360, or other UPnP-enabled device, you can stream media straight from your NAS with just a few tweaks. We've talked about UPnP before, so you might already know how easy it is to use—and FreeNAS' setup is no different.
To get started, head into the web configuration for your NAS and go to Services > UPnP. Click the Enable checkbox on the right hand side and give your UPnP server a name. Under "Database Directory", click the "..." button and browse to a folder on your NAS where you want the UPnP configuration file stored (it doesn't really matter where this is). Then, head down to Content and click the "..." button to point FreeNAS to the folders you want to share. In this case, we have a "Media" folder we've created in which we're storing video, so we'll pick that and hit the "Add" button to add it to the list. You can add multiple folders from all over your NAS, and it can stream them as long as they contain movies or music.

Some devices, like the Playstation 3, may require you to transcode your higher-definition videos, so check the "enable transcoding" box if necessary. Then hit Save. If you head over to your UPnP device and search for servers, you should see that your NAS pops up, and you can browse your media folders and watch those videos on your TV.

Downloading Torrents Using Your NAS

One of the coolest features of FreeNAS is the ability to download torrents without the help of another computer. FreeNAS has a version of Transmission built right in that can watch folders for torrents and download them—you'll never have to worry about keeping your main computer on, logged in, or avoid rebooting it. Your NAS can download all those torrents for you.

To set up BitTorrent support, open up FreeNAS' web configuration and go to Services > BitTorrent. Click the Enable checkbox on the right hand side, and specify a Download Directory. This is where your completed torrents will go. Most of the other settings are fine, though I like to require encryption on the people to whom I connect, so you can tweak that setting if you want. If you want to set up a Watch Directory, that's probably a good idea too—that way, you can drop torrent files right into a specific folder on your NAS and it will immediately start downloading them. Hit Save when you're done.

When you start downloading a torrent, you can monitor it from a web interface by going to 192.168.1.10:9091, replacing my IP address with your NAS', of course. That way you can keep an eye on how far your torrents are coming along from any computer on your network.

Note: Some people are having issues connecting to the internet with their NAS. For some reason, it only seems to let you if you're running a static IP address. This is very simple to address: at the main FreeNAS screen (on your NAS itself, not in the web interface), pick option 2 to "Set LAN IP Addresses" and give it the IP address of your choice. Give it the IP of your router when it asks for the Gateway. If you've already set up DHCP reservations as recommended, this won't affect the rest of your network since that IP will be blocked for other machines anyways. Once you've got a static IP FreeNAS should let you adjust the DHCP settings again, and you can torrent away.