Skip to content

Commit

Permalink
Update readme and env example
Browse files Browse the repository at this point in the history
  • Loading branch information
Diyagi committed Oct 22, 2024
1 parent 708ae04 commit 42e49db
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 24 deletions.
41 changes: 22 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Create two directories where you want to run your server :
### Using Docker Compose
Create a `docker-compose.yml` with the following content:

```
```yml
version: "3"

services:
Expand All @@ -45,15 +45,16 @@ volumes:
```
Create a `core.env` file, it should contain the environment variables for the dedicated server, see configuration for reference. Example:
```
```env
PUID=1000
PGID=1000
WORLD_INDEX=0
WORLD_NAME=Core Keeper Server
WORLD_SEED=0
WORLD_MODE=0
GAME_ID=
DATA_PATH=/home/steam/core-keeper-data
DATA_PATH=
MAX_PLAYERS=10
DISCORD=1
DISCORD_HOOK=https://discord.com/api/webhooks/{id}/{token}
SEASON=-1
SERVER_IP=
Expand All @@ -70,21 +71,23 @@ To query the game ID run:
## Configuration

These are the arguments you can use to customize server behavior with default values.
```
WORLD_INDEX Which world index to use.
WORLD_NAME The name to use for the server.
WORLD_SEED The seed to use for a new world. Set to 0 to generate random seed.
WORLD_MODE Sets the world mode for the world. Can be Normal (0), Hard (1), Creative (2), Casual (4). NOTE: Changing between Creative and non-Creative worlds not currently supported.
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.
DATA_PATH Save file location. If not set it defaults to a sub-folder named "DedicatedServer" at the default Core Keeper save location.
MAX_PLAYERS Maximum number of players that will be allowed to connect to server.
DISCORD Enables discord webhook features which sends GameID to a channel.
DISCORD_HOOK Webhook url (Edit channel > Integrations > Create Webhook).
DISCORD_PRINTF_STR The format string used to generate the content of the Discord webook. Default is `%s`, simply sending the GameID.
SEASON Overrides current season by setting to any of None (0), Easter (1), Halloween (2), Christmas (3), Valentine (4), Anniversary (5), CherryBlossom (6), LunarNewYear(7). -1 is default setting where it is set depending on system date.
SERVER_IP Only used if port is set. Sets the address that the server will bind to.
SERVER_PORT What port to bind to. If not set, then the server will use the Steam relay network. If set the clients will connect to the server directly and the port needs to be open.
```

| Argument | Default | Description |
| :---: | :---: | :---: |
| PUID | 1000 | The user ID on the host that the container should use for file ownership and permissions. |
| PGID | 1000 | The group ID on the host that the container should use for file ownership and permissions. |
| WORLD_INDEX | 0 | Which world index to use. |
| WORLD_NAME | "" | The name to use for the server. |
| WORLD_SEED | 0 | The seed to use for a new world. Set to 0 to generate random seed. |
| WORLD_MODE | 0 | Sets the world mode for the world. Can be Normal (0), Hard (1), Creative (2), Casual (4). |
| SEASON | -1 | Overrides current season by setting to any of None (0), Easter (1), Halloween (2), Christmas (3), Valentine (4), Anniversary (5), CherryBlossom (6), LunarNewYear(7) or Normal Date (-1). |
| 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. |
| MAX_PLAYERS | 3 | Maximum number of players that will be allowed to connect to server. |
| DATA_PATH | "/home/steam/core-keeper-data" | Save file location. |
| DISCORD_HOOK | "" | Webhook url (Edit channel > Integrations > Create Webhook). |
| DISCORD_PRINTF_STR | "%s" | The format string used to generate the content of the Discord webook. |
| SERVER_IP | No Default | Only used if port is set. Sets the address that the server will bind to. |
| SERVER_PORT | No Default | What port to bind to. If not set, then the server will use the Steam relay network. If set the clients will connect to the server directly and the port needs to be open. |

### Contributors
<a href="https://github.com/escapingnetwork/core-keeper-dedicated/graphs/contributors">
Expand Down
14 changes: 9 additions & 5 deletions docker-compose-example/core.env
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
GAME_ID=
PUID=1000
PGID=1000
WORLD_INDEX=0
WORLD_NAME=Core Keeper Server
WORLD_SEED=0
WORLD_MODE=0
GAME_ID=
DATA_PATH=
MAX_PLAYERS=10
DATA_PATH=/home/steam/core-keeper-data
DISCORD=1
DISCORD_HOOK=https://discord.com/api/webhooks/id/token
SEASON=0
DISCORD_HOOK=https://discord.com/api/webhooks/{id}/{token}
SEASON=-1
SERVER_IP=
SERVER_PORT=

0 comments on commit 42e49db

Please sign in to comment.