Compare commits
39 Commits
Author | SHA1 | Date | |
---|---|---|---|
ebe24d89c7 | |||
dbaf116920 | |||
8989a9e895 | |||
b4ed67ba11
|
|||
b296e0569d
|
|||
c8d180d31f
|
|||
1467d7a83d
|
|||
5fdd4d6d3c
|
|||
d5df34aa01 | |||
d74fda4a23 | |||
6ef2b374ea | |||
281405a157 | |||
0009249674 | |||
67bdf272ae | |||
88dd672830 | |||
d884f88572 | |||
b50aacd671 | |||
37c7ce737b | |||
0a12be3eff | |||
b5f286c37d | |||
fcb6e36cf4 | |||
ea4abc932a | |||
c21083194b | |||
5ff2450385 | |||
5911a39153 | |||
93f6621ef1 | |||
49de95dd60 | |||
57074d1631 | |||
c779d97498 | |||
744555dcc1 | |||
be34581024 | |||
3236aa3127 | |||
1d5243467a | |||
566f50c97f | |||
7b4d9ce73a | |||
14754b8625 | |||
9579648a06 | |||
71b34a1674 | |||
6c0397dd42 |
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@@ -1 +0,0 @@
|
||||
github: ich777
|
@@ -4,7 +4,7 @@ LABEL org.opencontainers.image.authors="admin@minenet.at"
|
||||
LABEL org.opencontainers.image.source="https://github.com/ich777/docker-steamcmd-server"
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -y install --no-install-recommends lib32gcc-s1 lib32stdc++6 lib32z1 lsof libicu67 && \
|
||||
apt-get -y install --no-install-recommends lib32gcc-s1 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV DATA_DIR="/serverdata"
|
||||
@@ -34,4 +34,4 @@ ADD /scripts/ /opt/scripts/
|
||||
RUN chmod -R 770 /opt/scripts/
|
||||
|
||||
#Server Start
|
||||
ENTRYPOINT ["/opt/scripts/start.sh"]
|
||||
ENTRYPOINT ["/opt/scripts/start.sh"]
|
40
README.md
40
README.md
@@ -1,48 +1,40 @@
|
||||
# SteamCMD in Docker optimized for Unraid
|
||||
This Docker will download and install SteamCMD. It will also install Counter-Strike 2 and run it.
|
||||
This Docker will download and install SteamCMD. It will also install Left4Dead 2 and run it.
|
||||
|
||||
**ATTENTION:** You have to provide a valid Steam account with the game in it is Library and SteamGuard completely disabled so that the download is working!
|
||||
_It is recommended that you create dedicated Steam account for your dedicated servers with the games in it and SteamGuard completely disabled!_
|
||||
**DON'T DISABLE STEAM GUARD ON YOUR PRIMARY ACCOUNT!!!**
|
||||
**Update Notice:** Simply restart the container if a newer version of the game is available.
|
||||
|
||||
**ATTENTION:** First Startup can take very long since it downloads the gameserver files!
|
||||
|
||||
**PUBLIC PLAY:** If you want that your server is public listed you must add '+sv_setsteamaccount YOURTOKEN' to the GAME_PARAMS (without the quotes and replace YOURTOKEN with your token).
|
||||
Create your token here: https://steamcommunity.com/dev/managegameservers (every gameserver needs it's own token!!!)
|
||||
|
||||
You can also run multiple servers with only one SteamCMD directory!
|
||||
|
||||
## Example Env
|
||||
## Env params
|
||||
| Name | Value | Example |
|
||||
| --- | --- | --- |
|
||||
| STEAMCMD_DIR | Folder for SteamCMD | /serverdata/steamcmd |
|
||||
| SERVER_DIR | Folder for gamefile | /serverdata/serverfiles |
|
||||
| GAME_ID | The GAME_ID that the container downloads at startup. If you want to install a static or beta version of the game change the value to: '730 -beta YOURBRANCH' (without quotes, replace YOURBRANCH with the branch or version you want to install). | 730 |
|
||||
| USERNAME | Leave blank for anonymous login | \<STEAMUSER> |
|
||||
| PASSWRD | Leave blank for anonymous login | \<STEAMPASSWORD> |
|
||||
| GAME_PARAMS | Values to start the server | -dedicated -dev +map de_inferno +game_type 0 +game_mode 1 -usercon |
|
||||
| GAME_ID | The GAME_ID that the container downloads at startup. If you want to install a static or beta version of the game change the value to: '222860 -beta YOURBRANCH' (without quotes, replace YOURBRANCH with the branch or version you want to install). | 222860 |
|
||||
| GAME_NAME | SRCDS gamename | left4dead2 |
|
||||
| GAME_PARAMS | Values to start the server | +maxplayers 8 +map c2m1_highway |
|
||||
| UID | User Identifier | 99 |
|
||||
| GID | Group Identifier | 100 |
|
||||
| GAME_PORT | Port the server will be running on | 27015 |
|
||||
| VALIDATE | Validates the game data | blank |
|
||||
| USERNAME | Leave blank for anonymous login | blank |
|
||||
| PASSWRD | Leave blank for anonymous login | blank |
|
||||
|
||||
## Run example
|
||||
```
|
||||
docker run --name CS2 -d \
|
||||
docker run --name Left4Dead2 -d \
|
||||
-p 27015:27015 -p 27015:27015/udp \
|
||||
--env 'GAME_ID=730' \
|
||||
--env 'USERNAME=<STEAMUSER>' \
|
||||
--env 'PASSWRD=<STEAMPASSWORD>' \
|
||||
--env 'GAME_PARAMS=-dedicated -dev +map de_inferno +game_type 0 +game_mode 1 -usercon' \
|
||||
--env 'GAME_ID=222860' \
|
||||
--env 'GAME_NAME=left4dead2' \
|
||||
--env 'GAME_PORT=27015' \
|
||||
--env 'GAME_PARAMS=+maxplayers 8 +map c2m1_highway' \
|
||||
--env 'UID=99' \
|
||||
--env 'GID=100' \
|
||||
--volume /path/to/steamcmd:/serverdata/steamcmd \
|
||||
--volume /path/to/cs2:/serverdata/serverfiles \
|
||||
ich777/steamcmd:cs2
|
||||
--volume /path/to/l4d2:/serverdata/serverfiles \
|
||||
ich777/steamcmd:l4d2
|
||||
```
|
||||
|
||||
This Docker was mainly edited for better use with Unraid, if you don't use Unraid you should definitely try it!
|
||||
|
||||
This Docker is forked from mattieserver, thank you for this wonderfull Docker.
|
||||
|
||||
#### Support Thread: https://forums.unraid.net/topic/79530-support-ich777-gameserver-dockers/
|
||||
### Support Thread: https://forums.unraid.net/topic/79530-support-ich777-gameserver-dockers/
|
@@ -51,18 +51,12 @@ else
|
||||
fi
|
||||
|
||||
echo "---Prepare Server---"
|
||||
if [ ! -f ${DATA_DIR}/.steam/sdk64/steamclient.so ]; then
|
||||
if [ ! -d ${DATA_DIR}/.steam ]; then
|
||||
mkdir ${DATA_DIR}/.steam
|
||||
fi
|
||||
if [ ! -d ${DATA_DIR}/.steam/sdk64 ]; then
|
||||
mkdir ${DATA_DIR}/.steam/sdk64
|
||||
fi
|
||||
cp -R ${STEAMCMD_DIR}/linux64/* ${DATA_DIR}/.steam/sdk64/
|
||||
if [ ! -d ${DATA_DIR}/.steam/sdk32 ]; then
|
||||
mkdir -p ${DATA_DIR}/.steam/sdk32
|
||||
cp -R ${SERVER_DIR}/bin/* ${DATA_DIR}/.steam/sdk32/
|
||||
fi
|
||||
chmod -R ${DATA_PERM} ${DATA_DIR}
|
||||
echo "---Server ready---"
|
||||
|
||||
echo "---Start Server---"
|
||||
cd ${SERVER_DIR}
|
||||
${SERVER_DIR}/game/bin/linuxsteamrt64/cs2 ${GAME_PARAMS}
|
||||
${SERVER_DIR}/srcds_run -game ${GAME_NAME} ${GAME_PARAMS} +port ${GAME_PORT}
|
@@ -38,4 +38,4 @@ while true
|
||||
do
|
||||
wait $killpid
|
||||
exit 0;
|
||||
done
|
||||
done
|
Reference in New Issue
Block a user