Replacing self signed certificate

1. Caddy version (caddy version):2.4.2

2. How I run Caddy:

a. System environment:

b. Command:

Paste command here.

c. Service/unit/compose file:

Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.

d. My complete Caddyfile or JSON config:caddyfit

Paste config here, replacing this text.
No configuration yet.

3. The problem I’m having →

My issue is I need to confirm ssl configuration t for replacing replacing.self signed ssl certificate with

A SSL certificate signed by a certificate Authority the following guide I was planing to follow
Caddy - SSL Certificate Installation I’ve searched the caddy forum and could find anything in reference to what I need to do you might say I don’t need or should require replacing self signed certificate but I’m working on another problem I’m trying to resolve my requirements are suggested to me by rocket rocket support team base on the errors I’m r receiving using the replications your help or assistance is greatly appreciated if you require any further information I’m more than happy to assist

4. Error messages and/or full log output:

5. What I already tried:

6. Links to relevant resources:

Ok, so you want Caddy to use certificates that you’re providing? i.e. not generate its own? Is that right?

Yes one signed by a CA having issues using default certificate so I’ve purchased a certificate now I want to use it

Easy enough:

tls cert.pem key.pem

Put that in your Caddyfile, but obviously use the correct paths to your certificate and key. Here are the docs: tls (Caddyfile directive) — Caddy Documentation

Yes that is correct can you help me out? Please I can’t find much information about this subject

It’s unclear what you don’t understand. Did you read the documentation Matt linked?

It’s not really clear what you’re trying to do and why. The information you’ve shared across the multiple forum topics are pretty scattered so it’s hard to follow.

I think it would be much more efficient if you fully fill out the help topic template – you omitted multiple sections above which are relevant to us understanding what you want to do.

There’s also no need to make new topic for each new question you have, you can continue discussion in just the one.

It’s not that I’m unclear the fact is I am having issues using the default ssl certificate that caddy generated I’ve been informed my rocket-chat support to resolve my problems I’m experiencing I have to use a signed certificate from a Certificate Authority CA is this not clear to you so I’ve purchased a signed certificate now I want to install the certificate I’m not sure how else I’m ment to explain it

Hey @Cinimod,

The link Matt gave you above (in this post: takes you to Caddy documentation that addresses the questions you’re asking.

Specifically, we understand that you have acquired your own HTTPS certificate and are asking how to configure Caddy to use that certificate.

The way to do that is via the tls directive, which Matt linked above.

1 Like

I’m Legally blind if I miss something I apologise I will try harder next time

That’s correct can you help ?

We don’t understand what you don’t understand, because you haven’t told us what you’re stuck on. We’ve given you links to the documentation that should explain everything you need to know. Have you read the docs? What did you not understand from them?

It feels like you might be missing entire sections of our replies because your replies make it sound like you haven’t read them at all. We’re putting effort here, but it feels like we’re not making any progress.

I know what I want I’ve read mot the information that I was pointed towards its recommendation was to use an acme client if I was going to do that I might as well setup let’s encrypt the documents I was pointed to doesn’t really tell me how to configure caddyfile to use my certificate just want something easy to follow thanks for taking the time out of your day to deal with me it’s greatly appreciated

The link to the tls directive docs specifically describes how to configure Caddy to use your own certificate and key. That’s what we’ve been trying to point you to. As Matt said, in your Caddyfile it would look like this, where the “.pem” are paths to files, the first one being the certificate, and the second being the private key:

tls cert.pem key.pem

I appreciate all your assistance as I’m Legally blind I find somethings very difficult to do specially when it comes to reading I have to get a computer to talk it to me can be very tedious at times thanks for the tip all I can do is go over it again hopefully finding what I need like I said I appreciate you time and assistance the caddy Comunity has been very helpful and Generous towards helping me with my queries thanks again

I’ve looked through all documentation and couldn’t find what you’re referring to could you just provide what I need to put in the caddyfile I have the certificate and the private kyjust need to know what configuration I have to put in the caddyfile would you mind just provide what I need to put in the caddyfile I would deeply sincerely appreciate your assistance I would not mind paying you for your service just give me a PayPal email and let me know how much it would require you to provide me with information
Just keep In mind my inflictions I suffer with

I’m really confused. We did tell you what to put in the Caddyfile, multiple times. It’s literally the word “tls” all lowercase, followed by a space, then the path to the certificate file, followed by a space, then the path to the private key file.

I really don’t know how else to spell it out for you.

I really do appreciate all your assistance I somehow get the following you’re a bit pissed at me based on your post to my topics thanks for spelling ssl certificate configuration so my caddy file should look like this

tls cert key.pem

Now I have about using a private key I’m a little lost on that topic if it’s not the case all that’s required to use my own ssl certificate is one line of code which is the following please understand I have to listen to everything on a website or emails I have 2% tunnel vision a question
So it took me a little bit longer to pick your instructions up I’m very apologetic if I frustrated you!! Normally takes me little longer to pick things up given my vision and 2 major acquired brain injuries of suffered
Like I said I’m very grateful for you time and patience in dealing with me has a good day


Hey @Cinimod,

So far I think the biggest issue for us trying to help has been trying to figure out exactly what you’re having trouble with.

You mention being a little lost about whether that one line of code is all that’s required. I’ll try to rephrase and clarify what needs to be done.

You said earlier that you have already purchased a signed certificate. When you completed the purchase, they should have let you download a certificate file and a private key file. If you don’t have these files, you can’t proceed.

If you do have those two files, you need to save them to some location on your server. Then you need to use the tls directive to tell Caddy where you saved those files.

Once you’ve done this, next time you run Caddy, it should make use of the certificate you purchased.

If you have trouble at any point doing the above, let us know exactly where you’re stalled and why, and we might be able to direct you better.

1 Like

Stuffed up my last reply so isi g my own ssl certificate caddy configuration should look something like this
tls etc/ssl/mykey.pem /path to private key? Now I think I’ve got it right

Big thanks for all your help and assistance you’ve been a real trooper for the caddy Comunity
Try having a great day
Dominic rauert

I’ve gone over documentation again it doesn’t say what format the private key has to be in would you be able with to let me know I would greatly appreciate it thanks for all your help thus far