Setting up domain results in unable to connect

Hi all
I’m trying to setup caddy on Digital Ocean using docker with help of this tutorial

Everything works fine until I get to the part with adding the domain to Caddyfile.
Before this step, I was using IP address with a port to connect.
After adding the domain to Caddyfile I’m getting unable to connect in my browser no matter if I’m using IP address or domain.
However, if I change the docker command proposed in the tutorial to
docker run --name caddy -p 80:2015 abiosoft/cadd
I’m able to connect to the website.

I’m using Ubuntu 18.04 and firefox and there are no firewalls in place.


Hi @huginn, welcome to the Caddy community.

Can you post the Caddyfile you’re using right now, as well as the output of Caddy inside the container?

As in the tutorial my Caddyfile contains only domain name so in my case.

I have run container one more time, from what I can see logs are different now. Sadly I didn’t thought about saving previous logs.
You can check logs from the container here

Caddy’s trying to solve the challenge for LetsEncrypt to retrieve a certificate.

LetsEncrypt resolved to an IP address - the same IP address I’m resolving it to locally - but was refused connection.

If you’re not running a firewall right now, and the IP address is correct, a refused connection probably means that no programs are listening on the port LetsEncrypt used to connect (443).

You’ll need to make sure ports 80 and 443 reach Caddy (i.e. -p 80:80 -p 443:443), then run it again.

Can you post the server log?

caddy -log c:\logfile.log

@tobya, they’re using abiosoft/caddy, which logs to container by default. Check their pastebin link for process logs.

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