Creates an easy server for GMOD gamemode TTT based on lgsm.
100K+
GMOD TTT server image, https://hub.docker.com/r/jusito/
If you use the old image, you should check the environment variables. For example arguments after image name aren't used, use instead -e SERVER_ADDITIONAL_PARAMETERS=....
This readme may not be perfect, if you struggle at some point or you see incorrect informations create an issue at git please.
-e WORKSHOP_COLLECTION_ID 123456.-e WORKSHOP_AUTOLOAD=false. Remember that "false" mean, that every user has to manually subscribe to your collection. If you don't separate maps / others, every connecting user would load all maps on first connecting. This would be a pain for some.-e INSTALL_CSS=true and/or -e INSTALL_HL2=true and so on. Most content will need at least CSS.-e SERVER_PORT=27015 -p 27015:27015/udp both are always needed. For RCON [...] -e SERVER_RCON_PASSWORD="verySecure" -p 27015:27015/tcp.-e SERVER_NAME="My Server", password -e SERVER_PASSWORD="securepw" and timezone for cron -e TZ="Europe/Berlin", default short downtime at Sunday 10 o'clock.-e SERVER_DEFAULT_MAP=ttt_rooftops_2016_v1 and max players -e SERVER_MAX_PLAYERS=20-v TTTDev:/home/steam/serverfilesIf you need rcon only sometimes, use ulx with this config.
docker run -d \
-p 27015:27015/udp \
-e SERVER_PORT=27015 \
-e INSTALL_CSS=true \
-e WORKSHOP_COLLECTION_ID=123456 \
-e SERVER_NAME="My Server" \
-e SERVER_PASSWORD="securepw" \
-e SERVER_DEFAULT_MAP="ttt_lttp_kakariko_a5" \
-v TTTDev:/home/steam/serverfiles \
--name "MyTTTServer" \
jusito/docker-ttt:gmod_ttt_debian
docker run -d \
-p 27015:27015/udp \
-e SERVER_PORT=27015 \
-e INSTALL_CSS=true \
-e WORKSHOP_COLLECTION_ID=123456 \
-e SERVER_NAME="My Server" \
-e SERVER_PASSWORD="securepw" \
-e SERVER_DEFAULT_MAP="ttt_lttp_kakariko_a5" \
-v TTTDev:/home/steam/serverfiles \
-p 27015:27015/tcp \
-e SERVER_RCON_PASSWORD="securePW" \
--name "MyTTTServer" \
jusito/docker-ttt:gmod_ttt_debian
Because you will most likely use many environmental variables, I recommend a env list. Instead of -e VARNAME="VALUE 1" write one additional text file:
TTT.env:
VARNAME=Value 1
SERVER_NAME=My Hood
SERVER_PASSWORD=Secure_PW
| Name | Default | Description |
|---|---|---|
| CRON_MONITOR | "*/5 * * * *" | Every 5 minutes LGSM checks if the server is running and responding, rebooting if needed. |
| CRON_UPDATE | "*/30 * * * *" | Every 30 minutes LGSM checks if game server needs an update which will be executed. |
| CRON_FORCE_UPDATE | "0 10 * * 0" | At Sunday 10:00 force update and restart |
| CRON_LOG_ROTATE | "0 9 * * 0" | Rotate log at Stunday 9:00 |
| TZ | Europe/Berlin | Set timezone for CRON / log |
| Name | Default | Description |
|---|---|---|
| SERVER_EXECUTABLE | "" | Name of the lgsm script after installation |
| SERVER_GAME | "" | LGSM name of installation |
| Name | Default | Description |
|---|---|---|
| STEAM_PATH | /home/steam | primary workdir, homedir of user |
| SERVER_PATH | /home/steam/serverfiles | Path to serverfiles after installation |
| STEAM_CMD | /home/steam/steamcmd | Path to steamcmd files |
| GROUP_ID | 10000 | Group ID of the user |
| USER_ID | 10000 | User ID of the user |
| DOCKER_USER | steam | Name of the user |
| SUPERCRONIC_URL | https://github.com/aptible/supercronic/releases/download/v0.1.9/supercronic-linux-amd64 | CRON version |
| SUPERCRONIC | supercronic-linux-amd64 | CRON name after download |
| SUPERCRONIC_SHA1SUM | 5ddf8ea26b56d4a7ff6faecdd8966610d5cb9d85 | CRC for CRON download |
| DEBIAN_FRONTEND | noninteractive | Don't ask questions during installation |
| LANG | C.UTF-8 | Language set |
| TERM | xterm | |
| DEBUGGING | false |
| Name | Default | Description |
|---|---|---|
| INSTALL_CSS | false | Should I install and mount CSS? |
| INSTALL_HL2 | false | Should I install and mount HL2? |
| INSTALL_HLDM | false | Should I install and mount HLDM? |
| INSTALL_TF2 | false | Should I install and mount TF2? |
| WORKSHOP_COLLECTION_ID | "" | Workshop Collection ID for the server. If you use AUTOLOAD you should add maps on a linked collection |
| WORKSHOP_API_KEY | "" | Maybe needed for private content. |
| WORKSHOP_AUTOLOAD | true | Every item which is on the given collection, will be downloaded by every client. Elements on linked collections not - so use maps in a linked collection. |
| Name | Default | Description |
|---|---|---|
| SERVER_NAME | LinuxGSM | |
| SERVER_PASSWORD | "" | |
| SERVER_RCON_PASSWORD | "" | |
| SERVER_VOICE_ENABLE | 1 | |
| SERVER_IP | 0.0.0.0 | |
| SERVER_PORT | 27015 | |
| SERVER_CLIENTPORT | 27005 | |
| SERVER_SOURCETVPORT | 27020 | |
| SERVER_DEFAULT_MAP | gm_construct | |
| SERVER_MAX_PLAYERS | 16 | |
| SERVER_TICKRATE | 66 | |
| SERVER_GAMEMODE | sandbox | |
| SERVER_LOGIN_TOKEN | "" | |
| SERVER_ADDITIONAL_PARAMETERS | -disableluarefresh |
These variables are untested, but if they dont work report it please too. Documentation
| Name | Default | Description |
|---|---|---|
| LGSM_DISPLAYIP | "" | |
| LGSM_POSTALERT | off | |
| LGSM_POSTDAYS | 7 | |
| LGSM_POSTTARGET | https://hastebin.com | |
| LGSM_DISCORDALERT | off | |
| LGSM_DISCORDWEBHOOK | webhook | |
| LGSM_EMAILALERT | off | |
| LGSM_EMAIL | [email protected] | |
| LGSM_EMAILFROM | "" | |
| LGSM_IFTTTALERT | off | |
| LGSM_IFTTTTOKEN | accesstoken | |
| LGSM_IFTTTEVENT | linuxgsm_alert | |
| LGSM_MAILGUNALERT | off | |
| LGSM_MAILGUNTOKEN | accesstoken | |
| LGSM_MAILGUNDOMAIN | example.com | |
| LGSM_MAILGUNEMAILFROM | [email protected] | |
| LGSM_MAILGUNEMAIL | [email protected] | |
| LGSM_PUSHBULLETALERT | off | |
| LGSM_PUSHBULLETTOKEN | accesstoken | |
| LGSM_CHANNELTAG | "" | |
| LGSM_PUSHOVERALERT | off | |
| LGSM_PUSHOVERTOKEN | accesstoken | |
| LGSM_TELEGRAMALERT | off | |
| LGSM_TELEGRAMTOKEN | accesstoken | |
| LGSM_TELEGRAMCHATID | "" | |
| LGSM_CURLCUSTOMSTRING | "" | |
| LGSM_UPDATEONSTART | off | |
| LGSM_MAXBACKUPS | 4 | |
| LGSM_MAXBACKUPDAYS | 30 | |
| LGSM_STOPONBACKUP | on | |
| LGSM_CONSOLELOGGING | on | |
| LGSM_LOGDAYS | 7 | |
| LGSM_QUERYDELAY | 5 | |
| LGSM_BRANCH | "" | |
| LGSM_STEAMMASTER | true" |
| Name | Default | Description |
|---|---|---|
| CSS_PATH | /home/steam/addons/css | |
| HL2_PATH | /home/steam/addons/hl2 | |
| HLDM_PATH | /home/steam/addons/hldm | |
| TF2_PATH | /home/steam/addons/tf2 | |
| SERVER_EXECUTABLE | gmodserver | |
| SERVER_GAME | gmodserver |
| Name | Default | Description |
|---|---|---|
| SERVER_GAMEMODE | "terrortown" |
The container provides links to LGSM commands:
/home/steam/serverfiles
server.cfg: /home/steam/serverfiles/garrysmod/cfg/gmodserver.cfg
hostname, password, rcon password, voice enabled are managed / will be overwritten
http://ttt.badking.net/config-and-commands/convars https://wiki.garrysmod.de/server.cfg
Path in container is: docker cp "your server.cfg path" CONTAINER:/home/steam/serverfiles/garrysmod/cfg/gmodserver.cfg
navigate to directory with readme.md bash test/testBuild.sh (sh doesn't like pipefail, escape if you want to use sh)
docker run -d \
-e MY_NAME="docker" -e MY_PASSWORD="MySecurePW" \
-e MY_USER_ID="10000" -e MY_GROUP_ID="10000" \
-p 122:20 -p 123:21 -p 10090-10100:10090-10100 \
-v TTTDev:/home/docker/ \
jusito/vsftpd-alpine:simple
docker run -d \
-e MY_NAME="docker" -e MY_PASSWORD="MySecurePW" \
-e MY_USER_ID="10000" -e MY_GROUP_ID="10000" \
-p 122:20 -p 123:21 -p 10090-10100:10090-10100 \
-v TTTDev:/home/docker/ \
-e pasv_address="1.2.3.4" \
jusito/vsftpd-alpine:simple
Content type
Image
Digest
sha256:3bf3ddb3d…
Size
106.1 MB
Last updated
11 months ago
docker pull jusito/docker-ttt