Skip to content

feat: IPv6 support for standalone challenge config#1267

Merged
buchdag merged 2 commits into
nginx-proxy:mainfrom
JamBalaya56562:feat/standalone-ipv6
Jun 18, 2026
Merged

feat: IPv6 support for standalone challenge config#1267
buchdag merged 2 commits into
nginx-proxy:mainfrom
JamBalaya56562:feat/standalone-ipv6

Conversation

@JamBalaya56562

Copy link
Copy Markdown
Contributor

What

Add an ENABLE_IPV6 toggle that makes the standalone ACME HTTP-01 challenge configuration also listen over IPv6 (listen [::]:80;), in addition to IPv4.

Why

Standalone challenge configs are generated by acme-companion's add_standalone_configuration (not by docker-gen), and they only emitted listen 80;. On IPv6-only / dual-stack hosts the HTTP-01 challenge was therefore unreachable over IPv6, so validation failed.

This revives #710 (open since 2020), which @buchdag endorsed in-thread.

How

  • app/functions.shadd_standalone_configuration appends listen [::]:80; when ENABLE_IPV6 is truthy (gated via the existing parse_true helper). It is opt-in, so hosts without IPv6 are unaffected (nginx won't try to bind an IPv6 socket) — this addresses @buchdag's concern about enabling it by default.
  • The variable name matches nginx-proxy's own ENABLE_IPV6, so the same value can be set on both containers. (Of the two options discussed in the issue — auto-detecting nginx-proxy's setting vs. our own env var — this implements the env-var option, which is self-contained and deterministic.)
  • docs/Container-configuration.md — documents ENABLE_IPV6.
  • test/tests/standalone_ipv6/ — deterministic test asserting the IPv6 listener is present only when ENABLE_IPV6 is enabled; registered in test/config.sh and the CI matrix.

Only the standalone config is affected; challenges served through nginx-proxy already follow nginx-proxy's own IPv6 setting.

Testing

  • New standalone_ipv6 test passes: asserts listen [::]:80; is present with ENABLE_IPV6=true and absent when false/unset.
  • shellcheck clean on the modified script and the new test.

Closes #710

🤖 Generated with Claude Code

Standalone ACME HTTP challenge configs generated by add_standalone_configuration
only emitted `listen 80;`, so HTTP-01 validation failed on IPv6-only / dual-stack
hosts (nginx-proxy#710). Add a conditional `listen [::]:80;`, gated on a new ENABLE_IPV6
toggle (same variable name as nginx-proxy) so hosts without IPv6 are unaffected.

- app/functions.sh: append `listen [::]:80;` when parse_true ENABLE_IPV6.
- docs/Container-configuration.md: document ENABLE_IPV6.
- test/tests/standalone_ipv6: deterministic test asserting the IPv6 listener is
  present only when ENABLE_IPV6 is enabled; registered in test/config.sh + CI matrix.

Closes nginx-proxy#710

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@buchdag buchdag changed the title feat: IPv6 support for standalone challenge config (ENABLE_IPV6) (closes #710) feat: IPv6 support for standalone challenge config (ENABLE_IPV6) Jun 18, 2026
@buchdag buchdag changed the title feat: IPv6 support for standalone challenge config (ENABLE_IPV6) feat: IPv6 support for standalone challenge config Jun 18, 2026
Comment thread app/functions.sh Outdated
Drop the explanatory comment in add_standalone_configuration and trim the
standalone_ipv6 test header, per maintainer feedback on PR nginx-proxy#1267.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@buchdag buchdag requested a review from Copilot June 18, 2026 08:22
@buchdag buchdag added the type/feat PR for a new feature label Jun 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds opt-in IPv6 support for the standalone HTTP-01 challenge nginx config generated by add_standalone_configuration, addressing IPv6 validation failures on dual-stack / IPv6-reachable hosts (revives/addresses #710).

Changes:

  • Add ENABLE_IPV6 toggle to include listen [::]:80; in standalone challenge configs.
  • Document ENABLE_IPV6 in container configuration docs.
  • Add a deterministic integration test (standalone_ipv6) and register it in the test suite + CI matrix.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
app/functions.sh Conditionally appends an IPv6 listen directive to standalone HTTP-01 challenge server blocks when ENABLE_IPV6 is truthy.
docs/Container-configuration.md Documents the new ENABLE_IPV6 env var and clarifies scope/risks (standalone-only, opt-in).
test/tests/standalone_ipv6/run.sh New test that generates standalone configs under ENABLE_IPV6=true/false/unset and prints them for comparison.
test/tests/standalone_ipv6/expected-std-out.txt Expected output asserting IPv6 listener presence only when enabled.
test/config.sh Registers standalone_ipv6 in the global test list.
.github/workflows/test.yml Adds standalone_ipv6 to the GitHub Actions integration test matrix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@buchdag buchdag merged commit 8fd11bb into nginx-proxy:main Jun 18, 2026
87 of 88 checks passed
buchdag pushed a commit that referenced this pull request Jun 18, 2026
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@JamBalaya56562 JamBalaya56562 deleted the feat/standalone-ipv6 branch June 18, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/feat PR for a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to generate standalone certs with ipv6 enabled

3 participants