1. The problem I’m having:
I have been attempting to setup caddy as instructed on the opnsense caddy tutorial website. I’ve setup the firewall rules and checked the right boxes when setting up my domain. However I must be missing something that I can’t figure out. My domain does not work at all once created and on the opnsense dashboard widget for Caddy Certificates it has the message “Caddy does not manage any automatic certificates”. I also get the following errors below:
2. Error messages and/or full log output:
2024-08-15T16:33:59-05:00 Informational caddy "info","ts":"2024-08-15T21:33:59Z","logger":"tls.issuance.acme.acme_client","msg":"trying to solve challenge","identifier":"opnsense-test.marquez.com","challenge_type":"http-01","ca":"https://acme.zerossl.com/v2/DV90"}
2024-08-15T16:33:58-05:00 Informational caddy "info","ts":"2024-08-15T21:33:58Z","logger":"tls.issuance.acme","msg":"using ACME account","account_id":"https://acme.zerossl.com/v2/DV90/account/by02PR_gu1hgQgLgVnwLCQ","account_contact":["mailto:example.com"]}
2024-08-15T16:33:58-05:00 Informational caddy "info","ts":"2024-08-15T21:33:58Z","logger":"tls.issuance.acme","msg":"done waiting on internal rate limiter","identifiers":["opnsense-test.marquez.com"],"ca":"https://acme.zerossl.com/v2/DV90","account":"example.com"}
2024-08-15T16:33:58-05:00 Informational caddy "info","ts":"2024-08-15T21:33:58Z","logger":"tls.issuance.acme","msg":"waiting on internal rate limiter","identifiers":["opnsense-test.marquez.com"],"ca":"https://acme.zerossl.com/v2/DV90","account":"example.com"}
2024-08-15T16:33:58-05:00 Error caddy "error","ts":"2024-08-15T21:33:58Z","logger":"tls.obtain","msg":"could not get certificate from issuer","identifier":"opnsense-test.marquez.com","issuer":"acme-v02.api.letsencrypt.org-directory","error":"HTTP 429 urn:ietf:params:acme:error:rateLimited - Error creating new order :: too many failed authorizations recently: see https://letsencrypt.org/docs/failed-validation-limit/"}
2024-08-15T16:33:57-05:00 Error caddy "error","ts":"2024-08-15T21:33:57Z","logger":"tls.issuance.acme.acme_client","msg":"validating authorization","identifier":"opnsense-test.marquez.com","problem":{"type":"urn:ietf:params:acme:error:unauthorized","title":"","detail":"Cannot negotiate ALPN protocol \"acme-tls/1\" for tls-alpn-01 challenge","instance":"","subproblems":[]},"order":"https://acme-v02.api.letsencrypt.org/acme/order/1893209516/296580698816","attempt":1,"max_attempts":3}
2024-08-15T16:33:57-05:00 Error caddy "error","ts":"2024-08-15T21:33:57Z","logger":"tls.issuance.acme.acme_client","msg":"challenge failed","identifier":"opnsense-test.marquez.com","challenge_type":"tls-alpn-01","problem":{"type":"urn:ietf:params:acme:error:unauthorized","title":"","detail":"Cannot negotiate ALPN protocol \"acme-tls/1\" for tls-alpn-01 challenge","instance":"","subproblems":[]}}
2024-08-15T16:33:57-05:00 Informational caddy "info","ts":"2024-08-15T21:33:57Z","logger":"tls.issuance.acme.acme_client","msg":"trying to solve challenge","identifier":"opnsense-test.marquez.com","challenge_type":"tls-alpn-01","ca":"https://acme-v02.api.letsencrypt.org/directory"}
2024-08-15T16:33:56-05:00 Informational caddy "info","ts":"2024-08-15T21:33:56Z","logger":"tls.issuance.acme","msg":"using ACME account","account_id":"https://acme-v02.api.letsencrypt.org/acme/acct/1893209516","account_contact":["mailto:example.com"]}
2024-08-15T16:33:56-05:00 Informational caddy "info","ts":"2024-08-15T21:33:56Z","logger":"tls.issuance.acme","msg":"done waiting on internal rate limiter","identifiers":["opnsense-test.marquez.com"],"ca":"https://acme-v02.api.letsencrypt.org/directory","account":"example.com"}
2024-08-15T16:33:56-05:00 Informational caddy "info","ts":"2024-08-15T21:33:56Z","logger":"tls.issuance.acme","msg":"waiting on internal rate limiter","identifiers":["opnsense-test.marquez.com"],"ca":"https://acme-v02.api.letsencrypt.org/directory","account":"example.com"}
2024-08-15T16:33:56-05:00 Informational caddy "info","ts":"2024-08-15T21:33:56Z","logger":"tls.obtain","msg":"obtaining certificate","identifier":"opnsense-test.marquez.com"}
2024-08-15T16:33:56-05:00 Informational caddy "info","ts":"2024-08-15T21:33:56Z","logger":"tls.obtain","msg":"lock acquired","identifier":"opnsense-test.marquez.com"}
2024-08-15T16:33:55-05:00 Error caddy "error","ts":"2024-08-15T21:33:55Z","logger":"tls","msg":"job failed","error":"opnsense-test.marquez.com: obtaining certificate: [opnsense-test.marquez.com] Obtain: [opnsense-test.marquez.com] solving challenges: [opnsense-test.marquez.com] context canceled (order=https://acme.zerossl.com/v2/DV90/order/IhwyzhrVcgql2EcQGWuRfA) (ca=https://acme.zerossl.com/v2/DV90)"}
2024-08-15T16:33:55-05:00 Informational caddy "info","ts":"2024-08-15T21:33:55Z","logger":"tls.obtain","msg":"releasing lock","identifier":"opnsense-test.marquez.com"}
2024-08-15T16:33:55-05:00 Error caddy "error","ts":"2024-08-15T21:33:55Z","logger":"tls.obtain","msg":"could not get certificate from issuer","identifier":"opnsense-test.marquez.com","issuer":"acme.zerossl.com-v2-DV90","error":"[opnsense-test.marquez.com] solving challenges: [opnsense-test.marquez.com] context canceled (order=https://acme.zerossl.com/v2/DV90/order/IhwyzhrVcgql2EcQGWuRfA) (ca=https://acme.zerossl.com/v2/DV90)"}
2024-08-15T16:33:55-05:00 Error caddy "error","ts":"2024-08-15T21:33:55Z","logger":"tls.issuance.acme.acme_client","msg":"deactivating authorization","identifier":"opnsense-test.marquez.com","authz":"https://acme.zerossl.com/v2/DV90/authz/Ye9T1I559USYfvRYNf8ROw","error":"attempt 1: https://acme.zerossl.com/v2/DV90/authz/Ye9T1I559USYfvRYNf8ROw: context canceled"}
2024-08-15T16:33:55-05:00 Error caddy "warn","ts":"2024-08-15T21:33:55Z","logger":"tls.issuance.acme.acme_client","msg":"HTTP request failed; retrying","url":"https://acme.zerossl.com/v2/DV90/authz/Ye9T1I559USYfvRYNf8ROw","error":"performing request: Post \"https://acme.zerossl.com/v2/DV90/authz/Ye9T1I559USYfvRYNf8ROw\": context canceled"}
2024-08-15T16:33:55-05:00 Informational caddy "info","ts":"2024-08-15T21:33:55Z","logger":"admin","msg":"stopped previous server","address":"unix//var/run/caddy/caddy.sock"}
2024-08-15T16:33:55-05:00 Informational caddy "info","ts":"2024-08-15T21:33:55Z","logger":"tls.obtain","msg":"acquiring lock","identifier":"opnsense-test.marquez.com"}
2024-08-15T16:33:55-05:00 Warning caddy "warn","ts":"2024-08-15T21:33:55Z","logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv1","http_port":80}
2024-08-15T16:33:55-05:00 Informational caddy "info","ts":"2024-08-15T21:33:55Z","logger":"http.auto_https","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
2024-08-15T16:33:55-05:00 Informational caddy "info","ts":"2024-08-15T21:33:55Z","logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}
2024-08-15T16:33:55-05:00 Informational caddy "info","ts":"2024-08-15T21:33:55Z","logger":"admin","msg":"admin endpoint started","address":"unix//var/run/caddy/caddy.sock","enforce_origin":false,"origins":["//::1","","//127.0.0.1"]}
2024-08-15T16:33:55-05:00 Informational caddy "info","ts":"2024-08-15T21:33:55Z","logger":"admin.api","msg":"received request","method":"POST","host":"127.0.0.1","uri":"/load","remote_ip":"","remote_port":"","headers":{"Accept-Encoding":["gzip"],"Cache-Control":["must-revalidate"],"Content-Length":["1382"],"Content-Type":["application/json"],"User-Agent":["Go-http-client/1.1"]}}
2024-08-15T16:33:55-05:00 Informational caddy "info","ts":"2024-08-15T21:33:55Z","logger":"tls.cache.maintenance","msg":"stopped background certificate maintenance","cache":"0x87043da80"}
2024-08-15T16:33:55-05:00 Warning caddy "warn","ts":"2024-08-15T21:33:55Z","logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv1","http_port":80}
2024-08-15T16:33:55-05:00 Informational caddy "info","ts":"2024-08-15T21:33:55Z","logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0x87043da80"}
2024-08-15T16:33:55-05:00 Informational caddy "info","ts":"2024-08-15T21:33:55Z","logger":"http.auto_https","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
2024-08-15T16:33:55-05:00 Informational caddy "info","ts":"2024-08-15T21:33:55Z","logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}
2024-08-15T16:10:34-05:00 Informational caddy "info","ts":"2024-08-15T21:10:34Z","logger":"tls.issuance.acme.acme_client","msg":"trying to solve challenge","identifier":"opnsense-test.marquez.com","challenge_type":"http-01","ca":"https://acme.zerossl.com/v2/DV90"}
2024-08-15T16:10:33-05:00 Informational caddy "info","ts":"2024-08-15T21:10:33Z","logger":"tls.issuance.acme","msg":"using ACME account","account_id":"https://acme.zerossl.com/v2/DV90/account/by02PR_gu1hgQgLgVnwLCQ","account_contact":["mailto:example.com"]}
2024-08-15T16:10:33-05:00 Informational caddy "info","ts":"2024-08-15T21:10:33Z","logger":"tls.issuance.acme","msg":"done waiting on internal rate limiter","identifiers":["opnsense-test.marquez.com"],"ca":"https://acme.zerossl.com/v2/DV90","account":"example.com"}
2024-08-15T16:10:33-05:00 Informational caddy "info","ts":"2024-08-15T21:10:33Z","logger":"tls.issuance.acme","msg":"waiting on internal rate limiter","identifiers":["opnsense-test.marquez.com"],"ca":"https://acme.zerossl.com/v2/DV90","account":"example.com"}
2024-08-15T16:10:33-05:00 Error caddy "error","ts":"2024-08-15T21:10:33Z","logger":"tls.obtain","msg":"could not get certificate from issuer","identifier":"opnsense-test.marquez.com","issuer":"acme-v02.api.letsencrypt.org-directory","error":"HTTP 403 urn:ietf:params:acme:error:unauthorized - Cannot negotiate ALPN protocol \"acme-tls/1\" for tls-alpn-01 challenge"}
2024-08-15T16:10:33-05:00 Error caddy "error","ts":"2024-08-15T21:10:33Z","logger":"tls.issuance.acme.acme_client","msg":"validating authorization","identifier":"opnsense-test.marquez.com","problem":{"type":"urn:ietf:params:acme:error:unauthorized","title":"","detail":"Cannot negotiate ALPN protocol \"acme-tls/1\" for tls-alpn-01 challenge","instance":"","subproblems":[]},"order":"https://acme-v02.api.letsencrypt.org/acme/order/1893209516/296576201246","attempt":2,"max_attempts":3}
2024-08-15T16:10:33-05:00 Error caddy "error","ts":"2024-08-15T21:10:33Z","logger":"tls.issuance.acme.acme_client","msg":"challenge failed","identifier":"opnsense-test.marquez.com","challenge_type":"tls-alpn-01","problem":{"type":"urn:ietf:params:acme:error:unauthorized","title":"","detail":"Cannot negotiate ALPN protocol \"acme-tls/1\" for tls-alpn-01 challenge","instance":"","subproblems":[]}}
2024-08-15T16:10:33-05:00 Informational caddy "info","ts":"2024-08-15T21:10:33Z","logger":"tls.issuance.acme.acme_client","msg":"trying to solve challenge","identifier":"opnsense-test.marquez.com","challenge_type":"tls-alpn-01","ca":"https://acme-v02.api.letsencrypt.org/directory"}
2024-08-15T16:10:32-05:00 Error caddy "error","ts":"2024-08-15T21:10:32Z","logger":"tls.issuance.acme.acme_client","msg":"validating authorization","identifier":"opnsense-test.marquez.com","problem":{"type":"urn:ietf:params:acme:error:unauthorized","title":"","detail":"216.40.34.37: Invalid response from http://opnsense-test.marquez.com/.well-known/acme-challenge/G2zVqTW4zbl1anHrbN1XeqF2DjGwVqweIfRdVZt8dg0: 404","instance":"","subproblems":[]},"order":"https://acme-v02.api.letsencrypt.org/acme/order/1893209516/296576195026","attempt":1,"max_attempts":3}
2024-08-15T16:10:32-05:00 Error caddy "error","ts":"2024-08-15T21:10:32Z","logger":"tls.issuance.acme.acme_client","msg":"challenge failed","identifier":"opnsense-test.marquez.com","challenge_type":"http-01","problem":{"type":"urn:ietf:params:acme:error:unauthorized","title":"","detail":"216.40.34.37: Invalid response from http://opnsense-test.marquez.com/.well-known/acme-challenge/G2zVqTW4zbl1anHrbN1XeqF2DjGwVqweIfRdVZt8dg0: 404","instance":"","subproblems":[]}}
3. Caddy version:
Caddy-os opn-plugin version - 1.6.2
CLI Version : v2.8.4 - h1:q3pe0wpBj1OcHFZ3n/1nl4V4bxBrYoSoab7rL9BMYNk=
4. How I installed and ran Caddy:
a. System environment:
Caddy Plugin running on OPNSense 24.7.1
OPNSense running on Proxmox 8.2.0 (running kernel: 6.8.12-1-pve)
b. Command:
installed via gui
c. Service/unit/compose file:
N/A
d. My complete Caddy config:
# DO NOT EDIT THIS FILE -- OPNsense auto-generated file
# caddy_user=root
# Global Options
{
log {
output net unixgram//var/run/caddy/log.sock {
}
format json {
time_format rfc3339
}
}
email info@example.com
grace_period 10s
import /usr/local/etc/caddy/caddy.d/*.global
}
# Reverse Proxy Configuration
# Reverse Proxy Domain: "1b074538-9c6b-4142-b05a-644f6671dec2"
opnsense-test.marquez.com {
handle {
reverse_proxy 192.168.100.3:8443 {
transport http {
tls_insecure_skip_verify
tls_server_name opnsense-test.marquez.com
}
}
}
}