One site 2 domains and 2 themes

Good day. Is it possible to set a specific theme depending on which domain you are visiting.
Two domains lead to the server

When you switch to, the logo is displayed and the color of the registration is blue for
When switching to, the logo is displayed and the border color is gray for
But in fact they are the same server

Only with 2 instances of Nextcloud

But then it turns out that there will be 2 file storages and the user will have to go into different instances to place files there?

No, because the instances can share the files to each other or both can use the same external storage