Skip to content

feat: standalone certificates for containers without VIRTUAL_HOST - #1294

Open
JamBalaya56562 wants to merge 1 commit into
nginx-proxy:mainfrom
JamBalaya56562:feat/container-standalone-certs
Open

feat: standalone certificates for containers without VIRTUAL_HOST#1294
JamBalaya56562 wants to merge 1 commit into
nginx-proxy:mainfrom
JamBalaya56562:feat/container-standalone-certs

Conversation

@JamBalaya56562

Copy link
Copy Markdown
Contributor

Implements the feature proposed in #1128 (standalone certificates from LETSENCRYPT_HOST alone, e.g. for an SMTP container that is not proxied), using the approach suggested there: the template now detects containers without VIRTUAL_HOST / VIRTUAL_HOST_MULTIPORTS instead of routing every certificate through add_standalone_configuration, so proxied certificates keep the exact same code path and two-container setups without a shared /etc/nginx/conf.d are unaffected.

  • letsencrypt_service_data.tmpl renders a new ACME_STANDALONE_CONTAINERS array listing the identifiers (SAN and single-domain forms) of containers that have an ACME_HOST / LETSENCRYPT_HOST but no VIRTUAL_HOST / VIRTUAL_HOST_MULTIPORTS.
  • update_certs runs those identifiers through the existing standalone challenge configuration pre-pass (shared with letsencrypt_user_data certificates); the post-issuance conf removal and cleanup paths are unchanged.
  • Since the identifiers are real container IDs, LETSENCRYPT_RESTART_CONTAINER works for these certificates, which the letsencrypt_user_data route couldn't offer.
  • New standalone_container integration test: a LETSENCRYPT_HOST-only container gets its certificate through the standalone flow, and a proxied container is never classified as standalone.
  • Documented in docs/Standalone-certificates.md.

Verified locally by rendering the template with docker-gen against dummy containers (SAN, single-domain, VIRTUAL_HOST and VIRTUAL_HOST_MULTIPORTS variants): only the containers without a virtual host are listed in ACME_STANDALONE_CONTAINERS.

Supersedes #1128 if accepted — credit to @pini-gh for the original proposal.

🤖 Generated with Claude Code

@JamBalaya56562
JamBalaya56562 force-pushed the feat/container-standalone-certs branch from 7de4d8d to 038d7e7 Compare July 17, 2026 22:59
@JamBalaya56562
JamBalaya56562 force-pushed the feat/container-standalone-certs branch from 038d7e7 to 6080ed1 Compare August 8, 2026 22:51
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@JamBalaya56562
JamBalaya56562 force-pushed the feat/container-standalone-certs branch from 6080ed1 to 14be7a8 Compare August 22, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant