5
5
Generic Steam dedicated server using Docker.
6
6
7
7
This provides a core installation of ` steamcmd ` to host dedicated servers. Both
8
- linux and windows servers can be hosted using this image.
8
+ linux and windows servers (via [ wine] ( winehq.org ) ) can be hosted using this
9
+ image.
9
10
10
11
## How it Runs
11
12
The docker image contains a base ubuntu install with wine (windows support) and
@@ -31,22 +32,22 @@ Fully working examples of different dedicated servers.
31
32
32
33
## Version Tags
33
34
34
- | Tag | Description |
35
- | --------------| ------------------------------------------------------------------------------------- |
36
- | stable | Ubuntu 18.04 with wine and steamcmd from binary repo. |
37
- | latest | Ubuntu 18.04 with latest winehq STABLE packages and steamcmd. This ** WILL** break. |
38
- | experimental | Ubuntu 18.04 with latest winehq STAGING packages and steamcmd. This ** WILL** break. |
35
+ | Tag | Description |
36
+ | --------------| ---------------------------------------------------------------------------------|
37
+ | stable | Ubuntu 18.04: wine, steamcmd (package). |
38
+ | latest | Ubuntu 18.04: winehq STABLE packages, steamcmd (package) . This ** WILL** break. |
39
+ | experimental | Ubuntu 18.04: winehq STAGING packages, steamcmd (package) . This ** WILL** break. |
39
40
* Containers are automatically rebuilt weekly.
40
41
41
42
## Parameters
42
43
43
44
| Parameter | Function | Default |
44
45
| ------------------| ------------------------------------------------------------------------------------------| ----------------|
45
46
| SERVER_DIR | Location for server files. | ` /data/server ` |
46
- | STEAM | Location of steamcmd client. | ` /steam ` |
47
+ | STEAM | Location of steamcmd client. | ` /steam ` |
47
48
| PLATFORM | Platform to force specify when auto updating. ` linux ` or ` windows ` . | ` windows ` |
48
49
| STEAM_APP_ID | Steam application ID for auto updating. | ` 0 ` |
49
- | STEAM_APP_EXTRAS | Optional. Additional options for steam app update. | `` |
50
+ | STEAM_APP_EXTRAS | Optional. Additional options and values for steam app update, e.g setting BETA versions. | `` |
50
51
| UPDATE_OS | Update core OS on startup. ` 1 ` enable, ` 0 ` disable. | ` 1 ` |
51
52
| UPDATE_STEAM | Update steamcmd on startup. ` 1 ` enable, ` 0 ` disable. | ` 1 ` |
52
53
| UPDATE_SERVER | Update dedicated server specified by ` STEAM_APP_ID ` on startup. ` 1 ` enable, ` 0 ` disable. | ` 1 ` |
@@ -65,15 +66,15 @@ for a detailed list of steam ports.
65
66
66
67
| Port | Protocol | Required? | Description |
67
68
| -------| ----------| -----------| -------------------------|
68
- | ` 27015 ` | TCP | Optional | SRCDS RCON port. |
69
69
| ` 27015 ` | UDP | Mandatory | Gameplay traffic. |
70
+ | ` 27015 ` | TCP | Optional | SRCDS RCON port. |
70
71
| ` 27016 ` | UDP | Optional | Steam announce traffic. |
71
72
72
73
## Volumes
73
74
74
- | Volume | Function |
75
- | ---------| -------------------------------------------- |
76
- | /data | User data location for images. |
75
+ | Volume | Function |
76
+ | ---------| --------------------------------|
77
+ | /data | User data location for images. |
77
78
78
79
## User/Group IDs
79
80
When using data volumes (` -v ` flags), permissions issues can occur between the
@@ -99,10 +100,9 @@ uid=1000(myuser) gid=1000(myuser) groups=1000(myuser),4(adm),24(cdrom),27(sudo),
99
100
The value of ` uid ` (user ID) and ` gid ` (group ID) are the ones that you should
100
101
be given the container.
101
102
102
-
103
103
## Detailed Usage Instructions
104
- Details how to setup a new server from scratch. See [ Example Configurations ] ( #example-configurations )
105
- for working examples.
104
+ Details how to setup a new server from scratch. See
105
+ [ Example Configurations ] ( #example-configurations ) for working examples.
106
106
107
107
### docker-compose (windows dedicated server)
108
108
```
@@ -176,7 +176,7 @@ minimum exposure if there are vulnerabilities in the game, as well as prevent
176
176
any permissions issues with server files.
177
177
178
178
```
179
- su steam -c 'your server launch command'
179
+ su - steam -c 'your server launch command'
180
180
```
181
181
182
182
> Your specific launch command will vary based on what server you install.
@@ -186,7 +186,7 @@ su steam -c 'your server launch command'
186
186
This will launch a ** Left 4 Dead** `` srcsd_run `` linux dedicated server.
187
187
188
188
```
189
- su steam -c "/data/server/srcds_run -console -game left4dead -map l4d_hospital01_apartment -port 27015 +maxplayers 4 -nohltv +exec /data/server.cfg"
189
+ su - steam -c "/data/server/srcds_run -console -game left4dead -map l4d_hospital01_apartment -port 27015 +maxplayers 4 -nohltv +exec /data/server.cfg"
190
190
```
191
191
* this example would launch a Left 4 Dead dedicated server (222840).
192
192
@@ -196,7 +196,7 @@ dedicated server documentation and forums for launching a dedicated windows
196
196
server under wine for your game.
197
197
198
198
``` bash
199
- su steam -c " xvfb-run --auto-servernum \
199
+ su - steam -c " xvfb-run --auto-servernum \
200
200
wine64 ${SERVER_DIR} /ConanSandbox/Binaries/Win64/ConanSandboxServer-Win64-Test.exe -nosteamclient -game -server -log"
201
201
```
202
202
* This example lauches a conan exiles dedicated server (443030).
@@ -210,14 +210,14 @@ For servers that don't require saving of state between reboots, a simple bash sc
210
210
Windows
211
211
``` bash
212
212
# This will run wine (for windows servers) and launch the server.
213
- su steam -c " xvfb-run --auto-servernum \
213
+ su - steam -c " xvfb-run --auto-servernum \
214
214
wine64 ${SERVER_DIR} /ConanSandbox/Binaries/Win64/ConanSandboxServer-Win64-Test.exe -nosteamclient -game -server -log"
215
215
```
216
216
217
217
Linux
218
218
``` bash
219
219
# launch the dedicated linux server under the steam user.
220
- su steam -c " /data/server/startserver.sh \
220
+ su - steam -c " /data/server/startserver.sh \
221
221
-configfile=/data/server/serverconfig.xml"
222
222
```
223
223
@@ -262,7 +262,7 @@ function shutdown() {
262
262
trap shutdown SIGINT SIGKILL SIGTERM
263
263
264
264
function start_server() {
265
- su steam -c " xvfb-run --auto-servernum wine64 ${SERVER_DIR} /ConanSandbox/Binaries/Win64/ConanSandboxServer-Win64-Test.exe -nosteamclient -game -server -log"
265
+ su - steam -c " xvfb-run --auto-servernum wine64 ${SERVER_DIR} /ConanSandbox/Binaries/Win64/ConanSandboxServer-Win64-Test.exe -nosteamclient -game -server -log"
266
266
}
267
267
268
268
function watch_server() {
@@ -313,8 +313,8 @@ patches; remember to switch to the `steam` user when executing this commands.
313
313
314
314
custom_server
315
315
``` bash
316
- su steam -c " winetricks dotnet472"
317
- su steam -c " winetricks vcrun2013"
316
+ su - steam -c " winetricks dotnet472"
317
+ su - steam -c " winetricks vcrun2013"
318
318
```
319
319
320
320
## Building
@@ -376,11 +376,26 @@ access to.
376
376
srcds_run ... -pidfile /data/server/{GAME}.pid
377
377
```
378
378
379
+ ### Could not find ` steamclient.so ` or ` [S_API FAIL] SteamAPI_Init() ... or a local steamclient.dll. `
380
+ The [ Steam Liunus shared libary] [ 6h ] could not be found in your path.
381
+
382
+ Be sure to use ` su - steam -c ` to load the full steam user profile.
383
+
384
+ Link to the local ` steamclient.so ` file, or copy it to where your server binary
385
+ is executed. The default location is in the steam user directory:
386
+
387
+ ``` bash
388
+ /steam/.steam/steamcmd/linux{32,64}/steamclient.so
389
+ ```
390
+
391
+ ` ln -s -f /steam/.steam/steamcmd/linux32/steamclient.so /steam/.steam/sdk32/steamclient.so `
392
+
379
393
## Licensing
380
394
Steam Logo, SteamCMD ©2019 Valve Corporation. Steam and the Steam logo are
381
395
trademarks and/or registered trademarks of Valve Corporation in the U.S.
382
396
and/or other countries.
383
397
384
398
[ 3n ] : https://github.com/alinmear/docker-conanexiles/blob/master/src/etc/supervisor/conf.d/conanexiles.conf
385
399
[ 2k ] : https://docs.docker.com/compose/compose-file/#stop_grace_period
400
+ [ 6h ] : https://developer.valvesoftware.com/wiki/SteamCMD
386
401
[ f8 ] : https://raw.githubusercontent.com/r-pufky/steam/master/media/steam-icon-logo.png
0 commit comments