Skip to content

Commit 203b291

Browse files
authored
Feature: Allow custom ports (#5)
* add variable ports to startup * Add environment variables for PORT and QUERYPORT * drop plain `docker` command, add port customization * Rename docker-compose.example to docker-compose.yml * Added notes on customizing ports and clarified default port settings. * fix variable * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md
1 parent f28e457 commit 203b291

File tree

3 files changed

+41
-10
lines changed

3 files changed

+41
-10
lines changed

README.md

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,43 @@
1313

1414
### Requirements
1515

16-
- Docker.io, with or without docker compose
16+
- Docker.io with *docker compose*
1717
- 8GB memory (absolute bare minimum, COULD work if a swap-file is present but let's be honest, won't be fun. Get 16GB or at least 12GB)
1818

1919
### How to use
2020

21-
Plain docker command:
21+
- Grab the `docker-compose.yml`
22+
- run `docker compose up -d` and **be patient**[^1]
23+
- Fire up your SCUM game and connect either without port or port 7779
24+
25+
Note: Don't want to use *docker compose*? Check https://www.decomposerize.com/
2226

23-
```bash
24-
docker run --name scum-server -p 7777:7777/udp -p 7777:7777/tcp -p 7778:7778/udp -p 7778:7778/tcp -p 7779:7779/udp -p 7779:7779/tcp -p 27015:27015/udp -p 27015:27015/tcp -v ./scumserver-data:/opt/scumserver --restart unless-stopped ghcr.io/evilolaf/scum:latest
25-
```
2627

27-
**or**
28+
### How to customize ports
2829

29-
`docker compose` using the example file.
30+
Defaults:
31+
- `PORT=7777` and therefore (as per SCUM server's weird way to assign ports) also **7778** and **7779**
32+
- `QUERYPORT=27015`
33+
34+
When `PORT` or `QUERYPORT` are altered this change MUST reflect the port mapping as well.
35+
36+
**Example for ports 10000 and 20000**:
37+
```yml
38+
environment:
39+
- PORT=10000
40+
- QUERYPORT=20000
41+
ports:
42+
- "10000:10000/udp"
43+
- "10000:10000/tcp"
44+
- "10001:10001/udp"
45+
- "10001:10001/tcp"
46+
- "10002:10002/udp"
47+
- "10002:10002/tcp"
48+
- "20000:20000/udp"
49+
- "20000:20000/tcp"
50+
```
51+
52+
You SCUM game now needs port **10002** for connection.
3053
3154
3255
## Non-technical
@@ -39,3 +62,8 @@ Reverse-engineered version of j0s0n/scum-wine Docker image...
3962
### Who?
4063
All credit for the initial work goes to j0s0n.
4164
65+
### Footnotes
66+
I am certain some port exposures are unnecessary. However, I could not find clear documentation on which ports and protocols are required. The SCUM server's port calculation behavior doesn't help either.
67+
Exposing additional ports should not cause any harm.
68+
69+
[^1]: Use `docker compose logs` to check the process. Once you see something like `scum-server | LogBattlEye: Display: Config entry: MasterPort 8037` in the logs, your game server should be ready to accept player connections.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ services:
22
scum-server:
33
image: ghcr.io/evilolaf/scum:latest
44
container_name: scum-server
5+
environment:
6+
- PORT=7777
7+
- QUERYPORT=27015
58
ports:
69
- "7777:7777/udp"
710
- "7777:7777/tcp"

start-server.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -e
33

4-
echo "Installing/updating SCUM dedicated server..."
4+
echo "Installing/updating steamcmd and SCUM dedicated server..."
55
/opt/steamcmd/steamcmd.sh +@sSteamCmdForcePlatformType windows \
66
+force_install_dir /opt/scumserver \
77
+login anonymous \
@@ -12,6 +12,6 @@ echo "Starting SCUM dedicated server..."
1212
xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" \
1313
wine /opt/scumserver/SCUM/Binaries/Win64/SCUMServer.exe \
1414
-log \
15-
-port=7777 \
16-
-QueryPort=27015 \
15+
-port=${PORT:-7777} \
16+
-QueryPort=${QUERYPORT:-27015} \
1717
-MaxPlayers=32

0 commit comments

Comments
 (0)