You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance README.md with Cloudflare API token creation instructions and orchestrated deployment examples
- Added a new section detailing how to create a Cloudflare API token, emphasizing security considerations.
- Included an example configuration for orchestrated deployments using Kubernetes, Docker Swarm, and GitHub Actions, improving usability for users deploying the Certbot container.
- Revised the description of the `CLOUDFLARE_API_TOKEN` environment variable to clarify its purpose and usage.
Copy file name to clipboardExpand all lines: README.md
+33-20Lines changed: 33 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,25 @@ The image is based on `certbot/dns-cloudflare:latest`, providing a stable and up
31
31
- Windows support (set `REPLACE_SYMLINKS` to `true`)
32
32
- Native Docker health checks to ensure the server is running
33
33
34
+
### Works great for orchestrated deployments
35
+
36
+
We designed this image to work great in orchestrated deployments like Kubernetes, Docker Swarm, or even in Github Actions. Look how simple the syntax is:
37
+
38
+
```yaml
39
+
certbot:
40
+
image: serversideup/certbot-dns-cloudflare
41
+
volumes:
42
+
- certbot_data:/etc/letsencrypt
43
+
environment:
44
+
CLOUDFLARE_API_TOKEN: "${CLOUDFLARE_API_TOKEN}"
45
+
CERTBOT_EMAIL: "${CERTBOT_EMAIL}"
46
+
CERTBOT_DOMAINS: "${CERTBOT_DOMAINS}"
47
+
CERTBOT_KEY_TYPE: "rsa"
48
+
49
+
volumes:
50
+
certbot_data:
51
+
```
52
+
34
53
## Environment Variables
35
54
36
55
The following environment variables can be used to customize the Certbot container:
@@ -40,13 +59,26 @@ The following environment variables can be used to customize the Certbot contain
40
59
| `CERTBOT_DOMAINS` | Comma-separated list of domains for which to obtain the certificate | - |
| `CERTBOT_KEY_TYPE` | Type of private key to generate | `ecdsa` |
43
-
|`CLOUDFLARE_API_TOKEN`| Cloudflare API token for DNS authentication | - |
62
+
| `CLOUDFLARE_API_TOKEN` | Cloudflare API token for DNS authentication (see below how to create one) | - |
44
63
| `DEBUG` | Enable debug mode (prints more information to the console) | `false` |
45
64
| `PUID` | The user ID to run certbot as | `0` |
46
65
| `PGID` | The group ID to run certbot as | `0` |
47
66
| `RENEWAL_INTERVAL` | Interval between certificate renewal checks. Set to `0` to disable renewals and only run once. | 43200 seconds (12 hours) |
48
67
| `REPLACE_SYMLINKS` | Replaces symlinks with direct copies of the files they reference (required for Windows) | `false` |
49
68
69
+
### Creating a Cloudflare API Token
70
+
71
+
> [!WARNING]
72
+
> Treat this token like a password. It will grant access to your Cloudflare account and can be used to modify DNS records.
73
+
74
+
1. Go to the [Cloudflare API Tokens](https://dash.cloudflare.com/profile/api-tokens) page.
75
+
2. Click on "Create Token".
76
+
3. Click "Use template" for the "Edit Zone DNS" template.
77
+
4. Change the token name (optional)
78
+
5. Set a specific zone under "Zone Resources" (optional)
79
+
6. Click on "Continue to summary".
80
+
7. Click on "Create Token".
81
+
50
82
## Usage
51
83
52
84
1. Pull the Docker image:
@@ -70,25 +102,6 @@ The following environment variables can be used to customize the Certbot contain
70
102
71
103
3. The container will automatically generate and renew the certificate.
72
104
73
-
### Works great for orchestrated deployments
74
-
75
-
We designed this image to work great in orchestrated deployments like Kubernetes, Docker Swarm, or even in Github Actions. Look how simple the syntax is:
76
-
77
-
```yaml
78
-
certbot:
79
-
image: serversideup/certbot-dns-cloudflare
80
-
volumes:
81
-
- certbot_data:/etc/letsencrypt
82
-
environment:
83
-
CLOUDFLARE_API_TOKEN: "${CLOUDFLARE_API_TOKEN}"
84
-
CERTBOT_EMAIL: "${CERTBOT_EMAIL}"
85
-
CERTBOT_DOMAINS: "${CERTBOT_DOMAINS}"
86
-
CERTBOT_KEY_TYPE: "rsa"
87
-
88
-
volumes:
89
-
certbot_data:
90
-
```
91
-
92
105
## Resources
93
106
94
107
- **[Discord](https://serversideup.net/discord)** for friendly support from the community and the team.
0 commit comments