Caddy on Docker on Synology

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

On your router, you need to port forward ports 80 (and 443? still awaiting response) 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 caddyfile and common.conf by replacing these terms as noted in each file:

  • YourDDNSName.DDNSPROVIDER.com (in caddyfile)
  • youremail@somewhere.com (in caddyfile)
  • YourUserID YourPassword (in common.conf with whatever you want to use when hitting your site)

Reverse Proxy Only New Caddyfile:
https://zerobin.net/?67894bcbb2fb5c6a#iQ1QL21B0tsDikCT41GgwPXf6kSGc/cWF8oq8e5L7LA=

Reverse Proxy Only Common.conf example:
https://zerobin.net/?4ed2769528df1c4a#nJfoL04CRcvyxNlCRMmkbtlhfLXB/22Hb74A9X71cFE=

Place these files in /apps/configs/caddy/Caddyfile/ and rename them to just be Caddyfile with no extension and common.conf

 

 

CaddySearch.jpg

CaddyLaunch.jpg

advanced.jpg

volume.jpg

Need new screenshot needed as first mount needs to be  /apps/config/caddy/Caddyfile to /etc/Caddyfile instead.

 

network.jpg

environment.jpg

next.jpg

apply.jpg

Need new screenshot needed as first mount needs to be  /apps/config/caddy/Caddyfile to /etc/Caddyfile instead.

 

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 common.conf, 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/radarrand YourDDNSName.DDNSPROVIDER.com/nzbget

 

I am currently explorering how to do CNAME instead.  As an example you’d go to sonarr.YourDDNSName.DDNSPROVIDER.com instead of YourDDNSName.DDNSPROVIDER.com/sonarr

This hasn’t been done correctly yet.  For now I’d recommend to remove all of the subdomain code blocks for now within the Caddyfile.

Remove these:

####################################################################################
# NZBGet subdomain code block, need to create logs folder?
####################################################################################

nzbget.YourDDNSName.DDNSPROVIDER.com {

gzip

# Separate log file for NZBGet server

log /caddy/logs/nzbgetaccess.log {
rotate_size 1 # Rotate after 1 MB
rotate_age 7 # Keep log files for 7 days
rotate_keep 2 # Keep at most 2 log files
}

errors /caddy/logs/nzbgeterror.log {
rotate_size 1 # Set max size 1 MB
rotate_age 7 # Keep log files for 7 days
rotate_keep 2 # Keep at most 2 log files
}

proxy / 127.0.0.1:6789 {
transparent
}

}

####################################################################################
# Sonarr subdomain code block, need to create logs folder?
####################################################################################

sonarr.YourDDNSName.DDNSPROVIDER.com {

gzip

# Separate log file for Sonarr server

log /caddy/logs/sonarraccess.log {
rotate_size 1 # Rotate after 1 MB
rotate_age 7 # Keep log files for 7 days
rotate_keep 2 # Keep at most 2 log files
}

errors /caddy/logs/sonarrerror.log {
rotate_size 1 # Set max size 1 MB
rotate_age 7 # Keep log files for 7 days
rotate_keep 2 # Keep at most 2 log files
}

proxy / 127.0.0.1:8989 {
transparent
}

}

####################################################################################
# Radarr subdomain code block, need to create logs folder?
####################################################################################

radarr.YourDDNSName.DDNSPROVIDER.com {

gzip

# Separate log file for Radarr server

log /caddy/logs/radarraccess.log {
rotate_size 1 # Rotate after 1 MB
rotate_age 7 # Keep log files for 7 days
rotate_keep 2 # Keep at most 2 log files
}

errors /caddy/logs/radarrerror.log {
rotate_size 1 # Set max size 1 MB
rotate_age 7 # Keep log files for 7 days
rotate_keep 2 # Keep at most 2 log files
}

proxy / 127.0.0.1:7878 {
transparent
}

}

####################################################################################
# Synology subdomain code block, need to create logs folder?
####################################################################################

synology.YourDDNSName.DDNSPROVIDER.com {

gzip

# Separate log file for Synology server

log /caddy/logs/synologyaccess.log {
rotate_size 1 # Rotate after 1 MB
rotate_age 7 # Keep log files for 7 days
rotate_keep 2 # Keep at most 2 log files
}

errors /caddy/logs/synologyerror.log {
rotate_size 1 # Set max size 1 MB
rotate_age 7 # Keep log files for 7 days
rotate_keep 2 # Keep at most 2 log files
}

proxy / 127.0.0.1:5000 {
transparent
}

}

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