I got failed to decode PEM block containing private key

i got this problem

1. The problem I’m having:

2. Error messages and/or full log output:

Error: loading initial config: loading new config: loading http app module: provision http: loading pki app module: provision pki: provisioning CA ‘local’: decoding intermediate key: failed to decode PEM block containing private key

3. Caddy version:


Learn how to configure the Mercure.rocks Hub on Mercure.rocks: Real-time APIs Made Easy

order mercure after encode




{$SERVER_NAME:localhost} {
log {
format filter {
# Defaults to console while waiting for logging: Automatic `wrap` default for `filter` encoder by francislavoie · Pull Request #5980 · caddyserver/caddy · GitHub
wrap console
fields {
uri query {
replace authorization REDACTED

encode zstd gzip

mercure {
	# Transport to use (default to Bolt)
	transport_url {$MERCURE_TRANSPORT_URL:bolt://mercure.db}
	# Publisher JWT key
	# Subscriber JWT key
	# Permissive configuration for the development environment
	cors_origins *
	publish_origins *
	# Extra directives


redir / /.well-known/mercure/ui/

respond /healthz 200
respond /robots.txt `User-agent: *

Disallow: /`
respond “Not Found” 404