How to connect to your NAS remotely

If you have a NAS, you’re probably already aware of how useful they can be. I built one recently using an old PC and already use it to host a media server, a Minecraft server, and Pi-hole DNS filter for my home. However, some of those things (like the media server) you may want to access from outside your home, but it’s not immediately obvious how you would do that.

Depending on your level of comfort with your NAS’s services being exposed to the web, there are a few options to consider. You could port forward all of these services on your router to be accessible via your IP address, or you could go a little bit more complicated and create a VPN on the NAS so that you can access everything, which is the more secure option.

Why would you want to access your NAS remotely?

If you run a NAS, there are a few reasons why you may want to access it remotely. The first and biggest is simply just to access your files. As NAS stands for Network Attached Storage, it’s presumed you have some important files being kept on it, like photos, documents, or videos.

However, another reason you may want to is to stream content you keep on it. I have a litany of movies and TV shows I’ve ripped from DVDs over the last roughly 15 years, and I keep them on multiple drives. Migrating them to my NAS means that I can access that from anywhere so long as I can connect to it remotely.

Finally, it also allows you to use your NAS as a VPN. If you’re traveling but want to access your country’s Netflix or Disney+ catalog, for example, then you could VPN to your NAS and then watch those services normally. Either way, being able to access our NAS remotely can be quite useful.

For Synology users: QuickConnect

Synology-QuickConnect

If you have a Synology NAS, it’s actually quite easy to access your NAS from outside of your home network:

  1. Go to Control Panel> External Access> QuickConnect.
  2. Check the Enable QuickConnect box.
  3. Enter your preferred ID in the QuickConnect ID box.
  4. Make sure the Automatically create port forwarding rules box is checked.
  5. Check the box to agree to the terms of service as well.
  6. Click Apply.

You shouldn’t need to set up any port forwarding rules, and it should just work easily. If it doesn’t work though, you can set up port forwarding rules for ports 5000 and 5001 for the DSM service and port 6690 for Synology Drive. Synology has more documentation that you can follow to configure it based on your network.

There are a ton of Synology applications that you can download and install online to access your NAS remotely once this is configured, with many on the Google Play Store for example.

WireGuard VPN Tunnel

WireGuard VPN

A quick and easy solution is to set up WireGuard. On a TrueNAS setup, I used wg-easy from the TrueCharts catalog, and it truly took only five minutes. Of course, you’ll need to add the TrueCharts Catalog to your NAS first. To do this, go to Apps > Manage Catalogs> Add Catalog and enter the following information:

  • Name: TrueCharts
  • Repository: https://github.com/truecharts/catalog
  • Trains: Enterprise, Stable, Operators (commas separate each option you should select)
  • Branch: Main

Once you’ve done this, you can browse the catalog to install wg-easy and set up WireGuard. What this does is turn your NAS into a VPN that you can connect to from anywhere so long as you port forward the WireGuard port on your router, and it works very well.

In WireGuard’s web UI, you can create new profiles and export them to a .conf file, and this file (or QR code) can be imported into any WireGuard client. I created one for my laptop, one for my phone, and even one for my dad so that he can still access Irish Netflix when he’s traveling. From there, I can access all the services on my network the same way I would if I were physically there. Creating a new configuration will look like you see below, where you simply name it and click “Create”.

wireguard-wg-easy-1

This will make a configuration file that you can download and save anywhere, or generate a QR code that you can scan on your mobile device. This .conf file can be imported easily on desktop and mobile clients using the WireGuard app, which is available on Windows, Mac, Android, and iPhone, plus a few Linux distributions.

wireguard-wg-easy-2

You will also need to port forward on your router to ensure that the connection can get through, and the default port for this is 51820. Make sure that the port is the same, and also make sure that you do not share your configuration files with anyone. These files will allow anyone to gain access to your network as if they were a part of it.

Port forwarding is available through your router’s setting, which can typically be accessed via a specific URL or using an app. Check your router’s manual for instructions how to access configuration options.

It’s a pretty basic solution and doesn’t take a lot of setup, but it’s secure thanks to the usage of client certificates instead of login credentials. It still requires remembering all of your different port numbers for different services, but your TrueNAS UI (or whatever service you use) will be accessible to check what those port numbers need to be for navigating to them.

Another alternative is OpenVPN, though WireGuard is considered safer thanks to using more modern cryptographic standards. WireGuard is also typically faster, too.

A reverse proxy

If you want to access your NAS from outside of the network, a reverse proxy is a great way to do so. Not only can you access all of your services from anywhere, but you can configure them to be accessible via custom domain names. A popular piece of software to do this is nginx, and on TrueNAS, people will often use something like Traefik. You can create a reverse proxy using it that you can connect to from anywhere, which in turn then grants access to the rest of your network.

It requires a bit of setup and isn’t as secure as a VPN tunnel, but the results can be very rewarding. You could create custom domains where you can access your Jellyfin server using an address of “jf.lan” for example, and it would work, as opposed to typing in a string of numbers and a port sequence at the end. It’s not the biggest inconvenience to do that, but if you’re looking for more optimizations to make for your NAS and how you access it, then that’s something to look into.

Connecting to your NAS from anywhere can be easy

If you want to connect to your NAS from anywhere, these are some of the most popular ways to do so. It’s not really possible to write a tutorial on how to configure each of these as, aside from Synology, it will be very different depending on your particular setup. However, typically searching the name of the program and a tutorial for your chosen operating system will net you results on how to set it up for your exact configuration.

For example, configuring a reverse proxy on TrueNAS will likely be vastly different from doing so on OpenMediaVault. Likewise, WireGuard’s setup may differ from machine to machine as well, with wg-easy doing most of the work for me on a TrueNAS setup. It’s a Docker image that you can set up on any machine that supports Docker and WireGuard, but that may not be possible depending on what your setup is.

If you want to connect to your NAS from afar, there are many ways to do so, so be sure to research what will work best for your machine.