Skip to content
Platform status
Servergilde
Docs · Setup

Install the agent on FreeBSD and Linux

This guide shows how to install the agent, check the service and uninstall it. You need about ten minutes and root access to your server once.

Updated November 12, 2026 · 6 min read

Note: The panel shows the commands with the exact address of the platform and your code. Use those values.

1. Check the requirements

  • FreeBSD 12 or newer, or Debian 11 and newer or Ubuntu 22.04 and newer
  • root access over SSH for the installation
  • Python 3. If it is missing, the script installs it with pkg or apt.
  • outgoing connections to the address of the platform, which is shown next to the code in the panel
  • about 50 MB of free space

To see which system you run, use freebsd-version on FreeBSD and cat /etc/os-release on Linux. Check the Python version like this:

# python3 --version

2. Get the code in the panel

Sign in to the panel, choose Server verbinden (connect server), give the server a name and choose your game. The panel shows a code in the format ABCD-EFGH and the two commands for your system. The code is valid for 24 hours and can be used once.

3. Download and read the script

Download the script as a file first so you can read it before you run it. On FreeBSD:

# fetch -o serverwerk-install.sh https://servergilde.com/agent/install.sh # less serverwerk-install.sh

On Linux:

# curl -fsSLo serverwerk-install.sh https://servergilde.com/agent/install.sh # less serverwerk-install.sh

The script does the following:

  • checks the system and Python 3 and installs Python after asking you
  • downloads the agent program and checks its SHA-256 checksum
  • copies the program to /usr/local/libexec/serverwerk/ (FreeBSD) or /opt/serverwerk-agent/ (Linux)
  • creates the configuration at /usr/local/etc/serverwerk/agent.conf or /etc/serverwerk/agent.conf (mode 600)
  • sets up the service, starts it and exchanges the code for the server's own key

4. Install the agent

Run the script with your code. The command is the same on both systems:

# sh serverwerk-install.sh --url https://servergilde.com --code ABCD-EFGH

The output looks roughly like this (the messages are in German for now):

Python gefunden: /usr/local/bin/python3 Agent geladen, Prüfsumme stimmt Angemeldet. Server-ID 7 Dienst serverwerk_agent eingerichtet und gestartet Fertig. Der erste Bericht erscheint in etwa einer Minute im Panel.

The agent runs as root because it has to read the working directories of the game processes, the SSH settings and the open ports, and run approved actions. At first no action is approved, so it only reads. It does not start a shell and only calls fixed programs.

5. Check the service

On FreeBSD:

# service serverwerk_agent status serverwerk_agent is running as pid 1234.

The script adds serverwerk_agent_enable="YES" to /etc/rc.conf so the agent starts again after a reboot of the server. You can check it with sysrc serverwerk_agent_enable.

On Linux:

# systemctl status serverwerk-agent ● serverwerk-agent.service - Serverwerk Agent Loaded: loaded (/etc/systemd/system/serverwerk-agent.service; enabled) Active: active (running) since Tue 2026-11-10 09:12:44 CET

If it says enabled, the agent also starts after a reboot of the server. What the agent did last is in the log on both systems:

# tail -n 50 /var/log/serverwerk/agent.log

In the panel the server now shows verbunden (connected). After about two minutes the first server check appears.

6. Firewall

The agent needs no open port. You only have to change something if your firewall also filters outgoing connections. In that case allow the outgoing connection to the address and port shown in the install command in the panel. In /etc/pf.conf on FreeBSD, for example:

pass out proto tcp to <platform address> port <port> keep state

Test the rules with pfctl -nf /etc/pf.conf and load them with pfctl -f /etc/pf.conf.

7. Common errors

The messages come from the script and are in German for now.

MessageCause and fix
Code ungültig oder abgelaufenThe code is older than 24 hours or was already used. Create a new one in the panel.
Keine Verbindung zur PlattformOutgoing connections are blocked or name resolution is missing. Check the firewall and /etc/resolv.conf.
Auftrag abgelaufen oder liegt in der ZukunftJobs are valid for 10 minutes only, so the clock of the server must be right. Check the time with date and set up ntpd or timedatectl set-ntp true.
Python 3 nicht gefundenThe system version has no package sources any more. Update the system, see keeping the system up to date.

8. Remove the agent

The command to remove it is also shown in the panel for your server:

# sh serverwerk-install.sh --entfernen

It stops the service and removes the program, the configuration with the key, the status file and the log. If you no longer have the script, download it again as in step 3. To check that the service is gone, run this on FreeBSD. It then reports “does not exist”:

# service serverwerk_agent status

On Linux this one reports “could not be found”:

# systemctl status serverwerk-agent

After that, remove the server in the panel. Measurements are deleted 30 days later. Backups on your server stay there until you delete them. Copies in our storage are deleted as soon as the server is removed.

Connect your agent now

You get the code for the installation after the free registration.