Ignore/Delete This Thread

(Caddy Hello) #1

Solved, will post a new thread/tutorial.

(Matthew Fay) #2

tls: failed to find any PEM data in certificate input comes from golang’s built in crypto/tls.

There are some checks there to make sure the data is formatted correctly.

I understand it needs to take the format:


etc. for the certificate chain, and for the key:


Some similar issues have floated around, such as this one for traefik (which has similar certificate management capabilities to Caddy), where the user had a malformed file (missing a single dash in the END PRIVATE RSA KEY line!):

(Caddy Hello) #3

That was the issue! My cat command didn’t break the END/BEGIN lines. Thank you for the suggestion. Now I have a different problem …

caddy[445]: 2017/10/31 09:21:01 [INFO] Successfully loaded TLS assets from /etc/ssl/caddy/[domain].pem and /etc/ssl/caddy/[domain].key.pem
caddy[445]: 2017/10/31 09:21:01 [NOTICE] There is already a certificate loaded for [domain].com, so certificate for [[domain].com www.[domain].com] will not service that name
caddy[445]: 2017/10/31 09:21:01 [NOTICE] There is already a certificate loaded for www.[domain].com, so certificate for [www.[domain].com] will not service that name

I edited my systemd file to remove -agree=“true” and restarted, but to no effect. Caddy continues to download a cert into /etc/ssl/caddy/ocsp/

(Matt Holt) #4

The OCSP staple is not a certificate. :wink:

The notices are there because it looks like there are multiple certificates being loaded…

(Caddy Hello) #5

Solved, will post a new thread/tutorial.

(Matthew Fay) #6

Could you post your full Caddyfile? Might help us explain exactly what Caddy is doing.

(Caddy Hello) #7

Solved, will post a new thread/tutorial.

(Matthew Fay) #8

Automatic HTTPS should definitely be off, so Caddy won’t be doing ACME unless there are other sites in the Caddyfile. Do you have any left-over ACME certificates maybe from before you provided your own?

Which cert is provided by Caddy when you browse to your site?

(Matthew Fay) #10

Hmm, the [NOTICE] messages earlier aren’t indicative of a blocking error, as far as I know… If Caddy is exiting, the answer is very likely to be in the process log.

Do you get the same result running the ExecStart command manually from shell?

(Matt Holt) #11

Have you tried stopping Caddy entirely and restarting it? Does the NOTICE still appear then?

(Matthew Fay) #13

Well, there really is nothing useful there… Caddy just exits.

See if you can either implicate or rule out systemd by running the ExecStart from shell. You’ll be getting stdout directly from Caddy, so if it just dies, and there’s still nothing… It’s probably time to put this on the Github issue tracker.

(Matt Holt) #16

So how did you solve the problem? (It could be useful for others encountering a similar issue.)

(Toby Allen) #17

This is a really weird thing to do to delete your posts from a forum!

(system) #18

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.