Clean Installation of a New Version

I am running version 8.0.1 now. I would like to upgrade to 12.01 on a new server - OS freshly installed.

I exported the realms and users from 8.0.1, but 12.01 does not import the exported files. (I followed instructions here keycloak-documentation/export-import.adoc at master · keycloak/keycloak-documentation · GitHub)

I also tried to export (realms and groups) 8.0.1 via the web console. The 12.01 also does not take the exported files - internal server error.

What is the proper way to do an upgrade with a clean installation?