How To Set Up Your FreeNAS Server To Access Your Files From Anywhere

featured freenas   How To Set Up Your FreeNAS Server To Access Your Files From AnywhereFreeNAS is a free, open source BSD-based operating system that can turn any PC into a rock-solid file server. Today I’m going to walk you through a basic installation, setting up a simple file share, and setting things up so you can access your files from anywhere over the Internet using the encrypted secure FTP over SSH option.

Requirements & Alternatives

To set this up today, you either need a working FreeNAS installation already set up and running, or:

As well as to set up remote access, you’ll also need:

  • The ability to configure your router to either forward ports or setup dyndns addresses.
  • An ISP that doesn’t block every port.

If FreeNAS isn’t your thing, here’s a few alternatives:

  • Microsoft Windows Home Server is my current choice of home file and backup server, and is an absolute steal at just $49 for an OEM license.
  • Amahi Home Server is a free, Linux-based solution that comes complete with an app store for adding functionality with one click installations. It’s well-developed, but some features such as disk pooling are still a bit sketchy for the average user and it does sometime require a little command line hacking to get things just right.
  • A router with DD-WRT hacked onto it and a USB hard disk attached could also perform the same function, but again there’s a lot of hacking involved to get it to work right.

Installation

First up, FreeNAS isn’t something you’ll be dual-booting, and it doesn’t even come with a nice graphical partitioning utility. If you install to your nice 1TB drive then the space will be wasted. You need to install FreeNAS to either a USB drive, or an SD card if your PC supports them.

If you’re unsure, try on a virtual machine first (our guide to VirtualBox should help you there). To write this guide, I used Parallels on the Mac, but it has issues booting from USB devices so you’ll need to create a separate 4GB internal drive for it to install too.

Upon booting, choose the default option at the top and be sure to choose the correct installation location. Remove the CD or detach the image when done, and reboot.

install   How To Set Up Your FreeNAS Server To Access Your Files From Anywhere

Once installed, there should be a web GUI URL listed, so you can switch back over to your main PC and continue to configure things over the LAN.

Click on Users -> Change password to harden the system – by default there’s no admin password set. Next, click Users -> Add User and go ahead creating your own regular user account. We’ll use this to authenticate later.

Configure A Share

Configuring a share involves first adding a ‘volume’ – that is, a hard disk – then creating a share. If you have more than one drive, you can configure them as a software RAID too for increased data integrity, but I won’t be going into details on that today.

Click on the storage button on the top menu.

volume first screen   How To Set Up Your FreeNAS Server To Access Your Files From Anywhere

Click create volume. The name you assign doesn’t really matter, but you’ll need to ensure you check off the drives you want to be in the volume. For our purposes, I have one drive I’ll be adding to it.

volume create   How To Set Up Your FreeNAS Server To Access Your Files From Anywhere

You should now see that you have 1 ‘active’ volume listed. Click change permissions and make the owner of the group the user you created before, as well as turning on the checkbox for the Group ->Write permission. In a real world scenario, you would create a group for all users and assign ownership to that rather that to an individual user, but for the purposes of testing, this is fine.

volume permissions   How To Set Up Your FreeNAS Server To Access Your Files From Anywhere

Next, click on the sharing tab. Here you can choose between Apple, Unix or Windows shares. I’ll switch over to a Windows share for now and click Add Windows Share. The only difficult part about what comes up next is choosing the folder – I just made mine the root of the /mnt/drive1 volume that I added.

windows share   How To Set Up Your FreeNAS Server To Access Your Files From Anywhere

You’ll also need to enable the CIFS service, which starts the Windows share ‘listener’. Click on Services ->Control Services from the sidebar and toggle on CIFS. Toggle on SSH while you’re on this screen too, which we’ll use later to do secure FTP (don’t enable the regular FTP service though).

freenas services   How To Set Up Your FreeNAS Server To Access Your Files From Anywhere

At this point, you should be able to access the share from a Windows machine – if it doesn’t show on the network yet , just type \\freenas directly into the address bar to force it. If you type //freenas, you’ll access the web GUI instead – good to know.

windows view network   How To Set Up Your FreeNAS Server To Access Your Files From Anywhere

Now that you’ve confirmed the Windows share is working, let’s move onto remote accessing your data.

DynDNS

In order to use a simple URL to access our files, we’re going to be assigning a free dynamic DNS address to our home IP. Head over to DynDNS to set up a free account.

dyndns signup   How To Set Up Your FreeNAS Server To Access Your Files From Anywhere

You’ll need to confirm the email address too. When that’s done, you’ll be presented with a service plan page. In small writing at the bottom is the link to set up your free account for up to 2 hostnames. Click that.

dyndns free signup link   How To Set Up Your FreeNAS Server To Access Your Files From Anywhere

Enter your desired hostname (you can select various domains from the drop-down), then click on the blue text that lists your IP. This will automatically fill in your IP address.

dyndns setup   How To Set Up Your FreeNAS Server To Access Your Files From Anywhere

Port Forwarding

This is a different configuration for every router, so it’s really hard to show you how it’s to be done on your exact model. For mine, I accessed the router configuration at 192.168.0.1, and clicked on Port Forwarding.

port forwarding   How To Set Up Your FreeNAS Server To Access Your Files From Anywhere

You need to forward the SSH service port – 22 – to your FreeNAS internal IP. This is .11 in my case.

Test:

First, let’s see if regular SSH works. From a linux or OsX terminal, type:

ssh username@domain.dyndns.org

The username you set up earlier, and the domain is the address you chose at DynDNS . You may get an error about verifying the authenticity of the host, but don’t worry, type YES to connect anyway.

If you see a bunch of text, you know it’s working.

terminal verify ssh   How To Set Up Your FreeNAS Server To Access Your Files From Anywhere

Now open up your favourite FTP program and enter in the same details – username, the DynDNS domain, the password – but make sure the protocol is set to SFTP – this is crucial.

sftp setup   How To Set Up Your FreeNAS Server To Access Your Files From Anywhere

If all went well, you should be presented with a straight overview of the whole filesystem, so you can now drill down into the precise folder or share you want access to. Congratulations, you now have complete access to your shares from anywhere in the world!

sftp full access   How To Set Up Your FreeNAS Server To Access Your Files From Anywhere

We have really only just scratched the surface of how powerful FreeNAS is – I hope to highlight some of its other features in the future, so stay tuned. I hope you also tried copying a file across to see how blazingly fast it is too. Problems and comments are welcome as always but if your problem is really technical, you might get a better response by crowdsourcing it to our tech answers site.

The comments were closed because the article is more than 180 days old.

If you have any questions related to what's mentioned in the article or need help with any computer issue, ask it on MakeUseOf Answers—We and our community will be more than happy to help.

4 Comments -

0 votes

Teach

thanks for this tutorial… great.. I already installed the FREENAS

0 votes

Aibek

how do you find it so far?

0 votes

Teach

its ok… but having some trouble installing mysql

0 votes

Spyrule

Contrary to some people’s thinking, FreeNAS is just that… a NAS. It’s made to be a storage location and not a content server. It CAN do that after installing a bunch packages, but remember it runs BSD, which doesn’t have as much “home” based apps having been written.  Although, setting up a storage location as an iscsi target and then sharing from that target produces phenominal performance, you still need to setup your media sharing from a pc to share your stuff… so to speak.  But if your looking for a simple, but good Network storage app… this is by far the best I’ve played with (that’s free anyway!).