Skip to content

Commit e28aa3c

Browse files
committed
Support new messaging port (#408) + validate ports at runtime
1 parent 93556d9 commit e28aa3c

File tree

9 files changed

+43
-14
lines changed

9 files changed

+43
-14
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ A clear and concise description of what the bug is.
1717
Please censor anything sensitive. Your runtime command might look like this:
1818

1919
```shell
20-
docker run --name="satisfactory" -p 7777 -v ./satisfactory:/config wolveix/satisfactory-server:latest
20+
docker run --name="satisfactory" -p 7777 -p 8888 -v ./satisfactory:/config wolveix/satisfactory-server:latest
2121
```
2222

2323
### Debug Output

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ENV AUTOSAVENUM="5" \
1717
PGID="1000" \
1818
PUID="1000" \
1919
SERVERGAMEPORT="7777" \
20+
SERVERMESSAGINGPORT="8888" \
2021
SERVERSTREAMING="true" \
2122
SKIPUPDATE="false" \
2223
STEAMAPPID="1690800" \
@@ -51,6 +52,6 @@ ARG VERSION="DEV"
5152
ENV VERSION=$VERSION
5253
LABEL version=$VERSION
5354
STOPSIGNAL SIGINT
54-
EXPOSE 7777/udp 7777/tcp
55+
EXPOSE 7777/udp 7777/tcp 8888/tcp
5556

5657
ENTRYPOINT [ "/init.sh" ]

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ docker run \
5050
--env STEAMBETA=false \
5151
--memory-reservation=4G \
5252
--memory 8G \
53-
--publish 7777:7777/udp \
5453
--publish 7777:7777/tcp \
54+
--publish 7777:7777/udp \
55+
--publish 8888:8888/tcp \
5556
wolveix/satisfactory-server:latest
5657
```
5758

@@ -84,8 +85,9 @@ services:
8485
hostname: 'satisfactory-server'
8586
image: 'wolveix/satisfactory-server:latest'
8687
ports:
87-
- '7777:7777/udp'
8888
- '7777:7777/tcp'
89+
- '7777:7777/udp'
90+
- '8888:8888/tcp'
8991
volumes:
9092
- './satisfactory-server:/config'
9193
environment:
@@ -165,7 +167,8 @@ helm install satisfactory k8s-at-home/satisfactory -f values.yaml
165167
| `MULTIHOME` | `::` | set the server's listening interface (usually not needed) |
166168
| `PGID` | `1000` | set the group ID of the user the server will run as |
167169
| `PUID` | `1000` | set the user ID of the user the server will run as |
168-
| `SERVERGAMEPORT` | `7777` | set the game's port |
170+
| `SERVERGAMEPORT` | `7777` | set the game's server port |
171+
| `SERVERMESSAGINGPORT` | `8888` | set the game's messaging port |
169172
| `SERVERSTREAMING` | `true` | toggle whether the game utilizes asset streaming |
170173
| `SKIPUPDATE` | `false` | avoid updating the game on container start/restart |
171174
| `STEAMBETA` | `false` | set experimental game version |
@@ -202,7 +205,8 @@ services:
202205
command: 'your-ftp-user:your-ftp-password:1000'
203206
```
204207

205-
With this, you'll be able to SFTP into your server and access your game files via `/home/your-ftp-user/satisfactory-server/gamefiles`.
208+
With this, you'll be able to SFTP into your server and access your game files via
209+
`/home/your-ftp-user/satisfactory-server/gamefiles`.
206210

207211
## How to Improve the Multiplayer Experience
208212

@@ -245,8 +249,9 @@ services:
245249
GID: 1001 # Your desired GID
246250
user: "1001:1001" # Must match UID:GID above
247251
ports:
248-
- '7777:7777/udp'
249252
- '7777:7777/tcp'
253+
- '7777:7777/udp'
254+
- '8888:8888/tcp'
250255
volumes:
251256
- './satisfactory-server:/config'
252257
environment:

cluster/service.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ spec:
1313
# might be necessary for your cluster:
1414
# loadBalancerIP: <external-IP>
1515
ports:
16+
- name: "api"
17+
port: 7777
18+
protocol: TCP
19+
targetPort: 7777
1620
- name: "game"
1721
port: 7777
1822
protocol: UDP
1923
targetPort: 7777
20-
- name: "api"
21-
port: 7777
24+
- name: "messaging"
25+
port: 8888
2226
protocol: TCP
23-
targetPort: 7777
27+
targetPort: 8888
2428
selector:
2529
app: satisfactory

cluster/statefulset.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ spec:
3737
- name: "game"
3838
containerPort: 7777
3939
protocol: UDP
40+
- name: "messaging"
41+
containerPort: 8888
42+
protocol: TCP
4043
volumeMounts:
4144
- name: satisfactory-config
4245
mountPath: /config

docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ services:
44
hostname: 'satisfactory-server'
55
image: 'wolveix/satisfactory-server:latest'
66
ports:
7-
- '7777:7777/udp'
87
- '7777:7777/tcp'
8+
- '7777:7777/udp'
9+
- '8888:8888/tcp'
910
volumes:
1011
- './satisfactory-server:/config'
1112
environment:

run.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
set -e
44

5+
# Port validation
6+
if ! [[ "$SERVERGAMEPORT" =~ $NUMCHECK ]]; then
7+
printf "Invalid server port given: %s\\n" "$SERVERGAMEPORT"
8+
SERVERGAMEPORT="7777"
9+
fi
10+
printf "Setting server port to %s\\n" "$SERVERGAMEPORT"
11+
12+
if ! [[ "$SERVERMESSAGINGPORT" =~ $NUMCHECK ]]; then
13+
printf "Invalid messaging port given: %s\\n" "$SERVERMESSAGINGPORT"
14+
SERVERMESSAGINGPORT="8888"
15+
fi
16+
printf "Setting messaging port to %s\\n" "$SERVERMESSAGINGPORT"
17+
518
# Engine.ini settings
619
if ! [[ "$AUTOSAVENUM" =~ $NUMCHECK ]]; then
720
printf "Invalid autosave number given: %s\\n" "$AUTOSAVENUM"
@@ -135,7 +148,7 @@ fi
135148
cd /config/gamefiles || exit 1
136149

137150
chmod +x FactoryServer.sh || true
138-
./FactoryServer.sh -Port="$SERVERGAMEPORT" "${ini_args[@]}" "$@" &
151+
./FactoryServer.sh -Port="$SERVERGAMEPORT" -ReliablePort="$SERVERMESSAGINGPORT" "${ini_args[@]}" "$@" &
139152

140153
sleep 2
141154
satisfactory_pid=$(ps --ppid ${!} o pid=)

ssl/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ services:
1111
hostname: 'satisfactory-server'
1212
image: 'wolveix/satisfactory-server:latest'
1313
ports:
14-
- '7777:7777/udp'
1514
- '7777:7777/tcp'
15+
- '7777:7777/udp'
16+
- '8888:8888/tcp'
1617
volumes:
1718
- './satisfactory-server:/config'
1819
- './certs/live/${DOMAIN}/fullchain.pem:/config/gamefiles/FactoryGame/Certificates/cert_chain.pem'

ssl/docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ services:
44
hostname: 'satisfactory-server'
55
image: 'wolveix/satisfactory-server:latest'
66
ports:
7-
- '7777:7777/udp'
87
- '7777:7777/tcp'
8+
- '7777:7777/udp'
9+
- '8888:8888/tcp'
910
volumes:
1011
- './satisfactory-server:/config'
1112
- './certs/live/${DOMAIN}/fullchain.pem:/config/gamefiles/FactoryGame/Certificates/cert_chain.pem'

0 commit comments

Comments
 (0)