Getting Caddy to work. All the guides assume you know what you’re doing and to me seem like they’re in a different language. That said, I managed to install it, create a Caddyfile and use DUCKDNS. I must be missing something.
2. Error messages and/or full log output:
I tried “$ journalctl -u caddy --no-pager | less +G`” but I’m so new to this that I doubt I’m putting that in the right place. It just returned “—END” with nothing else. The following is from Portainer:
INF ts=1993269853.4631933 msg=using provided configuration config_file=/etc/caddy/Caddyfile config_adapter=caddyfile
Error: adapting config using caddyfile: parsing caddyfile tokens for 'tls': /etc/caddy/Caddyfile:9 - Error during parsing: getting module named 'dns.providers.duckdns': module not registered: dns.providers.duckdns, import chain: ['']
3. Caddy version:
I tried to find out. I’m sorry I’m really new to this. But I just installed it a couple of days ago so, I’d assume a very new one.
I use Portainer because its user friendly. For DUCKDNS IP I went to my server command and typed "curl https://ifconfig.me" and used that as my IP. This is all I did. I did not do any kind of SSL stuff because I think Caddy does all that.
I used a Port forwarding checker online and it looks like I’ve successfully opened ports 443 and 69.
(I changed those numbers because default 80 seemed to be in use)
Does this mean I can’t use docker compose? Does “xcaddy build --with github.com/caddy-dns/duckdnss” do all I need? Does it install a plugin, recreate the whole container or does it just create a build that I need to install?
Is there a newbie guide I can follow? I’m sure the documentation must seem very simple, but for someone like me I got stumped at:
Got it working finally. Somethings I went through in case it helps anyone:
I was having DNS issues which gave me all the first errors.
Creating the custom build was a nightmare because I kept getting errors about this quic-go thing. Tried installing several different versions of Go. The second latest one was the one that worked. 1.20 I think.
Once you’ve finished using Xcaddy, that’s not the file you need to use for docker. You need to first turn that into a container (or something). ChatGPT was able to walk me through this step.
Eventually the build will be in some docker folder where it keeps all its images. So you don’t need to really point it to that file since it’ll know where to look. I used dockercompose like this:
I tried using “build” instead each step of the way, and it never seemed to work. Its a shame there’s no user friendly tutorial or video explaining all this. The documentation is all gibberish to beginners. ChatGPT was very annoying but eventually got me there.
We state the minimum Go versions we support. You need at least 1.20 or ideally the current latest 1.21.
If you used the builder Docker image like I suggested by writing a Dockerfile, you wouldn’t have had that problem because it ships with the latest Go version we support.
There’s thousands of guides and tutorials online about using a Dockerfile with Docker Compose. It’s an extremely basic task, and the information is there.
Even though I did lots of research, ended up getting everything sorted, I still have no idea what you mean by this. You said I should use a “build” command instead of “image”. But first, like you suggested, I needed to use Xcaddy which gave me errors because I installed the latest Go. I wouldn’t have started by installing an old version of Go. Anyways, I eventually found out that the older versions wouldn’t work but that I needed at least 1.20.
Then for the “build” command, I tried adding that to my compose and linking to where the file was. I looked up tutorials but everything was incredibly complicated and not exactly what I was doing.
There’s thousands of guides and tutorials online about using a Dockerfile with Docker Compose. It’s an extremely basic task, and the information is there.
I didn’t even know Xcaddy creates ‘dockerfiles’ (or maybe it doesn’t I still don’t know). I didn’t even know what to Google or if I was Googling the right thing. There’s also plenty of tutorials and guides on how to learn code and to program everything myself without Caddy.
While I really appreciate Caddy and think its great, it would’ve probably been faster for me to use NginX because there are a million tutorials on that and I’d just follow it step by step. Its like learning to use a manual transmission car with an instructor vs an automatic car with nothing but complex mechanic books.
I’m just giving the feedback of my experience that I’m sure many others are having. I’m truly very grateful for your help and couldn’t have done it without it.