I keep local backups of everything, so restoring the files is trivial. In the git repo, I have instructions on how to set things up: what packages to install, where to place certain config files and what to put in them. You could use containers to make it even easier, but I haven’t found the need for it yet.
Oh god, imagine having to give birth every day for the rest of eternity.