What is the right way to make a server-client game?

I have expericence working on multiplayer games and I understand most basic concepts. We used Photon with p2p Host-client connection, so one “host” player was handling all the "server "game logic. Now I have a project with custom networking and a server set up on Java. It was fine passing calls to it but now I need to do AI and for it to be controlled by server, the server basically needs to know the game, the map, etc, I need a Unity Instance to do bot logic. I know there’s a Unity Dedicated server thing, but I never used it. Would that work with Java server, or would it have to replace it then? Do I need to use Unity Services to use dedicated server? Are there other solutions?