Coder Social home page Coder Social logo

arkserver's Introduction

Thanks for the patience

As of 2021-02-18 :latest is stable and will stay that way. Changes will begin in :dev. Please communicate any issues. Thanks, jkread.

arkserver

Docker image for a dedicated ARK Server with arkmanager.

Overview

This is an image for running an ARK: Survival Evolved server in a Docker container. It uses FezVrasta's arkmanager (ark-server-tools) to managed a single-instance ARK: Survival Evolved server inside a docker container.

For more information on arkmanager, see the repo here: https://github.com/FezVrasta/ark-server-tools

Features

  • Automated install (pull the image and run, no additional commands necessary)
  • Configuration via Environment Variables
  • Easy crontab manipulation for automated backups, updates, daily restarts, weekly dino wipes, etc
  • Simple volume structure for server files, config, logs, backups, etc
  • Inherently includes all features present in arkmanager

Tags

Tag Description
latest stable build
dev working build (not-stable)

Usage

Installing the image

Pull the latest (or any other desired version):

docker pull jkread/arkserver:latest

Running the server

To run a generic server with no configuration modifications:

$ docker run -d \
    -v steam:/home/steam \  # mounted so that workshop (mod) downloads are persisted
    -v ark:/ark \  # mounted as the directory to contain the server/backup/log/config files
    -p 27015:27015 -p 27015:27015/udp \  # steam query port
    -p 7778:7778 -p 7778:7778/udp \  # gameserver port
    -p 7777:7777 -p 7777:7777/udp \ # gameserver port
    jkread/arkserver

Docker compose sample (change or remove environment variables as the suit you):

version: '3'
volumes:
  ark:
  steam:
services:
  ark:
    image: jkread/arkserver:latest
    container_name: ark
    network_mode: bridge
    restart: always
    ports:
      - 7777:7777
      - 7777:7777/udp
      - 7778:7778
      - 7778:7778/udp
      - 27015:27015
      - 27015:27015/udp
    volumes:
      - ark:/ark
      - steam:/home/steam
    environment:
      - TZ=America/Chicago
      - am_ark_SessionName=Ark Docker Session
      - am_serverMap=TheIsland
      - am_ark_ServerPassword=letmein
      - am_ark_ServerAdminPassword=pleasechangeme
      - am_ark_MaxPlayers=70
      - am_ark_QueryPort=27015
      - am_ark_Port=7778
      - am_ark_RCONPort=32330
      - am_arkwarnminutes=15
      - am_arkAutoUpdateOnStart=true
      - am_arkBackupPreUpdate=true
      - am_arkMaxBackupSizeMB=500
      - am_arkflag_crossplay=false
      - am_arkflag_NoBattlEye=true
      - am_ark_GameModIds=111111111,566885854,731604991,761535755,821530042,889745138,1404697612

If the exposed ports are modified (in the case of multiple containers/servers on the same host) the arkmanager config will need to be modified to reflect the change as well. This is required so that arkmanager can properly check the server status and so that the ARK server itself can properly publish its IP address and query port to steam.

Environment Variables

A set of required environment variables have default values provided as part of the image:

Variable Value Description
TZ N/A Timezone
am_ark_SessionName Ark Server Server name as it will show on the steam server list
am_serverMap TheIsland Game map to load
am_ark_ServerPassword N/A Server password to connect
am_ark_ServerAdminPassword k3yb04rdc4t Admin password to be used via ingame console or RCON
am_ark_MaxPlayers 70 Max concurrent players in the game
am_ark_QueryPort 27015 Steam query port (allows the server to show up on the steam list)
am_ark_Port 7778 Game server port (allows clients to connect to the server)
am_ark_RCONPort 32330 RCON port
am_arkwarnminutes 15 Number of minutes to wait/warn players before updating/restarting
am_arkflag_crossplay false Allow crossyplay with Players on Epic
am_arkAutoUpdateOnStart=true - -
am_arkBackupPreUpdate=true - -
am_arkMaxBackupSizeMB=500 - -
am_arkflag_crossplay false Allow crossyplay with Players on Epic
am_arkflag_NoBattleEye false Disable BattleEye
am_ark_GameModIds N/A List of game mod ids, comma delimited

Adding Additional Variables

Any configuration value that is available via arkmanager can be set using an environment variable. This works by taking any environment variable on the container that is prefixed with am_ and mapping it to the corresponding environment variable in the arkmanager.cfg file.

For a complete list of configuration values available, please see FezVrasta's great documentation here: arkmanager Configuration Files

Volumes

This image has two main volumes that should be mounted as named volumes or host directories for the persistence of the server install and all related configuration files. More information on Docker volumes here: Docker: Use Volumes

Path Description
/home/steam Directory of steam cache and other steamcmd-related files. Should be mounted so that mod installs are persisted between container runs/restarts
/ark Directory that will contain the server files, config files, logs and backups. More information below

Subdirectories of /ark

Inside the /ark volume there are several directories containing server related files:

Path Description
/ark/backup Location of the zipped backups genereated from the arkmaanger backup command. Compressed using bz2.
/ark/config Location of server config files. You can place customized config files here. AllowedCheaterSteamIDs.txt, Engine.ini, Game.ini, GameUserSettings.ini, crontab
/ark/log Location of the arkmanager and arkserver log files.
/ark/server Location of the server installation performed by steamcmd. This will contain the ShooterGame directory and the actual server binaries.
/ark/staging Default directory for staging game and mod updates. Can be changed using in arkmanager.cfg

GameUserSettings.ini

Example GameUserSettings.ini

Your GameUserSettings.ini must contain the following or it will be overwritten:

[/Script/ShooterGame.ShooterGameUserSettings]
Version=5

arkserver's People

Contributors

catzoo avatar cherrot avatar croydon avatar jkread avatar justinbyrne avatar michaeldelago avatar thmhoag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

arkserver's Issues

Keep getting errors on fresh install

log

Attaching to ark_TheIsland
[0m ###########################################################################
[0m # Ark Server -  Sun Apr 24 11:37:43 Europe 2022
[0m ###########################################################################
[0m Ensuring correct permissions...
[0m Cleaning up any leftover arkmanager files...
[0m Creating arkmanager.cfg from environment variables...
[0m No game files found. Installing...
[0m Running command 'install' for instance 'main'
[0m Installing ARK serverExecuting /home/steam/.steam/steamcmd/steamcmd.sh +@NoPromptForPassword 1 +login anonymous +force_install_dir /ark/server +app_update 376030 validate +quit
[0m Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
[0m Looks like steam didn't shutdown cleanly, scheduling immediate update check
[0m [  0%] Checking for available updates...
[0m [----] Verifying installation...
[0m Steam Console Client (c) Valve Corporation - version 1648077083
[0m -- type 'quit' to exit --
[0m Loading Steam API...OK
[0m "@NoPromptForPassword" = "1"
[0m �[0m
[0m Connecting anonymously to Steam Public...OK
[0m Waiting for client config...OK
[0m Waiting for user info...OK
[0m �[33;1mPlease use force_install_dir before logon!
[0m �[0m Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
[0m  Update state (0x5) verifying install, progress: 10.21 (1839051863 / 18006952591)
[0m Error! App '376030' state is 0x202 after update job.
[0m Creating crontab...
[0m Starting cron service...
[0m  * Starting periodic command scheduler cron
[0m    ...done.
[0m Loading crontab...
[0m Save file validation is not enabled.
[0m [No Backup On Start]
[0m /arkserver/arkserver.sh: line 121: [: -eq: unary operator expected
[0m /arkserver/arkserver.sh: line 153: [: -eq: unary operator expected
[0m Running command 'start' for instance 'main'
[0m [ �[0;33m WARN �[0;39m ] 	Your ARK server exec could not be found.
[0m Checking for updates before starting
[0m Checking for update; PID: 75
[0m Copying to staging directory
[0m cp: cannot stat '/ark/server/Engine/.': No such file or directory
[0m cp: cannot stat '/ark/server/linux64/.': No such file or directory
[0m cp: cannot stat '/ark/server/ShooterGame/Content/Mods/111111111/.': No such file or directory
[0m cp: cannot stat '/ark/server/ShooterGame/Content/Mods/111111111.mod': No such file or directory
[0m Downloading ARK updateExecuting /home/steam/.steam/steamcmd/steamcmd.sh +@NoPromptForPassword 1 +login anonymous +force_install_dir /ark/staging +app_update 376030 +quit
[0m Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
[0m [  0%] Checking for available updates...
[0m [----] Verifying installation...
[0m Steam Console Client (c) Valve Corporation - version 1648077083
[0m -- type 'quit' to exit --
[0m Loading Steam API...OK
[0m "@NoPromptForPassword" = "1"
[0m �[0m
[0m Connecting anonymously to Steam Public...OK
[0m Waiting for client config...OK
[0m Waiting for user info...OK
[0m �[33;1mPlease use force_install_dir before logon!
[0m �[0m Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
[0m  Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
[0m Error! App '376030' state is 0x202 after update job.
[0m Update download interrupted
[0m The server is starting...
[0m 
[0m An update is currently in progress.  Start aborted
[0m Cleaning up any leftover arkmanager files...
[0m Creating arkmanager.cfg from environment variables...
[0m No game files found. Installing...
[0m Running command 'install' for instance 'main'
[0m Installing ARK serverExecuting /home/steam/.steam/steamcmd/steamcmd.sh +@NoPromptForPassword 1 +login anonymous +force_install_dir /ark/server +app_update 376030 validate +quit
[0m Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
[0m [  0%] Checking for available updates...
[0m [----] Verifying installation...
[0m Steam Console Client (c) Valve Corporation - version 1648077083
[0m -- type 'quit' to exit --
[0m Loading Steam API...OK
[0m "@NoPromptForPassword" = "1"
[0m �[0m
[0m Connecting anonymously to Steam Public...OK
[0m Waiting for client config...OK
[0m Waiting for user info...OK
[0m �[33;1mPlease use force_install_dir before logon!
[0m �[0m Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
[0m  Update state (0x5) verifying install, progress: 91.71 (16513451079 / 18006952591)
[0m Error! App '376030' state is 0x202 after update job.
[0m Starting cron service...
[0m  * Starting periodic command scheduler cron
[0m    ...done.
[0m Loading crontab...
[0m Save file validation is not enabled.
[0m /arkserver/arkserver.sh: line 121: [: -eq: unary operator expected
[0m [No Backup On Start]
[0m /arkserver/arkserver.sh: line 153: [: -eq: unary operator expected
[0m Running command 'start' for instance 'main'
[0m [ �[0;33m WARN �[0;39m ] 	Your ARK server exec could not be found.
[0m Checking for updates before starting
[0m Checking for update; PID: 76

docker-compose.yml

version: '3'
volumes:
  ark:
  steam:
services:
  ark_TheIsland:
    image: jkread/arkserver:latest
    container_name: ark_TheIsland
    network_mode: bridge
    restart: always
    ports:
      - 7777:7777
      - 7777:7777/udp
      - 7778:7778
      - 7778:7778/udp
      - 27018:27015
      - 27018:27015/udp
    volumes:
      - ./data/ark:/ark
      - ./data/steam:/home/steam
    environment:
      - TZ=Europe/Stocholm
      - am_ark_SessionName=Lost Fury - TheIsland
      - am_serverMap=TheIsland
      - am_ark_ServerPassword=hejsan
      - am_ark_ServerAdminPassword=wdv365365
      - am_ark_MaxPlayers=70
      - am_ark_QueryPort=27015
      - am_ark_Port=7778
      - am_ark_RCONPort=32330
      - am_arkwarnminutes=15
      - am_arkAutoUpdateOnStart=true
      - am_arkBackupPreUpdate=true
      - am_arkMaxBackupSizeMB=500
      - am_arkflag_crossplay=false
      - am_arkflag_NoBattlEye=true
      # - am_ark_GameModIds=111111111,566885854,731604991,761535755,821530042,889745138,1404697612

GameUserSettings.ini

I am aware the GameUserSettings.ini for /ark/config is overwritten upon loading.

Update arkmanager

Seems its running on .57

Looking at the dockerfile i think this just needs a rebuild and publish up to dockerhub

arkflag documentation

After a bunch of testing and reading through the code of arkmanager, it looks like the value of an am_arkflag_* environment variable doesn't matter, only its existance (perhaps it needs to be set to something rather than simply existing, but the value doesn't matter as far as I can tell).
E.g. setting am_arkflag_NoBattleEye=false in my compose file results in the -NoBattleEye flag being set when starting the server.

IMO arkmanager should handle this more intelligently, but in the meantime the readme should be updated to reflect.

Bad PID ''; expected '112'

Hello there

When I try to build the docker for the Ark Server I get an error. I get this error when I use the docker compose file and when I use the docker run command.

I never got this error with the docker image from thmhoag

https://pastebin.com/4JAjNiUc

Here is the error. I used your docker compose file and this command here:

docker run -d -v steam:/home/steam -v ark:/ark -p 27015:27015 -p 27015:27015/udp -p 7778:7778 -p 7778:7778/udp -p 7777:7777 -p 7777:7777/udp jkread/arkserver

Game.ini

Hi,

It seems like the gameusersettings.ini are applied on my dedicated server, but no matter what I do the Game.ini changes are just not working.

[/script/shootergame.shootergamemode]
MatingIntervalMultiplier=0.1
EggHatchSpeedMultiplier=20
BabyMatureSpeedMultiplier=10
BabyCuddleIntervalMultiplier=0.1

What am I missing here? FezVrasta's configuration parameter's again point to changes that has to put in gameusersettings.ini

Game-fiels lost - `Copying ARK world file FAILED ` > `Saved ark file could not be found`

Hi

Have you looked into why ARK are dropping the save-files, from time to time?

Problem

In the last 30 days, it has dropped our save-files two times. In both cases, it looks like it's appx. around the same time, as the server updates the ARK-server instance.

Both times, it looks like this in the logs:

...
Success! App '376030' already up to date.
The server is already stopped
^[[0;39m Saved arks directory is /ark/server/ShooterGame/Saved/SavedArks
^[[0;39m Copying ARK world file (TheIsland) \033[0;39m\e[68G[ \033[1;31mFAILED\033[0;39m ]
Saved ark file could not be found
...

Questions

Question 1:
Is this just a flaw in the ARK server-instance, which can't be fixed?

Question 2:
It's returning Save file validation is not enabled.. Are there a (not mentioned) way of enabling this, which could help eliminate this? I've tried to search a little, but with no results.

Also, thank you for keeping the container-package running 😄 !

Logs and more

Log-snippet where the issue are happening.

###########################################################################
# Ark Server -  Fri Sep 10 21:32:27 UTC 2021
###########################################################################
Ensuring correct permissions...
Cleaning up any leftover arkmanager files...
Creating arkmanager.cfg from environment variables...
Starting cron service...
 * Starting periodic command scheduler cron
   ...done.
Loading crontab...
Save file validation is not enabled.
[No Backup On Start]
Running command 'start' for instance 'main'
Checking for updates before starting
Checking for update; PID: 40
Downloading ARK updateExecuting /home/steam/.steam/steamcmd/steamcmd.sh +@NoPromptForPassword 1 +login anonymous +force_install_dir /ark/staging +app_upda$
Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK
"@NoPromptForPassword" = "1"
^[[0m
Connecting anonymously to Steam Public...OK
Waiting for client config...OK
Waiting for user info...OK
Success! App '376030' already up to date.
The server is already stopped
^[[0;39m Saved arks directory is /ark/server/ShooterGame/Saved/SavedArks
^[[0;39m Copying ARK world file (TheIsland) \033[0;39m\e[68G[ \033[1;31mFAILED\033[0;39m ]
Saved ark file could not be found
Candidates:
^[[0;39m Copying ARK profile files
^[[0;39m   76561197-removed-.arkprofile ^[[0;39m^[[68G[   ^[[1;32mOK^[[0;39m   ]
^[[0;39m   76561198-removed-.arkprofile ^[[0;39m^[[68G[   ^[[1;32mOK^[[0;39m   ]
^[[0;39m   76561198-removed-.arkprofile ^[[0;39m^[[68G[   ^[[1;32mOK^[[0;39m   ]
^[[0;39m Copying ARK tribe files
^[[0;39m   1347441403.arktribe ^[[0;39m^[[68G[   ^[[1;32mOK^[[0;39m   ]
^[[0;39m Copying ARK tribute tribe files
^[[0;39m Copying GameUserSettings.ini ^[[0;39m^[[68G[   ^[[1;32mOK^[[0;39m   ]
^[[0;39m Copying Game.ini ^[[0;39m^[[68G[   ^[[1;32mOK^[[0;39m   ]
^[[0;39m Compressing Backup ^[[0;39m^[[68G[   ^[[1;32mOK^[[0;39m   ]
^[[0;39m Created Backup: ^[[1;32m main.2021-09-10_21.32.49.tar.bz2^[[0;39m
Applying update from staging directory
Update to 7340171 complete
The server is starting...

2021-09-10 21:32:58: start
2021-09-10 21:32:58: Running /ark/server/ShooterGame/Binaries/Linux/ShooterGameServer TheIsland\?RCONPort=32330\?SessionName=Bananheltene\?MaxPlayers=70\?$
2021-09-10 21:32:58: Server PID: 257
2021-09-10 21:33:45: server is up
Shutdown handler: initalize.
Using binned.
4.5.1-0+UE4 7038 3077 404 10
CtrlCHandler: Signal=2

As you can see, the backup main.2021-09-10_21.32.49.tar.bz2 are only a few K.

> ls -alht
total 11M
drwxr-xr-x 73 username username 4.0K Sep 11 06:30 ..
-rw-r--r--  1 username username 1.8M Sep 11 01:32 main.2021-09-10_23.32.56.tar.bz2
drwxrwxr-x  2 username username 4.0K Sep 11 01:32 .
-rw-rw-r--  1 username username 228K Sep 11 01:30 main.2021-09-10_23.30.58.tar.bz2
-rw-rw-r--  1 username username 1.8M Sep 11 00:00 main.2021-09-10_22.00.53.tar.bz2
-rw-r--r--  1 username username  13K Sep 10 23:32 main.2021-09-10_21.32.49.tar.bz2
-rw-rw-r--  1 username username 2.2M Sep 10 18:10 main.2021-09-10_16.10.02.tar.bz2
-rw-rw-r--  1 username username 2.2M Sep 10 10:10 main.2021-09-10_08.10.02.tar.bz2
-rw-rw-r--  1 username username 2.2M Sep 10 02:10 main.2021-09-10_00.10.02.tar.bz2

But.. There should be enough space on the disk?

> df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       109G   95G  8.5G  92% /

Here's a sample of the common message Save file validation is not enabled.

###########################################################################
# Ark Server -  Fri Sep 10 22:02:28 UTC 2021
###########################################################################
Ensuring correct permissions...
Cleaning up any leftover arkmanager files...
Creating arkmanager.cfg from environment variables...
Starting cron service...
 * Starting periodic command scheduler cron
   ...done.
Loading crontab...
Save file validation is not enabled.
[No Backup On Start]

SteamCMD doesn't work

I used nearly the same docker-compose as given but the log gives me the following error:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.