Synology Nas Reverse Proxy
How to Install Plausible on Your Synology NAS and Synology: How to Add Wildcard Certificate are great guides to setting up a Plausible Docker image on your NAS and exposing it to the internet, but they are long. This blog post is a generic and condensed guide to follow in order to reverse proxy a Docker image running on your NAS and exposing it to the internet. To follow this guide, you will need to own a domain name.
Expose Your NAS via Dynamic DNS
- In your NAS “Control Panel”, click “Security” from the sidebar
- Click the “Certificate” tab
- Select the “Add a new certificate” radio selector
- Select the “Get a certificate from Let’s Encrypt” radio selector
- In the “Domain name” text field input: “<your-domain>.synology.me”
- In the “Subject Alternative Name” text field input: “*.<your-domain>.synology.me”
- this last step is important in order to have wild card routes
Create DNS CNAME
- From your DNS server, for me AWS Route 53, create a CNAME record
- for example, I own iacut.one and pointed nas.iacut.one at the value iacutone.synology.me
- this value needs to match the certificate domain from above
Reverse Proxy a Docker Image
- In your NAS “Control Panel”, click “Login Portal” from the sidebar
- Click “Advanced” tab
- Click “Reverse Proxy” button
- Click “Create” button
- note, the Destination port needs to match the port defined in the Docker Compose yml
The best part of this is Synology will auto-renew your CA certifications via Let’s Encrypt.