Even if you are able to connect to eachother just fine (if not, consult the networking setup, playing Quake cooperatively with friends is harder than it should be. At least if you do not want your own shots to hurt your buddies. But fear not, these simple instructions will help you.
Alternatively use the console or startup parameters or a config to set
- teamplay 1
- coop 1
- deathmatch 0
Be a team player!
If you do not want your own shots to hurt teammates you have to be in the same "team" and this is where it gets confusing. How to be on the same team depends on the technology you are using: NetQuake or QuakeWorld.
NetQuake differentiates this by the color of your pants. You can set your pants and upper body to a range of 14 different colors (0-13). To be on the same team means that you must set the same color for the pants for all players. You can either use the menu (Multiplayer → Setup) or the console ("color shirtcolor pantscolor", where shirtcolor is a number from 0 to 13 and pantscolor is the same, for example "color 0 4" for white shirt and red pants) to achieve that.
TLDR: All players need the same color for their pants: "color 0 0". The second number sets the pants color. Brown is not an option.
In QuakeWorld the model skin color does not matter. As a matter of fact, you can use all sorts of skins in QuakeWorld, check it out! To be in the same team you will have to set your team name. You can do so in the menu (usually in Multiplayer → Setup → "Your Team") or use the console ("team abc"). There is a limit of 32 characters so "QuaddictedComIsTheBestWebsiteEver" sadly does not fit.
TLDR: All players need the same team: "team coop"
You are done!
Try it by shooting people. If they scream then you are hurting them and should reconsider your options.
Be aware that you will still be able to telefrag eachother, so watch out.
Also sadly you will still hurt the player's armor. So even if you cannot kill eachother, try not to hit your friends.
And if you would like to play maps and mods that breaks Quake's old limits and standards with a dedicated server, prepare to fail miserably. You probably have the best chance to successfully player modern custom content (breaking old engine/server limits) with Darkplaces. But then that itself might happily break your map/mod. Some other engines support new network protocols that should handle these, for example Quakespasm has
sv_protocol 666. If you can, try to use an officially supported engine (check the maps' readme) and simply use the menu to setup a "listen server".
If you are getting a message like
IFNOT 4332(???) branch 23
client.qc : SelectSpawnPoint
client.qc : PutClientInServer
runaway loop error
Host_Error: Program error
you probably forgot "deathmatch 0".
Copy'n'paste ready commandlines
-dedicated +deathmatch 0 +coop 1 +teamplay 1
+record yourdemoname +connect yourserver +color 0 0