英文:
certbot/dns-cloudflare for authentik
问题
我恰好在Cloudflare DNS上运行一个域,我想要在authentik部署中使用。根据相应的文档,似乎可以很容易地使用certbot获取ACME/letsencrypt证书。
我在docker-compose.override.yml中修改了示例代码片段,如下所示:
root@debian-2gb-nbg1-1:~# cat docker-compose.override.yml
version: "3.4"
services:
certbot:
image: docker.io/certbot/dns-cloudflare:latest
volumes:
- ./certs/:/etc/letsencrypt
# Variables depending on DNS Plugin
environment:
CLOUDFLARE_API_TOKEN: <redacted>
command:
- certonly
- --non-interactive
- --agree-tos
- --dns-cloudflare
# - --dns-cloudflare-credentials cloudflare.ini
- -m <redacted>
- -d <redacted>
- -v
在运行```docker-compose up -d```之后,certbot立即退出。令我困惑的部分是,日志文件显示:
```certbot: error: unrecognized arguments: --dns-cloudflare-credentials cloudflare.ini```
而certbot-dns-cloudflare的[文档][1]表示,这是一个必需的参数。
我错过了什么?
英文:
I happen to run a domain on Cloudflare DNS that I want to use for an authentik deployment. From the corresponding documentation it seems to be rather straight forward to use certbot to get ACME/letsencrypt certificates.
I modified the example snippet in docker-compose.override.yml to the following:
root@debian-2gb-nbg1-1:~# cat docker-compose.override.yml
version: "3.4"
services:
certbot:
image: docker.io/certbot/dns-cloudflare:latest
volumes:
- ./certs/:/etc/letsencrypt
# Variables depending on DNS Plugin
environment:
CLOUDFLARE_API_TOKEN: <redacted>
command:
- certonly
- --non-interactive
- --agree-tos
- --dns-cloudflare
# - --dns-cloudflare-credentials cloudflare.ini
- -m <redacted>
- -d <redacted>
- -v
certbot immediately exits after running docker-compose up -d
The confusing part to me is, the log files says:
certbot: error: unrecognized arguments: --dns-cloudflare-credentials cloudflare.ini
Whereas the documentation for certbot-dns-cloudflare says, this is a required argument.
What am I missing?
答案1
得分: 1
这对我有用,
version: '3.4'
services:
server:
ports:
- "0.0.0.0:80:9000"
- "0.0.0.0:443:9443"
certbot:
image: certbot/dns-cloudflare
volumes:
- ./certs/:/etc/letsencrypt
- /srv/authentik/cloudflare.ini:/srv/authentik/cloudflare.ini
command: certonly --non-interactive --dns-cloudflare --dns-cloudflare-credentials /srv/authentik/cloudflare.ini --agree-tos -d authentik.example.com --server https://acme-v02.api.letsencrypt.org/directory
英文:
This worked for me,
version: '3.4'
services:
server:
ports:
- "0.0.0.0:80:9000"
- "0.0.0.0:443:9443"
certbot:
image: certbot/dns-cloudflare
volumes:
- ./certs/:/etc/letsencrypt
- /srv/authentik/cloudflare.ini:/srv/authentik/cloudflare.ini
command: certonly --non-interactive --dns-cloudflare --dns-cloudflare-credentials /srv/authentik/cloudflare.ini --agree-tos -d authentik.example.com --server https://acme-v02.api.letsencrypt.org/directory
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论