Skip to content

Compiling Teeworlds Server

by Finn Espen Gundersen on July 4th, 2012

This post was updated in December 2015 to account for clang in FreeBSD and the updated Teeworlds 0.6.3 (which contains an important server bugfix).

Teeworlds is a great game. It is free and runs on any platform, download it now.

You will soon want to run your own server to host your own matches and levels. If you have a FreeBSD server without X, this is not straightforward. The FreeBSD Teeworlds package is game (client) and server bundled in one, and the Teeworlds server sources are meant for Linux. Here is how:

First, make sure you have Python installed. Then, fetch and unzip the sources:

# fetch
# unzip
# rm
# fetch
# unzip
# rm

We need to remove the linux-ism before building. Edit bam-0.4.0/ to remove -ldl near the end of the last line.

# cd bam-0.4.0
# ee

Then build it:

# ./

It should build fine, now build the server itself:

# cd teeworlds-0.6.3-src
$ ../bam-0.4.0/bam server_release

If you get errors about mising g++, then install gcc48 (pkg install gcc48) and link gcc48 to gcc and g++48 to g++ in /usr/local/bin and retry. Likewise for python2.7 to python if necessary. You can now run the server:

./teeworlds_srv -f teeworlds.cfg

A sample teeworlds.cfg file:

sv_name “Underbuksepiratene”
sv_high_bandwidth 1
sv_register 1
sv_map dm7
sv_rcon_password “mypw”
sv_maprotation dm1 dm2 dm6 dm7 dm8 dm9
sv_rounds_per_map 2
sv_motd “Welcome! Anything goes.”
sv_gametype mod

If you just want to play locally set sv_register 0. If you want to make your server public make sure people can connect to it by UDP on port 8303.

Happy gaming!


From → FreeBSD

One Comment
  1. Hi, it doesent work. And i dont know whats missing.



    command not found – what is missing ?


    pi@raspberrypi4 ~/gameserver/teeworlds/bam-0.4.0 $ ./
    ./ 2: ./ clang: not found
    src/tools/txt2c: 1: src/tools/txt2c:ELF: not found
    src/tools/txt2c: 2: src/tools/txt2c: ▒: not found
    src/tools/txt2c: 1: src/tools/txt2c: : not found
    src/tools/txt2c: 1: src/tools/txt2c: @: not found
    src/tools/txt2c: 3: src/tools/txt2c: 8H: not found
    src/tools/txt2c: 4: src/tools/txt2c: ,: not found
    src/tools/txt2c: 5: src/tools/txt2c: @,: not found
    src/tools/txt2c: 1: src/tools/txt2c: : not found
    src/tools/txt2c: 6: src/tools/txt2c: @10615Q▒tR▒td▒▒/lib64/▒n-▒%▒
    ▒▒▒9▒P▒▒▒: not found
    src/tools/txt2c: 7: src/tools/txt2c: Syntax error: “(” unexpected
    ./ 4: ./ clang: not found

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS