I have Lemmy running on my homelab behind Cloudflare, though I'm using a reverse proxy setup. I made some minor modifications to the provided docker-compose.yml
to get everything working with my existing reverse proxy setup.
As for backups, I want to say so long as you back up the postgres database and import the backup on your new server you should be good. I believe there's a section in the Lemmy docs on how exactly to do that process.