Lint the Caddy configuration

Hi all,

We’re well on our way to dropping apache across the board and using Caddy with PHP-FPM. One of the useful things in Apache is the ability to lint the config before restarting the server, e.g. apache2ctl configtest.

Is there a similar tool for Caddy? I have had a search but nothing is coming up.


  • Bob -
1 Like

I was going to suggest caddy -validate, which purportedly checks that the Caddyfile is valid and then exits…

However, it actually just starts the Caddy server on my mac (version 0.11.0). That probably shouldn’t be the case, right @matt?

Works for me:

Are you sure? :-/

Fairly sure.


Dumb question, but do you have a Caddyfile in that folder?

No. Here’s what happens when I run caddy -validate in a folder with a Caddyfile:


… that’s really weird. I can’t explain it :man_shrugging:

I just re-downloaded 0.11.0 with no plugins, seems to be validating instead of starting now. Seems to imply one of the plugins I was using was interfering.

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