User Tools

Site Tools


multiplayer:running_a_server
 
 Shell

Running a multiplayer server

A multiplayer server is an instance of doomsday-server running as a background process.

This page focuses on starting and running a server via the command line. For a GUI approach, see Running a server using the Shell.

How to set up a server

Requirements

  • Both client and server should have the same WAD file. For instance: the identification number for doom2.wad v1.9 is f36acb. While the game will 'work' with differing wad files, differences in geometry can have players spawning outside the map or in walls etc.

autoexec.cfg

Best thing to do is to set up a .cfg file where you set all the suitable console variables for the server. Things you will need…

  • autoexec.cfg (create yourself) and put the customized cvars from below into it.
  • TCP port 13209 “open” — to find out how to open your ports see http://portforward.com/

In the “autoexec.cfg” put the lines below:

net-ip-port 13209
server-game-deathmatch 1
server-game-nomonsters 1
server-name "Dew's Deathmatch game!"
server-info "Come join my game"
server-player-limit 8
server-public 1
setmap 1 1

Note: server-public 1 makes the server visible to all on the master server.

Possible cvars for the .cfg file

To find all variables and commands containing the word “server”, you can use the command:

apropos server

Below is a brief list of supported variables:

server-game-jump = 1
server-game-map = 0
server-game-mapcycle = "T:10 12* 11 17 18 19"
server-game-mapcycle-noexit = 1
server-game-mod-damage = 1
server-game-mod-gravity = -1
server-game-mod-health = 1
server-game-monster-meleeattack-nomaxz = 0
server-game-nobfg = 0
server-game-nomonsters = 1
server-game-noteamdamage = 0
server-game-radiusattack-nomaxz = 0
server-game-respawn = 0
server-game-respawn-monsters-nightmare = 1
server-game-skill = 3
server-info = "come join my game"
server-latencies = 0
server-name = "Example's deathmatch game"
server-password = ""
server-player-limit = 6
server-public = 1

net-dev = 0
net-ip-address = ""
net-ip-port = 13209
net-master-address = "www.dengine.net"
net-master-path = "/master.php"
net-master-port = 13209
net-name = ""
net-nosleep = 0
net-queue-show = 0

game-fastmonsters = 0

On the desktop

The best way to run a server on your desktop is to use the shell. You can specify the location of your autoexec.cfg using the command line option:

-p some/path/autoexec.cfg

In a terminal / command line

doomsday-server is intended to be run as a background process and has no UI of its own. While you can start it manually in a terminal, controlling the server is only possible using the Shell.

In Unix, please refer to the manual page doomsday-server(6) for more information.

Brief instructions:

  1. Specifying a game is mandatory (with -game).
  2. Configure the TCP (net-ip-port) port number. The default port number is 13209.
    • This step has to be done only once because the port numbers are saved automatically into the game config file. You may also wish to write your own .cfg startup script that executes all the necessary commands.
  3. The current map can be changed with setmap (in autoexec.cfg).

Example:

doomsday-server -game doom2 -iwad ~/games/doom/DOOM2.WAD \
    -file ~/games/doom/dwango5.wad -p ~/.doomsday/conf/autoexec.cfg

Docker

If you're using Docker, you may prefer hosting a Doomsday server in a container. For more information, see: ecliptik/doomsday (GitHub).

Automatic map cycling

Set up a mapcycle:

server-game-mapcycle "T:10 1* 11 17 18 19"

See map cycling for a description of the syntax.

Start the cycle:

startcycle

Stop the cycle:

endcycle

See also

  • doomsday-host: Unix script for running dedicated servers in the background
multiplayer/running_a_server.txt · Last modified: 2018-12-16 12:13 by skyjake