teeworlds logo
 

Set up a server

  • Configure firewall/nat/router to let though 8303 (or the port you want). The master server will warn if players can't connect. Check http://portforward.com for help on setting up your router.
  • Create a configuration for your server. Add the settings you want (each line in the config represents a setting).
  • Start the server by running "teeworlds_srv -f my_server_config.cfg"

FAQ

Q: How do I setup a LAN server?

Set sv_register to 0. This will make sure that it doesn't show up on the internet tab.

Q: Why doesn't my server show up in the server browser?

You have probably not setup your router correctly. See http://portforward.com for help.

Q: Why doesn't my 0.x.x-config work in 0.4.x?

The configuration file syntax has changed. Try replaceing all the = with space, and read this documentation.

Example configurations

Sample DM config

sv_name Teeworlds sample dm
sv_map dm1
sv_scorelimit 20
sv_timelimit 10
sv_gametype dm
sv_rcon_password remember
sv_motd Teeworlds sample dm configuration
sv_max_clients 12
sv_spectator_slots 10

Sample TDM config

sv_name Teeworlds sample tdm
sv_map dm6
sv_scorelimit 50
sv_gametype tdm
sv_rcon_password remember
sv_motd Teeworlds sample tdm configuration

Sample CTF config

sv_name Teeworlds sample ctf
sv_map ctf2
sv_scorelimit 400
sv_gametype ctf
sv_rcon_password remember
sv_motd Teeworlds sample ctf configuration

Server Settings Reference

Syntax: setting value

sv_name

This is the name of the server which will show up in the server browser. (default: unnamed server)

sv_map

The map that is chosen when starting the server. (default: dm1)

sv_maprotation

Used to specify multiple maps which rotates after the time or score limit is reached. (default: )

sv_warmup

Warmup time in seconds before the game starts. If it is set to 1 it will start immideatly. (default: 1)

sv_scorelimit

What score that should be reached to end the game. Don't forget to set this to zero if you want a timebased limit. (default: 20)

sv_timelimit

The time in minutes before the game ends. (default: 0)

sv_gametype

What gametype, could be dm, tdm or ctf. (default: dm)

sv_port

The server's binding port. (default: 8303)

sv_rounds_per_map

Set number of rounds. Map will be changed after last round ends. (default: 1)

sv_register

Whether the server should register on the masterserver or not (if on, it will show up in the server list). (default: 1)

sv_rcon_password

Password to access the remote control (rcon). (default: )

sv_motd

Message of the day, shows when joining the server and under the server info-tab. (default: )

sv_max_clients

Number of clients which can be on the server. This can't be changed without restart. (default: 12)

sv_spectator_slots

Number of all the slots that should be spectators. (default: 0)

sv_teambalance_time

The time in minutes after the teams are uneven to use auto balance. (default: 1)

sv_spamprotection

Turning on/off spam filter. (default: 1)

password

Password to join the server. (default: )

sv_tournament_mode

If this is on, player automatically join spectators when entering a server. (default: 0)

sv_teamdamage

If teammates will hurt each other or not. (default: 0)

sv_powerups

If this is off ninja is disabled. (default: 1)

sv_bindaddr

Address to bind to. (default: )

sv_external_port

What port the server reports to the master servers in cases of firewall rename/redirection rules. (default: 0)

sv_high_bandwidth

Doubles the snap rate, the game gets a bit more responsive but it requires more than doubled bandwidth. Only recommended for LAN-servers. (default: 0)

Server commands reference

kick

Syntax: kick id
Kicks the user with the specified id out of the server.

status

Syntax: status
Shows client stats and ids.

restart

Syntax: restart value
Null the score and starting warmup timer (depends on the value). If no value, then new round begins instantly.