Automated dedicated Ark: Survival Evolved server
Planned features:
- Try to optimize the baking in of envs one might one to change
- Auto-Restart on mods update, with broadcast & delayed until no more players present
In order to run the server, you should perform the following operations:
The save game folder /home/steam/ark/ShooterGame/Saved
is a data volume. You should either mount in a host path or a named Docker volume container, or else Docker will create a new volume container on every start. Since Ark stores the configs inside a sub-folder Config
, we consider them part of the save game and you can edit them there (Game.ini
, GameUserSettings.ini
, ...).
You will need to publish the following ports: PORT
, RAWPORT
, and QUERYPORT
, the defaults of which are:
- 7777/udp
- 7778/udp
- 27015/udp
- 27015/tcp (if you want your server to show up in the server browser)
- 32330 (if you want rcon support, the password can be found and/or replaced in
/home/steam/ark/rcon_pass
)
Just changing the environment variables will not suffice for the server to work on a different port, probably the protocol has some ports hard-coded.
If turned on, the auto-update feature will automatically shut down the server when it's empty and the version mismatches. This means you must either configure the container to auto-restart (--restart=always
) or disable the AUTO_UPDATE=false
.
Stopping or restarting the server will cause it to try to save the save game, however the default timeout is only 10 seconds for this. In case your save is large or your machine is slow, be sure to include a longer timeout by adding -t 60
.
SERVER_NAME
must be set to your desired server name (visible in the server browser)MAP_NAME
can be set to load a different map (defaultTheIsland
), other options at the time of writing are the DLCsTheCenter
,ScorchedEarth_P
andRagnarok
MOD_LIST
can be set to a comma-separated list of mod ids to include them on the serverDIFFICULTY
can be set to anOverrideOfficialDifficulty
value, if so desired, otherwise it will not be used in the start command lineMAX_PLAYERS
can be set to change the maximum players allowed at the same time on the server (default 70)BATTLE_EYE
can be set to any value besidestrue
to disable it (defaulttrue
)RCON_HOST
can be set to the external IP/DNS that your server should be reachable onRCON_GAME_LOG_BUFFER
sets the max length of the game log via?RCONServerGameLogBuffer
(default 100)WHITELIST_PLAYERS
can be set to a comma-separated list of steamID64s which will initialize thePlayersJoinNoCheckList.txt
file, if it does not exist yet, and set-exclusivejoin
. To manage the whitelisted users you can use the RCON commandsAllowPlayerToJoinNoCheck <SteamID>
andDisallowPlayerToJoinNoCheck <SteamID>
.ADDITIONAL_COMMAND_LINE
can be set to all the additional server parameters (if they are not already supported through another env) you want to use on start-up, e.g.?NonPermanentDiseases=true?PreventOfflinePvP=true -insecure -noantispeedhack
. The Ark Gamepedia is probably a good source for this.AUTO_UPDATE
can be set to any value besidestrue
to disable it (defaulttrue
)SAVE_GAME_NAME
can be set to an individual save game name (useful mainly for clusters, game default isSavedArks
)CLUSTER_NAME
can be set to a cluster id (for-clusterid
) so that you can join multiple servers in a cluster. This will also set-NoTransferFromFiltering
. If you want to do this make sure that: -- You have multiple servers running, e.g. by creating a local image viadocker commit
and starting multiple instances (so you don't have to re-download all game files) -- All the servers have the sameCLUSTER_NAME
set -- All the servers have the same data volume mounted in -- All the servers have a distinctSAVE_GAME_NAME
set -- All the servers have the default ports in the container published to distinct ports on the host -- AFAIK the servers do not need to share a networkPORT
can be set to the desired gameport (default 7777)RAWPORT
must be set to exactlyPORT+1
(never set explicitly, is only used for exposing) (default 7778)QUERYPORT
can be set to the desired query port (default 27015)
This is how I start my non-public Ark servers for the first time at the time of developing this image:
docker run -d \
-e SERVER_NAME=<server-name> \
-e MOD_LIST=<list-of-mods> \
-e DIFFICULTY=5.0 \
-e MAX_PLAYERS=10 \
-e BATTLE_EYE=false \
-e WHITELIST_PLAYERS=<censored> \
-e ADDITIONAL_COMMAND_LINE=?AllowCrateSpawnsOnTopOfStructures=true?AllowRaidDinoFeeding=true?DestroyUnconnectedWaterPipes=true?EnableExtraStructurePreventionVolumes=false?OverrideStructurePlatformPrevention=true -ForceAllowCaveFlyers -noantispeedhack\
-e CLUSTER_NAME=xcqcluster \
-v /home/steam/ark/ShooterGame/Saved:/home/steam/ark/ShooterGame/Saved \
-p 7777:7777/udp -p 7778:7778/udp -p 27015:27015/udp \
--health-start-period=2m \
--restart=always \
xcq1/ark