Caddy on Docker on Synology

*This guide is incomplete.  Feedback and tweaks welcomed.*

 

You need a DDNS from no-ip or duckdns.org

On your router, you need to port forward ports 80 and 443 to your NAS.

You also need to setup URL base for sonarr and radarr in settings.  NZBGet’s is already built in to to work.

Create folders on NAS.

  • /apps/configs/caddy/
  • /apps/configs/caddy/logs/
  • /apps/configs/caddy/Caddyfile/
  • /apps/configs/caddy/certificates/

Customize the caddyfile by replacing these terms as noted in each file:

  • YOUR_DDNS_NAME.YOUR_DDNS_PROVIDER.X
  • YOUR_EMAIL@YOUR_EMAIL_PROVIDER.X
  • YOUR_USERID YOUR_PASSWORD (with whatever you want to use when logging into your site remotely)
  • YOUR_NAS_LOCALIP (with your server’s local IP address, such as 192.168.1.99)

Reverse Proxy Only New Caddyfile: https://paste.ee/p/kL04B

Place this file in /apps/configs/caddy/Caddyfile/ and rename itto just be Caddyfile with no file extension.

 

Open docker, go to the registry tab.  Search and locate the abisoft/caddy container.  If you just search caddy, it will be near the top. Click Download.CaddySearch.jpg

 

It may take a few minutes to download.  Next go to the image tab and click the abiosoft/ caddy image. Click Launch. Now click Advanced Settings.

CaddyLaunch.jpg

In the first tab, Advanced Settings, check the box next to Enable auto-restart.

advanced.jpg

On the Volume tab, add the following. Please note when to use FILE and FOLDER.

Add File: apps/config/caddy/Caddyfile to /etc/Caddyfile

Add Folder: apps/config/caddy/Caddyfile to /root/.caddy

volumeFINAL.jpg

 

On the Network tab, check the box for Use the same network as Docker Host.

network.jpg

On Port Settings tab, leave default.

On Links tab, leave default

On Environment tab, add command –conf /etc/Caddyfile –log stdout

environment.jpg

Then Click OK. Then Next. Then Apply.

 

Off of your homenetwork, perhaps your cell phone with the wifi off, navigate to YourDDNSName.DDNSPROVIDER.com/sonarr , login with the userID/password you setup in the Caddyfile, and now you should be able to use Sonarr just like you were on your home network.

You can do the same with YourDDNSName.DDNSPROVIDER.com/radarr and YourDDNSName.DDNSPROVIDER.com/nzbget

 

My Issues

In my case, I had to setup some custom port forwarding for my ASUS router (running merlin) as I had issues connecting remotely.  If needed, I can update the guide with exactly what I had to do.  For now here is a run down.  On my router, I did port forwarding to my NAS IP using TCP.  External Port 80 to internal port 8080 and External Port 443 to internal port 8443.  In the docker container I then updated port settings: (first I had to update the Network tab and uncheck the box for Use the same network as Docker Host.)

Local Port 8443 to Container Port 443 via TCP

Local Port 8080 to Container Port 80 via TCP

PortSettingsUPDATED.jpg

 

 

 

Advertisements

5 thoughts on “Caddy on Docker on Synology”

    1. Bummer I thought I choose the permanent link. I’ll get them uploaded and update the URL. I’ll post a reply when complete. I never polished this guide up, you will have to let me know how it goes. My caddy server is working well still.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s