Add optional JSON-based storage for dns_acmedns (alternative to multi-account comma-separated mode PR #2196) #6622
+59
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Title
Add optional JSON-based storage for dns_acmedns (alternative to multi-account comma-separated mode PR #2196)
PR Description
Summary
This PR adds optional JSON-based storage support to the dns_acmedns plugin. A new variable,
ACMEDNS_STORAGE, allows storing acme-dns account data (username, password, subdomain, server_url, fulldomain) in a JSON file. This enables clean handling of multiple acme-dns registrations without comma-separated lists.The default behaviour (per-domain credential storage) remains unchanged.
Relation to PR #2196 (olee)
PR #2196 introduces multi-account support using comma-separated environment variables. This PR offers an alternative approach using structured JSON storage. Both approaches can coexist; this PR simply adds another option.
JSON Storage Format
The JSON file follows the same format used by other acme-dns clients (e.g., Certbot’s acme-dns plugin), ensuring easy migration and consistency.
{ "example.com": { "server_url": "https://auth.acme-dns.io", "username": "user1", "password": "secret1", "subdomain": "0a1b2c3d", "fulldomain": "0a1b2c3d.auth.acme-dns.io" }, "another.domain.com": { "server_url": "https://auth.internal.example", "username": "user2", "password": "secret2", "subdomain": "f4e5d6c7", "fulldomain": "f4e5d6c7.auth.internal.example" } }Features
ACMEDNS_STORAGE.Motivation
Users who manage many domains often also manage multiple acme-dns accounts. JSON storage provides a structured, scalable way to store these registrations in a single file, without relying on comma-separated lists or re-registration.
Compatibility
Note
This PR and the accompanying code were created with the assistance of ChatGPT, and all changes have been successfully tested in a live environment.