Running Caddy and Restreamer (Docker Container) without port conflicts

That’s not a valid Caddyfile. You need to tell Caddy to do something for that domain. Probably using the reverse_proxy directive.

I think you have a misunderstanding of how proxying works.

If you have a service already listening on port 8080, then you can’t run another program that tries to also listen on that port. Only one process can receive data in that port at any given time.

Caddy requires ports 80 and 443 to properly serve HTTP and HTTPS content (80 and 443 are the default ports for HTTP and HTTPS respectively) and to solve ACME challenges (i.e. prove to Let’s Encrypt that you own/control that domain, so they can trust your server and give it a signed certificate).

What you should do is have Caddy proxy requests it receives on port 443 to send them to your existing service on port 8080.

This would look like this:

waterfordweather.ddns.net {
	reverse_proxy localhost:8080
}

This article should probably clarify some points:

2 Likes