Tips for migrating from lighttpd to nginx

My DietPi installation is somewhat old and I went with the default webserver (lighttpd) back then, I wanna now migrate to nginx, which is the default web server for quite some time now.

I’m running:

  • pihole
  • vaultwarden
  • nextcloud

So what’s the way to do this as smooth as possible? Backup anything (configs and data), remove lighttpd, install nginx and then reinstall Pihole etc and restore my configs and data?
PiHole and Vaultvarden shouldn’t be big deal, PiHole as a built-in backup tool and it is not a lot of configs. I also just use a handfull of block lists.
Same goes for Vaultvarden, I will export my vault to make sure nothing gets lost and I can easily reimport it after a reinstallation (if necessary).
But the biggest challenge is nextcloud. I have a lot of data in there and I don’t want to copy everything again, so I would need to backup the database, or what is the way to go here?

has nothing to do with a web server, it’s an own app having own port and will work without a web server installed.

just removing lighttpd should not have a large impact, probably SSL need to be reactivated. And if you have revers proxy configuration, they would need to created freshly as Nginx has a different configs/syntax.

what do you plan to backup?

Ok then I think I already set up a reverse proxy for it, I can reach it via https://domain.tld/vault/.

I meant to say I will backup everything (not anything) with dietpi-backup.

yes dietpi-backup can be used in case you like to restore the whole system but it will not make any sense for Nginx to restore old web server configs.

Like the Vaultwarden proxy config. This would need to be created from scratch as Nginx syntax is different compare to lighttpd

I just make a complete backup for the case I screw up the migration.
So the question is still, what would be best pracvtice? Delete lighttpd, install nginx, reinstall nextcloud, pihole etc and also migrate my reverse proxys?
What about nextcloud when I reinstall, it creates a fresh installation or will it use the existing one?

Yes, should be possible using dietpi-software