How to update from 2.0 to 2.1

Hey all! Congrats on the new release.

I am wondering how one goes about upgrading Caddy 2.0 to 2.1.
Do I have to plan for downtime while I swap out the binary for the new one?

sudo cp caddy /bin/caddy
cp: cannot create regular file '/bin/caddy': Text file busy

Unfortunately, yes you’ll need to shut down your Caddy server and start it again with the new binary when upgrading versions. This is something we hope to be able to improve in a future version, making binary hotswaps functional.

As for that specific error message, this should answer your question:

Hmm, that error comes from Linux/Unix, not Caddy. I’ve seen it with scp before but not cp.

Thanks for getting back to me so promptly guys :slight_smile:
Yeah I figured that this would be the case. I kind of thought that there was some Golang magic for inplace upgrades.
I’ll schedule a downtime and then update the binary.

RE the error message: I was expecting that and just put it in here so folks who run the same command to update caddy will end up here :wink: trying to reduce dups

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