DefaultLocation of caddy file

1. Caddy version (2.4.2):

2. How I run Caddy:

<!-caddy hosted on a vps running Ubuntu 20.4.0LTS ! →

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:

Paste config here, replacing this text.
Use `caddy fmt` to make it readable.
DO NOT REDACT anything except credentials.
Make sure the backticks stay on their own lines.

3. The problem I’m having:

<!it was brought to my attention what my default caddy file contains and I couldn’t answer the question cause I could never find it I now want to know what’s in it as I just ended up creating my own caddy file but I have not told caddy to use it yet so my problem is can anyone tell me where I would find the default caddy configuration file your assistance will be greatly appreciated →

4. Error messages and/or full log output:

5. What I already tried:

6. Links to relevant resources:

Caddy itself doesn’t have a default configuration file. But depending on you install it, there might be one. How did you install it?

Hi that explains why I could never find one caddy was installed when I installed rocket chat-server it’s rocket chats default preceded web server rocket chat was installed via snap

Hey @Cinimod,

It looks like the Rocket Chat team have their own way of managing Caddy for their application when you install via Snap.

As best I can tell, you’ll need to follow their documentation over here: Auto SSL with Snaps - Rocket.Chat Docs

Since you’re relying on their software to configure Caddy, we’re not going to be able to provide much help over here. You’ll be much better off getting help from Rocket Chat directly.

Caddy was installed when I installed via snap

So for the certificate key would look something like
/etc/ssl/mykey.pemIn the caddy file this is all I can work out from the documentation with the private key I’m confused about what it should look like maybe I’ve missed some other configuration needed in the caddyfile

Thanks for the Rocket chat document but that’s the exact guide I used to I natal Rocket chat but thanks for your efforts

That guide you used has a section in it that tells you exactly how (and where) to configure Caddy.

From the article:

In case you plan to use another https proxy or you prefer other options in Caddy configuration, you can disable caddy:

sudo snap set rocketchat-server caddy=disable

Then, edit the Caddyfile found at /var/snap/rocketchat-server/current/Caddyfile and write your configuration.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.