Skip to content

Commit 2bcfbe7

Browse files
authored
Merge pull request #89 from Diyagi/main
Changes docs to avoid confusion about network modes
2 parents 1245411 + 7e00fd4 commit 2bcfbe7

3 files changed

Lines changed: 26 additions & 6 deletions

File tree

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,9 @@ These are the arguments you can use to customize server behavior with default va
8989
| WORLD_MODE | 0 | Sets the world mode for the world. Can be Normal (0), Hard (1), Creative (2), Casual (4). |
9090
| SEASON | No Default | Overrides current season by setting to any of None (0), Easter (1), Halloween (2), Christmas (3), Valentine (4), Anniversary (5), CherryBlossom (6), LunarNewYear(7).<br/>**Do not set this env var if you want real date season.** |
9191
| GAME_ID | "" | Game ID to use for the server. Need to be at least 28 characters and alphanumeric, excluding Y,y,x,0,O. Empty or not valid means a new ID will be generated at start. |
92-
| DATA_PATH | "/home/steam/core-keeper-data" | Save file location. |
9392
| MAX_PLAYERS | 10 | Maximum number of players that will be allowed to connect to server. |
9493
| SERVER_IP | No Default | Only used if port is set. Sets the address that the server will bind to. |
95-
| SERVER_PORT | 27015 | What port to bind to. 27015 is the Steam relay port. |
94+
| SERVER_PORT | No Default | Port used for direct connection mode. **Setting an value to this will cause the server behaviour to change!** [See Network Mode](#network-mode) |
9695
| DISCORD_WEBHOOK_URL | "" | Webhook url (Edit channel > Integrations > Create Webhook). |
9796
| DISCORD_PLAYER_JOIN_ENABLED | true | Enable/Disable message on player join |
9897
| DISCORD_PLAYER_JOIN_MESSAGE | `"$${char_name} ($${steamid}) has joined the server."` | Embed message |
@@ -156,6 +155,26 @@ MODS=core-lib,coreliblocalization,corelibrewiredextension:3.0.1,ck-qol:1.9.4
156155
- If `version` is not specified, the latest version will be installed.
157156
- Mods are reinstalled whenever the container is started, so to update mods to their latest version, simply restart the container.
158157

158+
## Network Mode
159+
160+
Currently Core Keeper supports two network modes: SDR (Steam Datagram Relay) and Direct Connect.
161+
162+
### SDR (Steam Datagram Relay)
163+
In this mode, the server uses [Valve's Virtual Network](https://partner.steamgames.com/doc/features/multiplayer/steamdatagramrelay) to route traffic through Steam's relay infrastructure. Instead of players connecting directly to the server's IP address, all communication goes through secure relay nodes managed by Steam. This hides the server’s real IP, protects against DDoS attacks, and improves NAT traversal.
164+
165+
Because of this relay system, server operators do not need to open any ports on their router or firewall—as long as outbound connections to Steam are allowed, the server can communicate with clients reliably.
166+
167+
### Direct Connection
168+
In Direct Connect mode, players connect straight to the server’s public IP address without going through Steam's relay network. This can result in lower latency and more direct communication, but it requires the server to be reachable from the internet.
169+
170+
Server operators must open and forward the necessary ports on their router or firewall to allow incoming connections. Unlike SDR, this mode exposes the server’s IP address to clients and may be more vulnerable to connection issues or attacks.
171+
172+
> [!IMPORTANT]<br>
173+
> The SERVER_PORT environment variable determines the server's network mode.<br>
174+
> Leave it empty to use SDR (no port forwarding needed).<br>
175+
> Setting a value switches to Direct Connect, which requires opening and forwarding ports.<br>
176+
> Only set this if you specifically want Direct Connect.
177+
159178
### Contributors
160179
<a href="https://github.com/escapingnetwork/core-keeper-dedicated/graphs/contributors">
161180
<img src="https://contrib.rocks/image?repo=escapingnetwork/core-keeper-dedicated" />

docker-compose-example/.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ WORLD_NAME="Core Keeper Server"
77
WORLD_SEED=""
88
WORLD_MODE=0
99
GAME_ID=""
10-
DATA_PATH="${STEAMAPPDATADIR:-/home/steam/core-keeper-data}"
1110
MAX_PLAYERS=10
1211
SEASON=""
1312
SERVER_IP=""
14-
SERVER_PORT="27015"
13+
# Port is only needed if using direct connect mode
14+
#SERVER_PORT="27015"
1515
DISCORD_WEBHOOK_URL=""
1616
# Player Join
1717
DISCORD_PLAYER_JOIN_ENABLED=true

docker-compose-example/docker-compose.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ services:
22
core-keeper:
33
container_name: core-keeper-dedicated
44
image: escaping/core-keeper-dedicated
5-
ports:
6-
- "$SERVER_PORT:$SERVER_PORT/udp"
5+
# Port is only needed if using direct connect mode
6+
# ports:
7+
# - "$SERVER_PORT:$SERVER_PORT/udp"
78
volumes:
89
- server-files:/home/steam/core-keeper-dedicated
910
- server-data:/home/steam/core-keeper-data

0 commit comments

Comments
 (0)