Caddy Server, Cloudflare, Windows 2016

I am trying to host OMBI website externally using HTTPS with Let’s Encrypt certificate, I am also using Cloudflare for dynamic dns and Caddy server for Windows.
I have Cloudflare all setup properly and have port forward the 80 and 443 ports and setup an inbound rule as well.

I think my issue lies within my caddyfile, but I may be wrong as I am new to using caddyfile and basically this whole process. I am sharing my caddy file to see if what i am doing is wrong and I could really use some pointers here. I have tried different type of configurations and have successfully create a certificate, but I am not able to redirect the domain name to my server., {
	proxy / localhost:5000 {
	    tls {
        dns cloudflare

When I launch it I get this

Activating privacy features… done.

I get a Error 522 ## Connection timed out error that indicates the host.
If anyone has been successful with using the environment I mentioned I would be very grateful for any assistance.

Is there any reason why you put “websocket” in the caddyfile ?
If you just proxy http(s) it should not be needed.

anyway, the syntax for websocket is different, see

No real reason, just trying different things based on what I am reading online hoping it would help.

Have you been able to get this working in an environment as I described?

I’m not using cloudflare, but I do use caddy as reverse proxy.

In my caddy file there is no “transparent”, nor “websocket”.
I think the “transparent” is harmless, but why don’t you try without the “websocket”.

I tried it both ways and no luck.

Anyone else have any suggestions, I can’t be the only one that has tried to run Caddy server using Cloudflare on Windows 2106 server. I really could use the help if you have any experience with this or have it working in your environment.

Try making it as simple as possible and remove the proxy, just set root and have a basic html file if you get this caddy is working. Then you can try to get the proxy working correctly {
  root c:\websites\site1\
  log \ c:\websites\accesslog.log {common}

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.