Skip to content

ACME client and dns_opnsense.sh broken - "Invalid domain" #4964

@micah-quinn

Description

@micah-quinn

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

The ACME client in version 25.7.4 has a broken dns_opnsense.sh API hook. This breaks certificate renewal because the domain parser is incorrect and returns "invalid domain" for all valid domains. This was almost a very big deal for our organization because our customer facing certificates are 4 days away from expiring.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'Services' -> 'ACME Client' -> 'Certificates'
  2. Click on Issue or renew certificate'

Expected behavior

Certificate should renew, but instead "Last ACME Status" says "validation failed"

Describe alternatives you considered

I checked to make sure it wasn't my API token/key and that it wasn't specific to any one certificate. They are all failing.

Relevant log files

The ACME log file shows this as an example:

[Wed Oct  1 12:18:28 CDT 2025] h='cust.xyz.net'
[Wed Oct  1 12:18:28 CDT 2025] h='xyz.net'
[Wed Oct  1 12:18:28 CDT 2025] h='net'
[Wed Oct  1 12:18:28 CDT 2025] invalid domain
[Wed Oct  1 12:18:28 CDT 2025] Error adding TXT record to domain: _acme-challenge.cust.xyz.net
[Wed Oct  1 12:18:28 CDT 2025] _on_issue_err
[Wed Oct  1 12:18:28 CDT 2025] Please add '--debug' or '--log' to see more information.
[Wed Oct  1 12:18:28 CDT 2025] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh

Additional context

A fix is already noted on the ACME github: acmesh-official/acme.sh#6529

I've confirmed that in my case, replacing the dns_opnsense.sh in "/usr/local/share/examples/acme.sh/dnsapi/" fixes the issue. (BTW, is there any reason OPNsense's ACME client is using the "examples" directory instead of the "/usr/local/share/acme.sh/dnsapi" directory? This caused a lot of confusion for me as I was troubleshooting/debugging)

Environment

OPNsense 25.7.4 (amd64).

Metadata

Metadata

Assignees

Labels

upstreamThird party issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions