Changing my installation (subdirectory to subdomain) : What about the Link sharing?

Hello from France !

I’m preparing the migration of my own nextcloud server and I want to change from a subdirectory installation (domain.fr/nextcloud) to a subdomain one (nextcloud.domain.fr).

What would happen to my existing share link ?
Is there a way to modifiy then automatically ?

Many thanks for your help !