Dedicated Server and Matchmaking, questions?

Hello,

I am very new to Unity but I managed to build a game with two players who can move and shoot over the network. Great so far.

But I am not sure how to setup matchmaking and dedicated servers. Here are some of my results I found with google.

First I need this

for the matchmaking and to have relay servers. So far so good. If I would have this then I am able to find players over the internet who can play together without firewall issues.

But even with this service I need a dedicated server because the game still runs on the client.
I dont want that the server is on the clients side because of cheating. As I understand Unity Mutiplayer Service does not fix this issue for me.

So then I think I would need some more servers. I would rent some vServers with Linux and would run the game/build in batchmode on the linux server. When batchmode is detected the game would create a game session.

Is this a good structure how a multyplayer server setup could look in Unity? Is my idea good or complete garbage?

You are right; you cannot use the matchmaking facilities provided by UNET with a dedicated, authoritative server setup, as they are specifically designed around Unity Services and player-hosted games.

There is an official server library in the works, but a release date and the exact set of features it will provide are still unknown. In the meantime, you can use UNET to write your own custom matchmaking system via the low-level API; this is what I do in Master Server Kit. The idea is to have a master server in charge (which you can think of as a lobby); once players are connected to it, they can create new games or join existing ones. The master server is responsible for dynamically spawning and destroying game server instances (which you can think of as rooms) as appropriate. Functionally, this is pretty similar to the matchmaking provided by Unity Services but running on a dedicated server setup instead.