Use Caddy without Let's Encrypt?

I am trying to run Caddy without internet access so I would like to disable Let’s Encrypt support.

If my Caddyfile specifies localhost or an IP address Caddy seems to serve pages fine without using Let’s Encrypt. If I specify a hostname’s FQDN then it errors out.

The error is, "error creating client: get directory at ‘’: failed to get … x509: certificate has expired or is not yet valid

How do I disable Let’s Encrypt so I can use Caddy without internet access?

You can turn it off a few different ways:

  • Add tls off to your CaddyFile. {
    tls off
  • Explicitly specify http:// for the vhost {


If you’re not using a vhost you can simply put tls off in your Caddyfile.


1 Like

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