Create separate Unity project for headless server

I want to create a headless server that handles my multiplayer game. This will be more a proof-of-concept project, but basically I just want to have multiple players (lets say 3) to move a box around. So every player can move the box at the same time (imagine a football being moved around by multiple players).

Now I’m wondering how I should structure my code. I was thinking to have a separate project for the server, which I can run headless on a linux server, and another project for the game itself. All the server does is pass messages around where the box currently is and who moved it.

I’m new to Unity, so not sure if this is wise. Or should I put the server as a separate scene in the same project? Or a different approach altogether?

I do the headless server approach, but I use Visual Studio to create a non-unity project. To do this, though, you need to have your networked data classes built out of an external code project, and then import it into both the Unity client project, and the non-unity server project. If you’re running your own networking code, this seems to work pretty well, but it takes a lot of effort to get it up and running. Unity built-in networking is designed for a game client to also host as server, so that didn’t really work for me.