💾 Archived View for tilde.pink › ~nagi › posts › fast-fng-server.gmi captured on 2023-07-22 at 17:30:54. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-06-14)

-=-=-=-=-=-=-

Teeworlds FNG server

Archived - Fast deployment of a teeworlds fng server using Docker.

Teeworlds - Docker - Server

By Théo Bori, edited 2022-09-23

~

⚠️ Archived - check <a href="/post/tw">Teeworlds CLI</a>

I've been playing **Teeworlds / DDnet** since at least 2014 and my favorite mode to ever play was FNG. I wanted to be able to create a server quickly if needed, so I made a Docker image and some Python that deploys a server in one command line.

Docker image

FROM alpine:latest

# Working/server directory name
ENV DIRNAME fng2

# Install dependencies to build binaries
RUN apk update && apk --update add --no-cache --virtual .build-dependencies git \
  cmake \
  make \
  gcc \
  g++ \
  alpine-sdk \
  sdl2 \
  sdl2-dev \
  python3 \
  freeglut \
  freeglut-dev \
  glew-dev \
  glm-dev

# Symlink python
RUN ln -sf python3 /usr/bin/python

# Cloning the repository
RUN apk --update --no-cache add build-base && \
  git clone https://github.com/Jupeyy/teeworlds-fng2-mod.git --branch fng_06 $DIRNAME

# Building
RUN cd $DIRNAME && \
  mkdir build && \
  cd build && \
  cmake .. && \
  make -j16 && \
  cp -r * .. && cd ..

WORKDIR $DIRNAME

ENTRYPOINT [ "sh", "start.sh" ]

Deployment

The server is compatible with **0.6** and **0.7** Teeworlds version. By default, it uses **fng.cfg** as configuration file.

The **UDP** port opened on the container will be the value of **sv_port** in this file.

*Source*

For help

python3 run.py -h

If you never build, run:

python3 run.py build image_name

Else you can directly execute the script with **run** as action

python3 run.py run image_name