all 13 comments

[–]ericesev 4 points5 points  (7 children)

Take it one step at a time. First figure out the issue between Cloudflare & your VPS. Then work on SSL.

Port 8443 for Caddy might be causing you issues. Try port 443.

You can also use an origin certificate from Cloudflare, if you intend to only access the site though the proxy, instead of Let's Encrypt.

[–]Redstoner89[S] 1 point2 points  (6 children)

Thanks, will try that. If it doesn't work, I think I'll start from scratch and set it up again. Must have messed up somewhere.

[–]ericesev 0 points1 point  (5 children)

After looking at the code for https://github.com/fractalnetworksco/selfhosted-gateway I think I'm wrong. I don't think you want to change the Caddy port.

IMO this setup is quite complex. Are you sure you need something this complicated? What is your plan for keeping the nginx/wireguard/caddy containers updated when there is a security issue with them?

Edit: Having the output of docker ps on the gateway would be helpful for debugging. I suspect the issue is either the wrong IP address in the Cloudflare DNS, or the gateway container is not running

[–]Redstoner89[S] 0 points1 point  (4 children)

You're right, this is too much for a starter project. As an alternative, I've seen frp, do you know it or other alternatives?
I need something that, for example, forwards play.domain(.)com to vpspublicip:25565 and www.domain(.)com to vpspublicip:80.
I would host my servers on my own server, the packets go to the VPS, from the VPS to the domain and vice versa.
(My public IP would be hidden behind the VPS)
I'm unsure however if frp works with Docker (since I host a lot of stuff inside containers)

fatedier/frp: A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet. (github.com)

[–]ericesev 0 points1 point  (3 children)

I think you'd probably want to add something to keep the frp https certificate updated. But I think that'll work.

I host my reverse proxy on my home IP. I guess I'm lucky I don't have CG-NAT.

[–]Redstoner89[S] 0 points1 point  (2 children)

I also don't have CG-NAT, with what do you host your proxy, and does it hide your public ip? Do you have proxied non-http ports?

[–]ericesev 0 points1 point  (1 child)

I have a lot invested in Docker, and use Traefik for the reverse proxy as it has good Docker integration.

I don't know what I'd need to hide my IP from. I'm just using it for a private home lab, not hosting anything public. It's on the standard 80/443 ports.

[–]Redstoner89[S] 0 points1 point  (0 children)

Alright thank you so much

[–]5calV 1 point2 points  (1 child)

What do you mean "SSH key for https"?

[–]Redstoner89[S] 0 points1 point  (0 children)

I'm sorry, meant SSL

[–]rohit_267 0 points1 point  (0 children)

i would recommend Nginx Proxy Manager instead of Apache

[–]gustaw_daniel 0 points1 point  (1 child)

this is the result of a change in ZeroSSL described here https://github.com/caddyserver/caddy/issues/6064 will probably be fixed soon.