Backing up Caddy Configuration

What are the parts of Caddy Configuration that should be backed up? Of course, Caddyfile and the website content itself.

The docs mention that the “.caddy” folder should be backed up. How frequently does it change?

Anything else that should go into my backup script?

The .caddy folder holds Let’s Encrypt configurations and certificates, which is the reason you are advised to back up the folder.

Other than rate limit of Let’s Encrypt, the contents are nothing special. Caddy will regenerate the folder if required.

1 Like

Thanks, @abiosoft.

Related: I don’t plan to doing this right away, but hypothetically: if I had to install two Caddy nodes serving the same hosts, (say, with DNS based load balancing), is there a private key for LetsEncrypt that I need to sync between the nodes?

Not really, but beware that putting Caddy behind a load balancer can cause the challenges to fail. You’re better off using the DNS challenge in that case (so that the Let’s Encrypt server doesn’t have to contact yours), which Caddy will support in version 0.9.