All reverse proxies stopped working after I change to a new router

1. Caddy version (caddy version): v2.4.5

2. How I run Caddy:

I run caddy using nssm and had no problem, until I upgrade my router from a TP-Link (WIFI5) to a Linksys (WIFI6)

a. System environment:

Windows 10

b. Command:

I use nssm to run caddy.

d. My complete Caddyfile or JSON config:, {
    encode gzip
    route /radarr* {
    route /sonarr* {
    route /tautulli* {
    route /lidarr* {
    route /bazarr* {
    route /jackett* {
    route /petio* {
    root * C:\rclone\organizr
    rewrite /api/v2/* /api/v2/index.php?{query}
}, {
    encode gzip

3. The problem I’m having:

reverse proxies not working after changing to a new router.

4. Error messages and/or full log output:

it says connection timed out on Chrome

5. What I already tried:

I’ve already forwarded port 80 and 443 on my new router. It’s worth mentioning that after forwarding port 16709, my plex’s remote access is back to normal.

Something’s weird as I used to be able to browse these app locally using (my old router), but now it should supposedly change to but it no longer works for me. qBittorrent’s works just fine tho

Are you sure you have ports 80 and 443 forwarded to the right device?

What’s in Caddy’s logs? When you set up the NSSM service, you can configure it to write stderr output to file. Look for the contents at the end of that file.

I am positive that it’s forwarded to the correct device. I don’t have logs enable tho. I currently just run as argument, how do I enable logging?

My NSSM setup looks something like this:

.\nssm.exe install caddy C:\Users\lavof\Documents\caddy\caddy.exe
.\nssm.exe set caddy AppParameters "run --config Caddyfile --watch"
.\nssm.exe set caddy AppDirectory C:\Users\lavof\Documents\caddy
.\nssm.exe set caddy AppExit Default Restart
.\nssm.exe set caddy AppNoConsole 1
.\nssm.exe set caddy AppStdout C:\Users\lavof\Documents\caddy\stdout.log
.\nssm.exe set caddy AppStderr C:\Users\lavof\Documents\caddy\stderr.log
.\nssm.exe set caddy AppTimestampLog 1
.\nssm.exe set caddy Description "Caddy Server"
.\nssm.exe set caddy DisplayName Caddy
.\nssm.exe set caddy ObjectName LocalSystem
.\nssm.exe set caddy Start SERVICE_AUTO_START
.\nssm.exe set caddy Type SERVICE_INTERACTIVE_PROCESS

In particular, this line is what will allow you to retain logs:

.\nssm.exe set caddy AppStderr C:\Users\lavof\Documents\caddy\stderr.log

Also, make sure you don’t have any Windows Firewall rules blocking connections on port 80/443.

1 Like

Thank you, I now have my log now. I ran netsh firewall show state and it didn’t show port 80 and 443 as blocked.

The log:

2021/09/10 15:02:03.785	e[34mINFOe[0m	using adjacent Caddyfile
2021/09/10 15:02:03.787	e[33mWARNe[0m	input is not formatted with 'caddy fmt'	{"adapter": "caddyfile", "file": "Caddyfile", "line": 2}
2021/09/10 15:02:03.791	e[34mINFOe[0m	admin	admin endpoint started	{"address": "tcp/localhost:2019", "enforce_origin": false, "origins": ["[::1]:2019", "", "localhost:2019"]}
2021/09/10 15:02:03.791	e[34mINFOe[0m	tls.cache.maintenance	started background certificate maintenance	{"cache": "0xc0003a85b0"}
2021/09/10 15:02:03.792	e[34mINFOe[0m	http	server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS	{"server_name": "srv0", "https_port": 443}
2021/09/10 15:02:03.792	e[34mINFOe[0m	http	enabling automatic HTTP->HTTPS redirects	{"server_name": "srv0"}
2021/09/10 15:02:03.797	e[34mINFOe[0m	tls	cleaning storage unit	{"description": "FileStorage:C:\\Windows\\system32\\config\\systemprofile\\AppData\\Roaming\\Caddy"}
2021/09/10 15:02:03.797	e[34mINFOe[0m	http	enabling automatic TLS certificate management	{"domains": ["", "", "", ""]}
2021/09/10 15:02:03.801	e[34mINFOe[0m	tls	finished cleaning storage units
2021/09/10 15:02:03.806	e[34mINFOe[0m	autosaved config (load with --resume flag)	{"file": "C:\\Windows\\system32\\config\\systemprofile\\AppData\\Roaming\\Caddy\\autosave.json"}
2021/09/10 15:02:03.806	e[34mINFOe[0m	serving initial configuration

The logs look fine, that’s just Caddy’s startup messaging.

At this point, I think it’s clear it’s not an issue with Caddy, but with your networking setup and/or router.

I don’t really have much else to suggest at this point.

1 Like

yeah, they used to work with no problem! These all started when I changed my router :frowning: Even on my local network, I can’t connect to Sonarr/ Radarr when using devices rather than the computer that I installed them on…

I just used to check my ports. It seems that port 80 and 443 both returned connection timed out. Could this be the problem?

Yes, that is the issue, ultimately.

1 Like

I fixed it! It’s just that changing my router changed my network profile on Windows 10 from “Private” to “Public”. Once I changed it back, they are working normally again. I feel like such a fool lol.


Fascinating. Would not have thought of that one.

Thanks for following up, I’ll add it to my mental playbook in case someone comes with a similar issue :smile:

1 Like

Thank you for your help mate :slight_smile:

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.