Export live config

1. Caddy version (caddy version):

v2.4.6

2. How I run Caddy:

Based on a simple starting json config, and then amended via the admin API after that.

a. System environment:

Docker

b. Command:

caddy run -config /etc/caddy/caddyfile.json

c. Service/unit/compose file:

n/a

d. My complete Caddyfile or JSON config:

n/a

3. The problem I’m having:

I am configuring Caddy on the fly via the admin api (which is great). After configuring (adding/removing/reloading) is there any way to export the complete CURRENT configuration that is in use?

4. Error messages and/or full log output:

n/a

5. What I already tried:

n/a

6. Links to relevant resources:

Yes, with a GET /config/ request:

Or you can find the autosave.json in Caddy’s config storage location, which is written to on every config change as a backup (/config by default in Docker):

1 Like

Urgh! sorry I missed that… wood, trees etc :smiley:
Thanks again.

1 Like

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