Saturday, March 14, 2020

Sharing files from Synology NAS without Quickconnect, Cloud Station or Synology Drive

I needed a way to allow people to download photos.

Things I tried:

 -  Icedrive, but the photos are RAW, so very big - making cloud is a bit slow and clunky.  Plus I hit the free storage limit, which took simply ages to fix.  I wanted a solution where I could share files direct from my NAS without a lot of tedious uploading and syncing.

-  I tried setting up separate private folders in Photo Station for this, but I didn't like that solution.  Photo Station isn't made for that.  It's messy and wrong.


-  I read that you could share via File Station, but it needed Quickconnect.  I wasn't keen on using Quickconnect for several reasons, not least of which was the Quickconnect URLs look really amateur.

-  I also researched Synology Drive A LOT.  It does support public links, and would do this.  But it is so heavily focused on collaboration and synchronization that it just seemed wrong for me.
 


As it turns out, you can easily generate and send public links to your NAS files using your own domain name or IP address.  That's what I wanted.

(Possibly this is so blindingly obvious that everyone knows about it, and I just missed it somehow.)


This assumes:

-  You have a domain name that points to your NAS, or
-  You have a static IP in your router, or
-  You have a router-based dynamic IP setup that doesn't change often.

Steps:

1.  If not already done, forward ports 5000 and 5001 to your NAS.

2.  If you have an external IP already set up, go to Control Panel / External Access / Advanced and put your domain name, static IP or current dynamic IP in "Hostname or static IP".

Obviously, if your IP is dynamic and it changes, you'll have to change this field manually.  Doesn't happen often these days.


To share:

A.  In File Station, right-click any file or folder, select "Share".

B.  The "Shared link" will come up. 

Because you filled in "Hostname/Static IP" in (2), above, your link will include your NAS external domain/IP address.  (Otherwise, it will contain your local server name, which is no good externally.)


C.  Optionally,  you can set "Validity period" (for time limits), "Enable secure sharing" (for password protection, or "Get QR Code" (if you think a QR code will somehow be useful).

D.  Send the "Shared link" to anyone (by email or whatever).  Obviously, if you've set up a password, send that too.

Your recipient can then click the link and be taken directly to the correct folder within your NAS, where they can download the files.


To be clear, this is sharing - as in download-only access.  The recipient can't delete, edit, upload or modify, and it doesn't support things like video streaming.  If you want to do those things, use Synology Drive (or Video Station or Plex for streaming support).

You will note there are no special security settings for this; you don't need to disable anything.  The NAS treats your public user like any other user.


As a "bonus", you can go to [yourdomain.com]:5000 or [your.ip.address]:5000 from any web browser, and log into DSM remotely, just like you would at home.

I say "bonus" because there were (I think) a couple of old versions of DSM that had security bugs with this kind of access, and exposing any interface to the 'net is a security risk.  I recall I wasn't at risk since I had no remote access enabled on my NAS at the time.


I think I will go get a new domain name specifically for my new file sharing links, just because I can.