certbot / certbot

Certbot is EFF's tool to obtain certs from Let's Encrypt and (optionally) auto-enable HTTPS on your server. It can also act as a client for any other CA that uses the ACME protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker dns-cloudflare image fails to recognize the --dns-cloudflare-credentials parameters

dnwk opened this issue · comments

If you're having trouble using Certbot and aren't sure you've found a bug or
request for a new feature, please first try asking for help at
https://community.letsencrypt.org/. There is a much larger community there of
people familiar with the project who will be able to more quickly answer your
questions.

My operating system is (include version):

Ubuntu 22.04

I installed Certbot with (snap, OS package manager, pip, certbot-auto, etc):

Docker image: certbot/dns-cloudflare

I ran this command and it produced this output:

This is in the docker compose yml

docker-compose.override.yml

version: "3.2"

services:
    certbot:
        image: certbot/dns-cloudflare:latest
        volumes:
        - ./certs/:/etc/letsencrypt
        - /opt/cloudflare:/opt/authentik-dockerized/cloudflare
        command:
            - certonly
            - --non-interactive
            - --dns-cloudflare
            - --dns-cloudflare-credentials /opt/cloudflare/credentials
            - --agree-tos
            - -m email
            - -d domain

Certbot's behavior differed from what I expected because:

It generated this error
certbot: error: unrecognized arguments: --dns-cloudflare-credentials /opt/cloudflare/credentials

Here is a Certbot log showing the issue (if available):

Logs are str/log/letsencrypt` by default. Feel free to redact domains, e-mail and IP addresses as you see fit.

certbot: error: unrecognized arguments: --dns-cloudflare-credentials /opt/cloudflare/credentials

I think this is probably due to the way you split up the arguments in the docker-compose.yml. Try putting --dns-cloudflare-credentials and /opt/cloudflare/credentials on one line each.

In a shell this would work normally by splitting by whitespace, but docker-compose doesn't work that way.

I'm going to close this, but let me know if that wasn't the solution.