Change README.md

This commit is contained in:
Astra 2025-04-03 07:05:10 +01:00
parent 09c53266b3
commit e9c284be62

View file

@ -9,7 +9,25 @@ This Docker image contains the dedicated server of the game.
Running on the *host* interface (recommended):<br/>
```console
$ docker run -d --net=host --name=cs2 -e STEAMUSER={YOUR_STEAM_USER} -e STEAMPASS={YOUR_STEAM_PASSWD} git.zio.sh/astra/cs2:latest
$ docker run -d --net=host --name=cs2 --env-file=.cs2.env git.zio.sh/astra/cs2:latest
```
.cs2.env:
```properties
CS2_IP=
CS2_PORT=27015
CS2_SERVERNAME=cs2.host.eu
CS2_RCONPW=changeme
CS2_PW=changeme
CS2_BOT_DIFFICULTY=1
CS2_BOT_QUOTA=0
CS2_SERVER_HIBERNAME=0
CS2_MAXPLAYERS=36
CS2_CHEATS=0
CS2_GAMEALIAS=custom
SRCDS_TOKEN=changeme
STEAMAPPVALIDATE=0
TV_ENABLE=0
```
Running using a bind mount for data persistence on container recreation:
@ -20,15 +38,10 @@ $ docker run -d \
--net=host \
-v $(pwd)/cs2-data:/home/steam/cs2-dedicated/ \
--name=cs2-dedicated \
-e STEAMUSER=<YOUR_STEAM_USER> \
-e STEAMPASS=<YOUR_STEAM_PASSWD> \
--env-file=.cs2.properties \
git.zio.sh/astra/cs2:latest
```
`STEAMUSER` and `STEAMPASS` **are required as unlike CS:GO, CS2 can not be downloaded anonymously (at time of writing).**
`STEAMGUARD` **must be used to provide your more recent Steam Guard key if Steam Guard is enabled on your account.**
**The container will automatically update the game on startup, so if there is a game update just restart the container.**
# Configuration
@ -39,14 +52,6 @@ Please note that you need approximately 1.5g of free RAM. If this is not availab
## Environment Variables
Feel free to overwrite these environment variables, using -e (--env) or --env-file (recommended):
### SteamCMD
```dockerfile
STEAMUSER="changeme" (Steam User for SteamCMD.)
STEAMPASS="changeme" (Password for Steam User.)
STEAMGUARD="" (Optional, Steam Guard key if enabled. Use your most recent Steam Guard key.)
```
### Server Configuration
```dockerfile