Upgrade from Caddy v1 to Caddy v2?

Hi,
has anything happened since I previously asked here?

Is there working caddyfile v1 adapter?

Can I have Caddy v1 binary replaced with Caddy v2 binary, with all current domains configured in Caddyfile in v1 format and all existing Let’s Encrypt certificates, and still working the same after upgrade?

WeKan still runs Caddy v1 on about 9000 servers.

I read something other Caddy v1 related here:

Upgrading Executable on the Fly | Hacker News

@mholt

We did this for Caddy 1 too 1. It was really cool. I am not sure how many people used this feature, so I haven’t implemented it for Caddy 2 yet, and in the ~two years that Caddy 2 has been released, I’ve only had the request once. It’s a bit tricky/tedious to do properly, but I’m willing to bring it over to Caddy 2 with a sufficient sponsorship.

For possible upgrade paths:

  1. If upgrading to Caddy v2, what code files in Caddy v2 branch I should change so that it’s compatible with Caddyfile v1 format, and have existing Let’s Encrypt certificates still working?

or alternatively:

  1. What files I should update in Caddy v1 branch so that Caddy v1 becomes up-to-date and will keep that in-place upgrade feature of caddy/upgrade.go at v1 · caddyserver/caddy · GitHub ?
1 Like

No one that I know of is writing a Caddy v1 config adapter.

No, because caddy 2 won’t accept the caddy 1 config format. For everything else, the upgrade can be done while preserving certificates with some effort.

I’m kind of amazed. :sweat_smile::sob:

Probably all of them (seriously), you would basically return to caddy 1. There is no using caddy 2’s features in place in the way that you’re describing without quite a bit of effort.

I have been contracted to do this kind of transition work for some companies with thousands of names. It involves writing a program to convert the certificates storage to the V2 structure. Let me know if you’d be interested in rates for that. I could also take care of converting the config to V2.

Well, there are no more updates for caddy v1, so there is no point in making caddy 1 continue to work for upgrades. Better to have that feature added to caddy 2 if you need it. I’m available for contracting this work (or through a sufficient sponsorship tier) in a few weeks probably.

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