Is it free to set up a server and whatnot and making a multiplayer game in Unity? I just want to know if I will be needing to spend money on anything before I get into networking.

For example, to just have me and a friend move cubes around through networking, is that free? Or do I have to buy a server or something.

It the game is a comercial game, you need to pay a license.

But if you generate only for fun, its free.