How to keep accounts and data for a new Nextcloud installation

I have Nextcloud Hub 22 installed in unprivileged LXC. The data directory is mounted on another physical ZFS SSD. Everything works great for me. I currently have a single administrator account.
My idea is this:
When I destroy the LXC, the data directory will remain on the mounted disk with the data.
Then I install the new LXC and start installing Nextcloud Hub 22. The installer will report that
Username is invalid because files already exist for this user.
How do I solve this problem. I want to install a new nextcloud, and I want user data and accounts to be preserved.

User account information is stored in the database, which in your case most likely was installed in the same LXC container as your Nextcloud. If you want to preseve your database you have to backup your database before you destroy the LXC container. Or you could use separate containers for Nextcloud and database.