Skip to content
This repository was archived by the owner on Dec 30, 2025. It is now read-only.

Commit bc84ea6

Browse files
committed
docs(makefile, README.md, cloudflare-credentials.ini.template, ssl-manager.sh): update instructions for Cloudflare API token usage
Update the Makefile, README.md, and related scripts to reflect the transition from using Cloudflare API keys to API tokens. This change improves security by using more granular permissions with API tokens. The instructions now guide users to create a token with specific permissions and update the credentials file accordingly. The cloudflare-credentials.ini.template is also updated to reflect this change, removing the email and API key fields in favor of the API token.
1 parent 8a40c4f commit bc84ea6

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,10 @@ help-ssl:
374374
@echo " ssl-status - Check certificate status"
375375
@echo ""
376376
@echo "Quick Start:"
377-
@echo " make ssl-setup # Initial certificate setup"
378-
@echo " make ssl-status # Check certificate status"
379-
@echo " make ssl-renew # Renew certificates"
377+
@echo " 1. Copy cloudflare-credentials.ini.template to cloudflare-credentials.ini"
378+
@echo " 2. Add your Cloudflare API token to cloudflare-credentials.ini"
379+
@echo " 3. make ssl-setup # Initial certificate setup"
380+
@echo " 4. make ssl-status # Check certificate status"
380381

381382
# Docker operations
382383
docker-build:
@@ -487,7 +488,7 @@ ssl-setup: ## Setup SSL certificates (one-time setup)
487488
@echo -e "$(PURPLE)=== SSL Certificate Setup ===$(NC)"
488489
@echo -e "$(BLUE)[INFO]$(NC) Make sure cloudflare-credentials.ini is configured first!"
489490
@echo -e "$(BLUE)[INFO]$(NC) Copy cloudflare-credentials.ini.template to cloudflare-credentials.ini"
490-
@echo -e "$(BLUE)[INFO]$(NC) and fill in your Cloudflare credentials."
491+
@echo -e "$(BLUE)[INFO]$(NC) and add your Cloudflare API token."
491492
@echo
492493
@./scripts/ssl-manager.sh issue
493494

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,9 @@ The setup includes **simplified SSL/TLS certificate management**:
188188

189189
### **Quick Setup**
190190
```bash
191-
# 1. Configure Cloudflare credentials
191+
# 1. Configure Cloudflare API token
192192
cp cloudflare-credentials.ini.template cloudflare-credentials.ini
193+
# Edit cloudflare-credentials.ini and add your API token
193194
chmod 600 cloudflare-credentials.ini
194195

195196
# 2. Set environment variables
@@ -230,11 +231,12 @@ make ssl-renew # Renew certificates
230231
make ssl-status # Check certificate status
231232
```
232233

233-
### 📋 **Prerequisites (Both Approaches)**
234+
### 📋 **Prerequisites**
234235

235-
1. **Cloudflare Account** with DNS hosting
236+
1. **Cloudflare Account** with DNS hosting for your domain
236237
2. **API Token** from https://dash.cloudflare.com/profile/api-tokens
237-
- Required permission: `Zone:DNS:Edit` for your domain
238+
- Create a token with **Zone:DNS:Edit** permissions for your domain
239+
- Copy the token and paste it into `cloudflare-credentials.ini`
238240
3. **Domain Configuration** pointing to your server
239241

240242
### ⚙️ **Environment Variables**

cloudflare-credentials.ini.template

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
# Copy this to cloudflare-credentials.ini and fill in your actual credentials
33
# Then run: chmod 600 cloudflare-credentials.ini
44

5-
# Your Cloudflare email address
6-
dns_cloudflare_email = [email protected]
7-
8-
# Your Cloudflare API key (get this from https://dash.cloudflare.com/profile/api-tokens)
5+
# Your Cloudflare API token (get this from https://dash.cloudflare.com/profile/api-tokens)
96
# Create a token with Zone:DNS:Edit permissions for your domain
10-
dns_cloudflare_api_key = your-api-key-here
7+
dns_cloudflare_api_token = your-api-token-here

scripts/ssl-manager.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ check_prerequisites() {
4444
# Check if credentials file exists
4545
if [[ ! -f "$CREDENTIALS_FILE" ]]; then
4646
log_error "Cloudflare credentials file not found: $CREDENTIALS_FILE"
47-
log_info "Copy cloudflare-credentials.ini.template to cloudflare-credentials.ini and fill in your credentials"
47+
log_info "Copy cloudflare-credentials.ini.template to cloudflare-credentials.ini and add your API token"
4848
exit 1
4949
fi
5050

0 commit comments

Comments
 (0)