Sign inSign up

hermsi/ark-server

By hermsi

Updated about 5 hours ago

ARK-server with arkmanager, configurable by environment-variables, upon a slim debian image

Image
56

100K+

hermsi/ark-server repository overview

Build and Publish Docker Pulls Docker Repository on Quay Donate

ARK: Survival Evolved server, dockerized

Run a dedicated ARK: Survival Evolved server in Docker. The game server is installed and updated through steamcmd and managed with arkmanager (ark-server-tools), so day-to-day tasks like updates, backups and mod installs are one command away.

Scope: This image runs ARK: Survival Evolved (ASE). ARK: Survival Ascended (ASA) is a different game with a different, Windows-based server and is not covered by this image.

Registries and tags

The same image is published to three registries:

docker pull hermsi/ark-server:latest                    # Docker Hub
docker pull quay.io/hermsi1337/ark-server:latest        # Quay.io
docker pull ghcr.io/hermsi1337/ark-server:latest        # GitHub Container Registry
TagMeaning
latestMost recent build from master
latest-<unix-timestamp>Immutable snapshot of a specific latest build
tools-<sha>Build pinned to the ark-server-tools commit it was built with

Images are rebuilt from scratch every Monday at 02:00 UTC (and on every push to master), always against a freshly pulled base image. The ARK server files themselves live in your mounted volume and are installed and kept up to date at runtime via steamcmd/arkmanager — the image tag mainly determines the tooling around them.

The Dockerfile pins arkmanager to release v1.6.69 by default for reproducible local builds; published images are built against the current ark-server-tools master commit, which is what the tools-<sha> tag refers to.

Quick start

⚠️ Windows / WSL notice ⚠️

Mount the container volumes directly inside WSL's filesystem. Mounting them inside a filesystem managed by Windows causes the installation to be painfully slow or even get stuck.

docker run
# You may want to change SESSION_NAME, ADMIN_PASSWORD or the host volume
docker run -d \
  --name ark-server \
  --restart unless-stopped \
  -v "${HOME}/ark-server:/app" \
  -e SESSION_NAME="Awesome ARK is awesome" \
  -e SERVER_PASSWORD="YouShallNotPass" \
  -e ADMIN_PASSWORD="FooB4r" \
  -p 7777:7777/udp \
  -p 7778:7778/udp \
  -p 27015:27015/udp \
  -p 27020:27020/tcp \
  hermsi/ark-server:latest
docker compose
services:
  server:
    image: hermsi/ark-server:latest
    container_name: ark-server
    restart: unless-stopped
    volumes:
      - ${HOME}/ark-server:/app
    environment:
      - SESSION_NAME=Awesome ARK is awesome
      - SERVER_MAP=TheIsland
      - SERVER_PASSWORD=YouShallNotPass
      - ADMIN_PASSWORD=FooB4r
      - MAX_PLAYERS=20
      - UPDATE_ON_START=false
      - PRE_UPDATE_BACKUP=true
    ports:
      # Port for connections from the ARK game client
      - "7777:7777/udp"
      # Raw UDP socket port (always game client port +1)
      - "7778:7778/udp"
      # Steam's server-list port
      - "27015:27015/udp"
      # RCON management port
      - "27020:27020/tcp"
docker compose up -d

A ready-made compose setup with an .env file lives in the deploy/ directory of this repository.

Note: on first start the container installs the complete ARK dedicated server into your volume via steamcmd — that is a very large download. Follow the progress with docker logs -f ark-server.

Configuration

Basic configuration is done with environment variables:

VariableDefault valueExplanation
SESSION_NAMEDockerized ARK Server by github.com/hermsi1337The name of your ARK session, visible in the in-game server browser
SERVER_MAPTheIslandDesired map you want to play
SERVER_PASSWORDYouShallNotPassServer password required to join your session (overwrite with an empty string to disable password authentication)
ADMIN_PASSWORDTh155houldD3f1n3tlyB3Chang3dAdmin password for the in-game admin console and RCON
MAX_PLAYERS20Maximum number of players in your session
GAME_MOD_IDSemptyAdditional game mods to install, separated by comma (e.g. GAME_MOD_IDS=487516323,487516324,487516325)
UPDATE_ON_STARTfalseUpdate the ARK server and mods (with a backup, if configured) before each start
PRE_UPDATE_BACKUPtrueCreate a backup before updating the ARK server
BACKUP_ON_STOP *falseCreate a backup before gracefully stopping the ARK server
WARN_ON_STOP *trueBroadcast a warning upon graceful shutdown
ENABLE_CROSSPLAYfalseEnable crossplay (starts the server with -crossplay). When enabled, BattlEye should be disabled as it likes to disconnect Epic players
DISABLE_BATTLEYEfalseDisable BattlEye protection (starts the server with -NoBattlEye)
BETAemptyOpt into a Steam beta branch if necessary (e.g. BETA=preaquatica)
BETA_ACCESSCODEemptyAccess code for the chosen beta branch, if it requires one
STEAM_LOGINanonymousSteam account used by steamcmd (see Steam login session)
ARK_SERVER_VOLUME/appPath inside the container where the server files are stored
GAME_CLIENT_PORT7777Exposed game client port
UDP_SOCKET_PORT7778Raw UDP socket port (always game client port +1)
RCON_PORT27020Exposed RCON port
SERVER_LIST_PORT27015Exposed server-list (query) port
DEBUGemptySet to true for verbose (set -x) entrypoint logging

* BACKUP_ON_STOP and WARN_ON_STOP are accepted for backwards compatibility but are currently not evaluated by the entrypoint or the bundled arkmanager configuration. Use a cronjob or arkmanager backup for scheduled backups instead.

Data layout

Everything the server needs lives in the volume mounted at /app (ARK_SERVER_VOLUME):

PathPurpose
/app/serverThe ARK dedicated server installation
/app/backupBackups created by arkmanager backup
/app/logarkmanager log files
/app/stagingStaging directory for server updates
/app/crontabCron definitions loaded at container start
/app/arkmanagerPersisted arkmanager configuration (global + instance)
/app/Game.ini, /app/GameUserSettings.iniConvenience symlinks to the real config files
Tweak the configuration

After your container is up and ARK is installed you can start tweaking your configuration. Basically, you can modify every setting ark-server-tools is capable of. For reference of the available settings check their docs.

The main game config files are located at:

  • /app/server/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini
  • /app/server/ShooterGame/Saved/Config/LinuxServer/Game.ini

The entrypoint symlinks both of them into the volume root, so on the host you can simply edit <your-volume>/Game.ini and <your-volume>/GameUserSettings.ini.

The arkmanager configuration (arkmanager.cfg and the main instance config) persists in <your-volume>/arkmanager/. The bundled templates are only copied there when the files do not exist yet, so your changes survive image updates.

Alternatively, run any ark-server-tools command directly:

docker exec -u steam ark-server arkmanager status
docker exec -u steam ark-server arkmanager update --force
docker exec -u steam ark-server arkmanager installmods
docker exec -u steam ark-server arkmanager backup

For a full list of all available commands check here.

Add cronjobs

You can add cronjobs inside the container, e.g. for scheduled updates or backups. Edit the crontab file located in the server volume:

vim "${HOME}/ark-server/crontab"

Add your desired cronjobs with valid syntax (they run as the steam user):

0 4 * * * arkmanager update --warn --update-mods >> /app/log/crontab.log 2>&1
0 0 * * * arkmanager backup >> /app/log/crontab.log 2>&1

The crontab is loaded when the container starts, so apply your changes with:

docker restart ark-server
Configure a Steam login session

For steamcmd to respect your account's non-anonymous DLCs and content, mount a Steam session into the container.

First, log in once with steamcmd to create a valid session:

mkdir Steam && chown 1000:1000 Steam
docker run --rm -it -u steam \
  -v "$(pwd)/Steam:/home/steam/Steam" \
  --entrypoint /home/steam/steamcmd/steamcmd.sh \
  hermsi/ark-server '+login YOUR_STEAM_USERNAME "YOUR_STEAM_PASSWORD"'
# ...enter your Steam Guard code when prompted, then type: quit

Afterwards, set the env var STEAM_LOGIN to your username and mount the newly created Steam directory into your ARK container:

    environment:
      STEAM_LOGIN: "YOUR_STEAM_USERNAME"
    volumes:
      - ./Steam:/home/steam/Steam:rw

arkmanager will then install/update ARK using your login.

⚠️ Upgrade note: the arkmanager config in your volume is only created once and never overwritten. If your server volume was first created with an image older than timestamp 1656497302, edit line 15 of <your-volume>/arkmanager/arkmanager.cfg and replace it with: steamlogin="${STEAM_LOGIN}"

Architecture

This image is built for linux/amd64 only. Both the underlying cm2network/steamcmd base image and the ARK: Survival Evolved dedicated server are x86-only software, so arm64 builds are not possible.

Contributing and maintenance

Development, CI/CD and maintenance conventions for this repository are documented in AGENTS.md. Pull requests against master automatically get a preview image build.

Sponsors

@Skyfay - skyfay.ch

Tag summary

Content type

Image

Digest

sha256:0fb2f46b5

Size

280.1 MB

Last updated

about 5 hours ago

docker pull hermsi/ark-server