Skip to content

Commit 93b66d8

Browse files
committed
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.
1 parent fc4f4a2 commit 93b66d8

File tree

1 file changed

+33
-20
lines changed

1 file changed

+33
-20
lines changed

README.md

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,25 @@ The image is based on `certbot/dns-cloudflare:latest`, providing a stable and up
3131
- Windows support (set `REPLACE_SYMLINKS` to `true`)
3232
- Native Docker health checks to ensure the server is running
3333

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+
3453
## Environment Variables
3554
3655
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
4059
| `CERTBOT_DOMAINS` | Comma-separated list of domains for which to obtain the certificate | - |
4160
| `CERTBOT_EMAIL` | Email address for Let's Encrypt notifications | - |
4261
| `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) | - |
4463
| `DEBUG` | Enable debug mode (prints more information to the console) | `false` |
4564
| `PUID` | The user ID to run certbot as | `0` |
4665
| `PGID` | The group ID to run certbot as | `0` |
4766
| `RENEWAL_INTERVAL` | Interval between certificate renewal checks. Set to `0` to disable renewals and only run once. | 43200 seconds (12 hours) |
4867
| `REPLACE_SYMLINKS` | Replaces symlinks with direct copies of the files they reference (required for Windows) | `false` |
4968

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+
5082
## Usage
5183

5284
1. Pull the Docker image:
@@ -70,25 +102,6 @@ The following environment variables can be used to customize the Certbot contain
70102

71103
3. The container will automatically generate and renew the certificate.
72104

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-
92105
## Resources
93106

94107
- **[Discord](https://serversideup.net/discord)** for friendly support from the community and the team.

0 commit comments

Comments
 (0)