Secure remote access to Synology Drive, DSM and Plex using Tailscale — No port forwarding, trusted HTTPS and automatic certificate renewal
I recently finished configuring my Synology DS1522+ to allow secure remote access to Synology Drive, DSM and Plex from my iPhones, iPad and Mac.
I used chatGPT to guide me through VPN and security setup beyond the basic recommendations.
Please let me know if there are any suggestions to improve.
My goal was to eliminate public-facing port forwarding while maintaining convenient access to my files and media. I also wanted trusted HTTPS certificates, automatic certificate renewal and restrictive firewall rules rather than simply giving every Tailscale device unrestricted access to my NAS.
There were a few troubleshooting hurdles along the way, particularly with the native Plex iOS app, so I thought I would share the complete working configuration.
1. Overview
My setup:
- Synology DS1522+ running DSM 7
- Synology RT6600ax router
- Synology Drive Server
- Plex Media Server
- Tailscale
- iPhones, iPad and Mac
- Separate primary LAN and IoT VLAN
- DSM firewall enabled with a default deny-all rule
The finished configuration provides:
- No public port forwarding for DSM, Drive or Plex
- No need for QuickConnect
- WireGuard VPN encryption
- Restrictive Tailscale access policies
- Trusted HTTPS certificates
- Automatic certificate renewal
- Remote access through the native Synology Drive and Plex apps
- Manual approval of newly enrolled Tailscale devices
The basic network architecture is:
Phone / Tablet / Computer
|
Tailscale WireGuard VPN
|
Tailscale access controls
|
Synology DS1522+
|
+-------+--------+
| |
DSM firewall Tailscale Serve
| HTTPS :8443
HTTPS :5001 |
| HTTP localhost
Synology Drive |
Plex :32400
Tailscale is a split-tunnel VPN by default. Ordinary internet traffic continues through your normal Wi-Fi or cellular connection unless you specifically configure an exit node.
2. Install Tailscale on the Synology NAS
Download the current stable Synology package directly from Tailscale:
https://pkgs.tailscale.com/stable/
The version available through Synology Package Center can be significantly outdated, even when Package Center reports that it is up to date.
For my DS1522+, I used the DSM 7 x86_64 package.
Installation:
- Open DSM using your local LAN connection.
- Open Package Center.
- Select Manual Install.
- Upload the appropriate
.spk package. - Install or upgrade Tailscale.
- Authenticate using your Tailscale account.
If upgrading an existing installation, there is generally no need to uninstall the old package first.
Install Tailscale on your phones, tablets and computers using the same account.
You can view your connected devices here:
https://login.tailscale.com/admin/machines
For this guide, I will use the following example addresses:
Replace these with your own addresses.
3. Enable TUN networking on Synology
This is an important step that can be overlooked.
By default, Tailscale on DSM 7 can use userspace networking, which means incoming Tailscale connections may bypass DSM's normal firewall filtering.
Enabling TUN networking allows native NAS applications to initiate outbound Tailscale connections and makes ordinary incoming Tailscale traffic subject to DSM's firewall.
Go to:
DSM → Control Panel → Task Scheduler → Create → Triggered Task → User-defined script
Configure the task:
- Name: Tailscale outbound connections
- User: root
- Event: Boot-up
- Enabled: Yes
Under Task Settings, enter:
/var/packages/Tailscale/target/bin/tailscale configure-host; synosystemctl restart pkgctl-Tailscale.service
Save the task and run it manually.
You should also rerun this task after upgrading the Tailscale package, or reboot the NAS.
Official documentation:
https://tailscale.com/docs/integrations/synology
4. Configure the DSM firewall
Navigate to:
DSM → Control Panel → Security → Firewall → Edit Rules
Tailscale uses the following IPv4 address range:
100.64.0.0/10
The equivalent DSM subnet settings are:
IP address: 100.64.0.0
Subnet mask: 255.192.0.0
This range covers all Tailscale IPv4 addresses, not just your personal tailnet. Tailscale's cryptographic authentication and access policies are what isolate your own devices from other tailnets.
Create the following firewall rules:
| Source | Protocol | Destination port | Action |
|---|
| Tailscale subnet | TCP | 5001 | Allow |
| Tailscale subnet | TCP | 32400 | Allow |
TCP 5001 is used for DSM HTTPS and the Synology Drive mobile app.
TCP 32400 is used for direct Plex connectivity and initial troubleshooting.
Place these rules above your deny-all rule.
My firewall is organized approximately as follows:
| Priority | Source | Ports | Action |
|---|
| 1 | Primary LAN | Existing authorized services | Allow |
| 2 | Specific IoT media player | TCP 32400 | Allow |
| 3 | 100.64.0.0/10 | TCP 5001 | Allow |
| 4 | 100.64.0.0/10 | TCP 32400 | Allow |
| 5 | All remaining sources | All | Deny |
Preserve your existing necessary LAN rules.
If you also use the Synology Drive desktop synchronization or backup client, TCP 6690 may be required. I did not need it for the mobile app.
Do not create public port-forwarding rules on your router for these services.
Synology's port reference:
https://kb.synology.com/en-us/DSM/tutorial/What_network_ports_are_used_by_Synology_services
5. Restrict Tailscale access using grants
The default Tailscale policy is generally very permissive, allowing all devices to communicate with one another.
I wanted to restrict access to specific services rather than give every Tailscale device unrestricted access to my NAS.
Navigate to:
https://login.tailscale.com/admin/acls
Open the JSON editor.
Back up your existing policy before making changes.
Here is a minimal example granting tailnet members access to DSM, Synology Drive and Plex:
{
"grants": [
{
"src": ["autogroup:member"],
"dst": ["100.100.10.20"],
"ip": [
"tcp:5001",
"tcp:32400",
"tcp:8443"
]
}
]
}
Replace the destination address with your NAS's actual Tailscale IP.
The ports are:
- TCP 5001: DSM and Synology Drive HTTPS
- TCP 32400: Direct Plex access
- TCP 8443: Plex through Tailscale Serve HTTPS
Remove the default unrestricted grant if you intend to restrict access.
{"src": ["*"], "dst": ["*"], "ip": ["*"]}
Tailscale grants are additive, so retaining the unrestricted grant defeats the purpose of adding restrictive rules.
If you already use Tailscale for SSH, Hyper Backup, remote desktop, subnet routing or other services, preserve or create the appropriate grants for those services.
The autogroup:member selector covers user-owned devices belonging to tailnet members. Tagged devices may require separate grants.
Documentation:
https://tailscale.com/docs/reference/syntax/grants
6. Enable MagicDNS and HTTPS certificates
Initially, I could connect to my NAS using its Tailscale IP address:
https://100.100.10.20:5001
However, Safari complained that the connection was not private because the existing Synology certificate did not match the Tailscale IP address.
The solution was to obtain a trusted Let's Encrypt certificate for the NAS's Tailscale hostname.
Go to:
https://login.tailscale.com/admin/dns
Enable:
- MagicDNS
- HTTPS Certificates
Your NAS will have a hostname resembling:
mynas.tail12345.ts.net
Tailscale will warn you that the certified hostname will appear in public Certificate Transparency logs.
This is normal. It does not make your NAS publicly accessible. However, avoid using sensitive personal information in your device hostname.
7. Automatically generate and renew the Synology HTTPS certificate
This was one of the most useful discoveries during my setup.
There is a built-in Tailscale command that can generate and import the certificate directly into DSM.
No SSH, manual private key transfer or manual certificate import was necessary.
Go to:
DSM → Control Panel → Task Scheduler → Create → Scheduled Task → User-defined script
Configure:
- Task name: Tailscale HTTPS Certificate
- User: root
- Enabled: Yes
- Schedule: Daily
- Time: 04:30 AM, or whatever time works for you
Under Task Settings, enter:
/var/packages/Tailscale/target/bin/tailscale configure synology-cert
Save the task and run it manually.
The command is designed to obtain and install the Tailscale certificate and maintain it on subsequent executions when renewal is needed.
Navigate to:
DSM → Control Panel → Security → Certificate
You should see a new certificate described as:
Tailnet Certificate
IMPORTANT: I initially thought the script had failed because no new certificate appeared. Closing and reopening Control Panel refreshed the certificate list, and the new certificate was present.
If the certificate still does not appear, enable Task Scheduler output logging and review the execution result.
The implementation of this command can be found here:
https://github.com/tailscale/tailscale/blob/main/cmd/tailscale/cli/configure-synology-cert.go
8. Assign the Tailscale certificate
Installing the certificate alone was not sufficient in my case. DSM continued presenting its old certificate until I changed the service assignments.
Go to:
DSM → Control Panel → Security → Certificate → Settings
Assign the new Tailnet Certificate to:
- System default
- Synology Drive Server
Leave unrelated services and existing certificates unchanged unless you specifically need to change them.
Be aware that changing the system default certificate may cause a hostname mismatch when accessing DSM through an older Synology DDNS hostname or numerical IP address.
If you rely on multiple HTTPS hostnames, you may need a separate application portal or certificate configuration.
9. Test Synology Drive HTTPS connectivity
From a computer connected to Tailscale, run:
curl -I --connect-timeout 5 --max-time 15 https://mynas.tail12345.ts.net:5001/
The expected result is:
HTTP/2 200
Do not use the -k flag for this final test. The purpose is to verify that the HTTPS certificate is actually trusted.
If you receive:
SSL: no alternative certificate subject name matches target host name
Check the DSM certificate assignments.
On macOS, you can also verify that the connection is using the Tailscale interface:
route -n get 100.100.10.20
An interface such as utun6 is consistent with VPN routing.
10. Configure the Synology Drive mobile app
On your phone or tablet:
- Connect to Tailscale.
- Open Synology Drive.
- Log out of any existing connection if necessary. Check existing backup and sync tasks before logging out.
- Log back in using the following server address:
mynas.tail12345.ts.net:5001
Enable HTTPS and use your regular DSM credentials.
Do not enable the option to skip secure connection warnings.
Test the connection over cellular with Wi-Fi disabled.
I successfully verified that Synology Drive worked with Tailscale enabled and failed when Tailscale was disconnected.
I also temporarily disabled the DSM firewall rule allowing TCP 5001 from the Tailscale subnet. The connection failed even with Tailscale connected.
Reenabling the rule restored access.
This confirmed that DSM's firewall was independently enforcing access restrictions for my Synology Drive connection.
11. Configure Plex for remote Tailscale access
Plex requires some additional configuration.
Initially, I tested direct connectivity to Plex:
curl -I --connect-timeout 5 --max-time 15 http://100.100.10.20:32400/web/index.html
Expected result:
HTTP/1.1 200 OK
You can also test directly from Safari:
http://100.100.10.20:32400/web
Safari will report that the connection is not secure because it is HTTP. The traffic is nevertheless encrypted between Tailscale peers by WireGuard.
Unfortunately, although direct browser access worked for me, the native Plex iOS app continued reporting that my server was offline.
The solution that ultimately worked was Tailscale Serve combined with the correct iOS app permissions.
12. Configure Tailscale Serve as a private Plex HTTPS reverse proxy
Tailscale Serve provides a private HTTPS reverse proxy that is accessible only within your authorized tailnet.
It is different from Tailscale Funnel, which can expose services to the public internet.
I used TCP 8443 to avoid potential conflicts with existing DSM HTTPS services.
Go to:
DSM → Control Panel → Task Scheduler → Create → Scheduled Task → User-defined script
Configure:
- Task name: Tailscale Serve - Plex
- User: root
- Schedule: Manual execution only
Enter the following script:
/var/packages/Tailscale/target/bin/tailscale serve --bg --https=8443 http://127.0.0.1:32400
Save the task and run it manually.
The --bg flag makes this configuration persistent. It does not need to run daily.
Tailscale Serve handles its own HTTPS certificates automatically.
The resulting connection is:
Tailscale client
|
HTTPS port 8443
|
Tailscale Serve
|
HTTP 127.0.0.1:32400
|
Plex Media Server
IMPORTANT:
- Use Serve, not Funnel.
- No router port forwarding is needed.
- TCP 8443 must be permitted in your Tailscale access policy.
- In my configuration, Serve worked without a DSM firewall rule for TCP 8443.
Tailscale Serve handles these connections differently from ordinary incoming NAS traffic. Do not assume DSM's firewall independently filters the Serve endpoint.
This is another reason why restrictive Tailscale grants are important.
Official documentation:
https://tailscale.com/docs/reference/tailscale-cli/serve
13. Test Plex HTTPS
From your computer, run:
curl -I --connect-timeout 5 --max-time 15 https://mynas.tail12345.ts.net:8443/web/index.html
Expected result:
HTTP/2 200
x-plex-protocol: 1.0
You should also be able to open Plex in Safari using:
https://mynas.tail12345.ts.net:8443/web
Safari should no longer report a certificate warning.
14. Configure Plex Media Server network settings
Open Plex Web and navigate to:
Settings → Server → Network → Show Advanced
Configure the following:
| Setting | Value |
|---|
| Secure connections | Preferred |
| Preferred network interface | Any |
| Enable local network discovery (GDM) | Enabled |
| Strict TLS configuration | Off, in my tested setup |
| Enable Relay | Disabled |
| Custom server access URLs | https://mynas.tail12345.ts.net:8443 |
| IP addresses and networks allowed without authentication | Blank |
The Custom server access URLs setting is particularly important.
Enter:
https://mynas.tail12345.ts.net:8443
Do not include /web at the end.
This allows Plex to advertise your private HTTPS endpoint to its clients through its server discovery infrastructure.
Under Plex Remote Access, keep public Remote Access disabled.
You do not need to configure a custom certificate inside Plex itself because Tailscale Serve handles the HTTPS termination.
Plex network documentation:
https://support.plex.tv/articles/200430283-network/
15. IMPORTANT: Enable Local Network permission on iOS and iPadOS
This was a major troubleshooting hurdle.
I could successfully access Plex using all of the following:
- Direct HTTP through Safari
- Tailscale Serve HTTPS through Safari
- The Plex-hosted web app at app.plex.tv
However, the native Plex iPhone app still reported that the server was offline.
The problem was that the Plex app did not have Local Network permission.
Navigate to:
iPhone Settings → Apps → Plex
Enable:
- Local Network
- Cellular Data
On a Wi-Fi-only iPad, enable Local Network.
Even though I was connecting remotely over cellular through Tailscale, enabling Local Network permission immediately restored the native Plex app.
I subsequently tried reverting to the direct HTTP Tailscale connection while keeping Local Network permission enabled. The native Plex app stopped connecting again.
Restoring the Tailscale Serve HTTPS configuration restored functionality.
Therefore, both the private HTTPS reverse proxy and the Local Network permission were important in my working configuration, although other Plex installations may work without Serve.
Plex documentation:
https://support.plex.tv/articles/ios-system-permissions/
16. Test remote Plex playback
On an iPhone:
- Disable Wi-Fi.
- Connect Tailscale.
- Open Plex.
- Play a video from your personal library.
- Check the Plex Dashboard to verify that the connection is not using Plex Relay.
For a Wi-Fi-only iPad, connect the iPad to your iPhone's cellular Personal Hotspot and enable Tailscale on the iPad.
This eliminates your ordinary home LAN connection from the equation and is a convenient way to simulate being away from home.
I successfully tested remote Plex playback on both my iPhone and iPad.
I recommend also testing with Tailscale disconnected and attempting to play uncached media. With public remote access and Plex Relay disabled, remote access through this configuration should fail.
17. Enable Tailscale Device Approval
Because my firewall and access policy allow authorized tailnet members to connect to specific NAS services, I also wanted to control enrollment of new devices.
Navigate to:
https://login.tailscale.com/admin/settings/device-management
Enable:
Manually approve new devices
Newly enrolled devices will require administrator approval before communicating with your tailnet.
I also recommend protecting your Tailscale identity provider account with strong two-factor authentication, preferably a passkey or hardware security key.
Device Approval is not an independent security factor if the same administrator account is used for both enrollment and approval. An attacker who fully compromises that account could potentially approve their own device.
Tailscale also offers Tailnet Lock, which requires cryptographic signatures from trusted signing devices and provides additional protection against account or coordination-server compromise.
Device Approval and Tailnet Lock are mutually exclusive.
For my home setup, I chose Device Approval rather than introducing the additional signing and recovery management required by Tailnet Lock.
18. Review device key expiration
In the Tailscale Machines dashboard, review each device's key expiration settings.
My general preference is:
- NAS devices: Disable expiration when necessary for unattended operation.
- Phones: Enable expiration.
- Tablets: Enable expiration.
- Computers: Enable expiration unless unattended services require otherwise.
Remove old devices that you no longer use.
Keep your NAS and Tailscale clients updated.
19. Final scheduled task configuration
The finished configuration uses three DSM Task Scheduler tasks.
| Task | Schedule | User |
|---|
| Tailscale outbound connections | Boot-up | root |
| Tailscale HTTPS Certificate | Daily | root |
| Tailscale Serve - Plex | Manual execution | root |
TUN networking
/var/packages/Tailscale/target/bin/tailscale configure-host; synosystemctl restart pkgctl-Tailscale.service
Synology certificate generation and renewal
/var/packages/Tailscale/target/bin/tailscale configure synology-cert
Plex private HTTPS reverse proxy
/var/packages/Tailscale/target/bin/tailscale serve --bg --https=8443 http://127.0.0.1:32400
To inspect the current Serve configuration:
/var/packages/Tailscale/target/bin/tailscale serve status
To disable the Plex reverse proxy:
/var/packages/Tailscale/target/bin/tailscale serve --https=8443 off
These commands can be executed using DSM Task Scheduler without enabling SSH.
20. Final connection addresses
The same addresses work at home and away from home, provided Tailscale is connected.
21. Final security configuration
| Security measure | Configuration |
|---|
| Public port forwarding | Disabled for these services |
| Automatic router port mappings | Review and disable if unnecessary |
| QuickConnect | Not required |
| Tailscale VPN | Enabled |
| Tailscale grants | Restricted to required services |
| DSM firewall | Default deny |
| DSM TUN networking | Enabled |
| Synology Drive HTTPS | Trusted certificate |
| Plex HTTPS | Tailscale Serve |
| Certificate renewal | Automated |
| Plex Remote Access | Disabled |
| Plex Relay | Disabled |
| Tailscale Funnel | Not used |
| Device Approval | Enabled |
| Identity provider 2FA | Enabled |
| IoT VLAN isolation | Preserved |
One possible additional improvement would be to remove direct TCP 32400 access from the Tailscale grant and DSM Tailscale firewall rule, leaving port 8443 as the only remote Plex endpoint.
I have retained TCP 32400 in my tested configuration for now. Removing it should be tested before making the change permanent. Local Plex clients still need their applicable LAN firewall permissions.
Conclusion
This setup allows me to use Synology Drive like a private Dropbox and Plex like a private streaming service without exposing either application directly to the public internet.
The biggest lessons from my experience:
- Do not assume Synology Package Center has the current Tailscale version.
- Enable TUN networking if you want DSM's firewall to filter ordinary Tailscale traffic.
- Do not leave Tailscale's default unrestricted grants if you want service-level isolation.
- Use the built-in
configure synology-cert command for automatic DSM certificate management. - Assign the generated certificate to the appropriate DSM services.
- Tailscale Serve can solve Plex HTTPS and native app connectivity problems.
- Enable Local Network permission in the Plex iOS app, even when connecting remotely through Tailscale.
- Test remote access with both the VPN enabled and disabled.
The result is convenient remote access with multiple layers of security, no additional VPN subscription and no public port forwarding for these services.
Hopefully this saves someone else a few hours of troubleshooting.