Install a new module in Caddy 2

1. Caddy version (caddy version):


2. How I run Caddy:

I installed it like following

echo "deb [trusted=yes] /" \
    | sudo tee -a /etc/apt/sources.list.d/caddy-fury.list
sudo apt update -y
sudo apt install caddy -y

a. System environment:

Debian 10

b. Command:

service caddy start

3. The problem I’m having:

I used to use SSL like this {
 root * /home/admin/website

It works well, and now I need to use Cloudflare, but it doesn’t work. {
 tls {
  dns cloudflare api_token
 root * /home/admin/website

I googled and tried to use

curl | bash -s personal tls.dns.cloudflare

And restarted Caddy service, but it still doesn’t work. I think I may have installed this module in the wrong way.

How do I install a new module when caddy is already installed? I found this answer

Is the solution still the same? Thank you so much. does not exist anymore. That’s for Caddy v1.

Please refer to the docs:

Also, I recommend using the apt repo from Cloudsmith now, as per the docs. We’re transitioning away from the repo.

To continue getting updates to the support files from the apt repo, when using a custom build of Caddy, please follow these instructions:

1 Like

Thank you for the reply. It seems that I have to reinstall caddy, thank you so much.

This topic was automatically closed after 30 days. New replies are no longer allowed.