1. Herunterladen
Unter Linux braucht der Server vorher die 32-Bit-Bibliotheken:
dpkg --add-architecture i386
apt update
apt install -y lib32gcc-s1 lib32stdc++6
# Windows
C:\steamcmd\steamcmd.exe +force_install_dir C:\gmod +login anonymous +app_update 4020 validate +quit
# Linux (mit dem Benutzer steam)
~/steamcmd/steamcmd.sh +force_install_dir ~/gmod +login anonymous +app_update 4020 validate +quit
2. Der Steam-Token (GSLT)
Erstelle auf steamcommunity.com/dev/managegameservers einen Token mit der App-ID 4000. Das ist die des Spiels, nicht die des Servers (4020): Mit 4020 funktioniert es nicht.
3. Starten
# Windows
C:\gmod\srcds.exe -console -game garrysmod +gamemode sandbox +map gm_construct +maxplayers 16 +sv_setsteamaccount DEIN_TOKEN
# Linux
~/gmod/srcds_run -game garrysmod +gamemode sandbox +map gm_construct +maxplayers 16 +sv_setsteamaccount DEIN_TOKEN
Ersetze sandbox durch den Modus, den du willst: terrortown (TTT, ist dabei) oder den deines heruntergeladenen Modus, etwa DarkRP.
4. Workshop-Kollektionen
Erstelle im Steam-Workshop eine Kollektion mit deinen Maps und Addons und ergänze die Startzeile um:
+host_workshop_collection ID_DER_KOLLEKTION
Der Server lädt beim Start alles aus der Kollektion herunter und bindet es ein.
5. Name, Passwort und RCON
In garrysmod/cfg/server.cfg:
hostname "Mein Garry's-Mod-Server"
sv_password ""
rcon_password "EIN_LANGES_PASSWORT"
6. Ports
Garry's Mod nutzt den 27015 mit UDP für das Spiel und mit TCP für RCON:
# Windows (PowerShell als Administrator)
New-NetFirewallRule -DisplayName "GMod UDP 27015" -Direction Inbound -Protocol UDP -LocalPort 27015 -Action Allow -Profile Any
New-NetFirewallRule -DisplayName "GMod TCP 27015" -Direction Inbound -Protocol TCP -LocalPort 27015 -Action Allow -Profile Any
# Linux
ufw allow 27015/udp
ufw allow 27015/tcp
Zum Beitreten: Spielkonsole (Taste ^ oder ~) und connect DEINE_IP:27015.