Fixing port number in share links once and for all

Currently reading
Fixing port number in share links once and for all

Operating system
  1. Linux
  2. macOS
  3. Windows
Mobile operating system
  1. Android
  2. iOS
Okay SynoForum, I've been all over the internet searching for a fix to this.

Problem: Every time I create a share link within Drive, Moments, Video Station... the link always contains a port number (

Desired outcome: I want share links to not contain the port number (

I currently have reverse proxy working so I only have to expose my home router on port 80 and 443 so when I create share links that have the 5001 port in them, they 404. I would rather not open up additional ports on my router and sharing links with the port number in them just look confusing to the end user.

How can I get the automatically created links to NOT contain the port number? No one on the internet has provided a solid answer to this.
Last edited:
Have you tried this?


Also there's Control Panel -> External Access -> Advanced to set the domain and port number.
Upvote 0
Now that's interesting. I only get the options of using DDNS, Customized and External IP.
Upvote 0

It's not a "once and for all" solution but you can use your reverse proxy by changing the generated link to:

Where "fs" is the reverse proxy to FileStation over 443.
I don't do a lot of sharing so I didn't really look into finding a way to change the generated link directly and permanently. I'm not sure if it possible or not.
Upvote 0
Last edited:
I got it to work!

Here's what I did:
  1. Set up a new hostname of at my ddns provider
  2. Set a custom domain for Drive in the application portal that was
  3. Created a new Let's Encrypt certificate for the new hostname and assigned it to
  4. In the Drive admin console, I checked "Enable sharing link customization"
    1. For domain, I selected "Synology drive customized domain"
  5. Log out of DSM
  6. Delete all browser data/cookies, etc
  7. Restart browser
That solved it for Drive! Plus, it got me thinking about how I might be able to make aliases for my other apps as well. Unfortunately, there isn't a nice admin interface for Moments, Video Station and the rest of the apps like there is for Drive Server so that we can customize the links.

Now, for Moments and for Video Station, here's the situation I encountered and the workaround
  • When accessing Moments and Video Station from the DSM homepage, you get a URL like Example Domain
    • If you try to share files from that URL, you'll see that the share URL contains the port number
      • ex: https:/
  • The workaround for apps other than Drive is to set up domains (hostnames) for each of your apps and access them from that alias
    • ex: For Video Station, within the Application Portal settings, I set up a domain of
      • I set up a new hostname of at my ddns provider
      • I created a new Let's Encrypt certificate for the new hostname and assigned it to
  • Now, when I access Video Station at and then try to share an item, the link that's generated no longer contains the port number
    • ex: https:/
This shouldn't be this hard... c'mon Synology.
Thanks for sparking my brain @fredbert
Upvote 0
That's pretty much how I do it. Except I have one LE certificate for application portal names: it has a domain name of my domain and lots of subject alternative names (SANs), one per application portal name. There's a Synology limit of 255 characters for adding SANs. I also include in the SAN so it doesn't matter if VS, Drive, etc are launched direct or from within DSM.
Upvote 0

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to! is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads