0

How to integrate Buypass with Caddyfile?

Hello,

I tried to search web and found this solution https://www.ookangzheng.com/setup-caddy-server-with-buypass-go-ssl-a-norwegian-caa-provider/, but it doesn't work in my case.

Here is the three configs I tried:

{
    acme_ca https://api.buypass.com/acme/directory
    email <your-email@email.com>
#   key_type rsa2048
}

and

tls  {
 issuer acme {
     email  hi@example.dev
     dir      https://api.buypass.com/acme/directory
             }
     }

and

tls hi@example.dev {
    ca https://api.buypass.com/acme/directory
    }

all of them resulted in this when I run 

journalctl -xeu caddy

Output:

Mar 31 04:52:26 server-wwjcwe caddy[11588]: {"level":"info","ts":1743396746.4343975,"msg":"panic: certificate worker: runtime error: invalid memory address or nil pointer dereference\ngoroutine 37 [running]:\ngithub.com/caddyserver/certmagic.(*jobManager).worker.func1()\n\tgithub.com/caddyserver/certmagic@v0.21.6/async.go:58 +0x65\npanic({0x16bd960?, 0x29c0c20?})\n\truntime/panic.go:785 +0x132\ngithub.com/mholt/acmez/v3/acme.(*Client).GetRenewalInfo(0xc0005d8000, {0x1daa088, 0xc0001d8d50}, 0xc0004b4688)\n\tgithub.com/mholt/acmez/v3@v3.0.0/acme/ari.go:221 +0xf9c\ngithub.com/mholt/acmez/v3/acme.(*Client).GetCertificateChain.func1({0xc0001c7e00, 0x2d})\n\tgithub.com/mholt/acmez/v3@v3.0.0/acme/certificate.go:121 +0x338\ngithub.com/mholt/acmez/v3/acme.(*Client).GetCertificateChain(0xc0005d8000, {0x1daa088, 0xc0001d8d50}, {{0xc0003213a0, 0x5}, {0xc0005d4110, 0x1, 0x1}, 0x1, {0x0, ...}, ...}, ...)\n\tgithub.com/mholt/acmez/v3@v3.0.0/acme/certificate.go:151 +0x11c\ngithub.com/mholt/acmez/v3.(*Client).ObtainCertificate(0xc0005d40b0, {0x1daa088, 0xc0001d8d50}, {{{0xc0003213a0, 0x5}, {0xc0005d4110, 0x1, 0x1}, 0x1, {0x0, ...}, ...}, ...})\n\tgithub.com/mholt/acmez/v3@v3.0.0/client.go:197 +0x1199\ngithub.com/caddyserver/certmagic.(*ACMEIssuer).doIssue(0xc00061a8c0, {0x1daa088, 0xc0001d8d50}, 0xc000768c88, 0x0)\n\tgithub.com/caddyserver/certmagic@v0.21.6/acmeissuer.go:477 +0x668\ngithub.com/caddyserver/certmagic.(*ACMEIssuer).Issue(0xc00061a8c0, {0x1daa088, 0xc0001d8d50}, 0xc000768c88)\n\tgithub.com/caddyserver/certmagic@v0.21.6/acmeissuer.go:371 +0xa7\ngithub.com/caddyserver/caddy/v2/modules/caddytls.(*ACMEIssuer).Issue(0x29c6fa0?, {0x1daa088?, 0xc0001d8d50?}, 0xc0005d4090?)\n\tgithub.com/caddyserver/caddy/v2@v2.9.1/modules/caddytls/acmeissuer.go:249 +0x25\ngithub.com/caddyserver/certmagic.(*Config).obtainCert.func2({0x1daa088, 0xc0001d8d50})\n\tgithub.com/caddyserver/certmagic@v0.21.6/config.go:626 +0xc98\ngithub.com/caddyserver/certmagic.doWithRetry({0x1daa0c0, 0xc000544cd0}, 0xc0005df300, 0xc0008df998)\n\tgithub.com/caddyserver/certmagic@v0.21.6/async.go:104 +0x218\ngithub.com/caddyserver/certmagic.(*Config).obtainCert(0xc000646b60, {0x1daa0c0, 0xc000544cd0}, {0xc0005c4810, 0x13}, 0x0)\n\tgithub.com/caddyserver/certmagic@v0.21.6/config.go:700 +0x718\ngithub.com/caddyserver/certmagic.(*Config).ObtainCertAsync(...)\n\tgithub.com/caddyserver/certmagic@v0.21.6/config.go:505\ngithub.com/caddyserver/certmagic.(*Config).manageOne.func1()\n\tgithub.com/caddyserver/certmagic@v0.21.6/config.go:415 +0x73\ngithub.com/caddyserver/certmagic.(*jobManager).worker(0x29e5800)\n\tgithub.com/caddyserver/certmagic@v0.21.6/async.go:73 +0x11b\ncreated by github.com/caddyserver/certmagic.(*jobManager).Submit in goroutine 1\n\tgithub.com/caddyserver/certmagic@v0.21.6/async.go:50 +0x279"}

Therefore, I have to use certbot to manually obtain my certificate, and let caddy read it.

Any workaround? Much appreciation!

Best regards,

Yayoi

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi. I can`t see any specific issue from that error message. I would recommend you to check/ask the caddy community.

    Like
Like Follow
  • yesterdayLast active
  • 2Replies
  • 14Views
  • 2 Following

Buypass Official Community

This is the official community of Buypass.  A Root CA located in Norway.

Sign-up using free email domains have been blocked due to increased spam. https://community.forumbee.com/t/63zsyt/blocked-email-domains