Giter VIP home page Giter VIP logo

arkserver's Introduction

CircleCI Docker image Docker Pulls License

GitHub issues GitHub closed issues GitHub pull requests GitHub closed pull requests Contributors Paypal GitHub Sponsor

Docker image drpsychick/arkserver

Docker image for a dedicated ARK Survival Evolved server with arkmanager.

UPDATE August 2022: I cloned this repo and split from the original, because my PR was never accepted. The original is here: thmhoag/arkserver.

Overview

This is an image for running an ARK: Survival Evolved server in a Docker container. It is heavily based off of TuRz4m's work located here: TuRz4m/Ark-docker. It uses FezVrasta's arkmanager/ark-server-tools to manage single-instances or a cluster of ARK: Survival Evolved server inside a docker containers.

This image builds on the drpsychick/steamcmd image to include the latest version of steamcmd.

For more information on arkmanager, see the repo here: arkmanager/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 most recent build from the master branch
x.x.x (semver) release builds

Usage

Installing the image

Pull the latest (or any other desired version):

docker pull drpsychick/arkserver:latest

Running the server

To run a generic server with no configuration modifications:

$ docker run -d \
    -v steam:/home/steam/.steam/steamapps \  # 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
    drpsychick/arkserver

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
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_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
ARKCLUSTER false If true, requires ShooterGame/Saved/clusters to be mounted
ARKSERVER_SHARED `` To optionally share server binary files, use /arkserver volume, see below
LOG_RCONCHAT 0 Fetch chat commands every X seconds and log them to stdout, 0 = disabled

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

Some examples:

am_ark_ServerPassword=s3cr3t
am_ark_GameModIds=889745138,731604991
am_arkopt_clusterid=mycluster
am_arkflag_NoTransferFromFiltering=
am_arkflag_servergamelog=
am_arkflag_ForceAllowCaveFlyers=

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 The optional volumes can be used to share the server binary files or clusters files required to run an ARK cluster and be able to jump from one map to another.

Path Description
/home/steam/.steam/steamapps Directory of steamapps and workshop 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
/arkserver (optional, $ARKSERVER_SHARED) Directory that contains the server binary files from steam, shared for multiple instances
/arkserver/ShooterGame/Saved (depends) Directory that contains the game save files - must be mounted if using shared server files
/arkserver/ShooterGame/Saved/clusters (depends) Directory that contains the shared cluster files required to jump from one ARK server to another - must be mounted if using shared server files

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. More information:
/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

Running a cluster

In order to run an ARK cluster, all you need are multiple servers sharing the clusters directory and using a shared, unique clusterid - and a lot of RAM. Additionally you can share the server files, so that all servers use the same version and you don't have to store identical files twice on disk.

Example: (using the .env files in /test)

IMAGE=drpsychick/arkserver
TAG=bionic
mkdir -p theisland ragnarok arkserver arkclusters theisland/saved ragnarok/saved

# start server 1 with am_arkAutoUpdateOnStart=true
serverdir=theisland
docker run --rm -it --name $serverdir \
  --env-file test/ark-$serverdir.env \
  -v $PWD/$serverdir:/ark \
  -v $PWD/$serverdir/saved:/arkserver/ShooterGame/Saved \
  -v $PWD/arkclusters:/arkserver/ShooterGame/Saved/clusters \
  -v $PWD/arkserver:/arkserver \
  -p 27015:27015/udp -p 7778:7778/udp -p 32330:32330 \
  $IMAGE:$TAG

# wait for the server to be up, it should download all mods and the game

# start server 2+ with am_arkAutoUpdateOnStart=false
# using the SAME `arkserver` and `arkclusters` directory
serverdir=ragnarok
docker run --rm -it --name $serverdir \
  --env-file test/ark-$serverdir.env \
  -v $PWD/$serverdir:/ark \
  -v $PWD/$serverdir/saved:/arkserver/ShooterGame/Saved \
  -v $PWD/arkclusters:/arkserver/ShooterGame/Saved/clusters \
  -v $PWD/arkserver:/arkserver \
  -p 27016:27016/udp -p 7780:7780/udp -p 32331:32331 \
  $IMAGE:$TAG

# now you can reach your servers on 27015 and 27016 respectively

# cleanup
rm -rf theisland ragnarok arkserver arkclusters

To test jumping from one server to another:

  • join one server, enable cheats with enablecheats <adminpassword>
  • cheat your character the transmitter tek engram cheat GiveTekengramsTo <survivorID> transmitter
  • cheat your character a transmitter item cheat gfi TekTransmitter 1 1 0
  • place the transmitter, turn it on, enter the inventory -> you should see "travel to another server" button in the middle
  • click it and select the server you want to travel to

The survivorID is the number displayed when you hover over the specimen implant (diamond shaped item) you always have (https://ark.fandom.com/wiki/Specimen_Implant).

arkserver's People

Contributors

catzoo avatar cherrot avatar drpsychick avatar justinbyrne avatar michaeldelago avatar renovate[bot] avatar thmhoag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

arkserver's Issues

Ensure Persistent Mount for /ark/backup Folder

Subject: Enhancement Request - Ensure Persistent Mount for /ark/backup Folder


Issue Description

Problem

I encountered a map corruption, and unfortunately, the restoration process failed due to the absence of the /ark/backup folder, which was not mounted. The pod restart resulted in the loss of the backup, exacerbating the situation.

Request

I propose enhancing the current setup to ensure the persistent mounting of the /ark/backup folder. This improvement would prevent the loss of backups during pod restarts and contribute to a more robust and reliable system.

Steps to Reproduce

  1. Trigger a map corruption.
  2. Attempt to restore from backup.
  3. Observe the failure due to the /ark/backup folder not being mounted.

Expected Behavior

The /ark/backup folder should be consistently mounted, ensuring that backups persist across pod restarts and preventing data loss in the event of a map corruption.

Impact

Implementing this enhancement would positively impact the system's reliability by safeguarding backups and improving the recovery process in the face of unexpected events.

Thank you for considering this enhancement request. Feel free to reach out if further clarification or details are needed.

Build images with semver

Description of Issue

If we build images per ubuntu version with the semver of arkmanager, we can use renovate to automatically update the Helm Chart.

Additional Information

Examples

  • focal-v1.6.62
  • jammy-v1.6.62

Make crontab work

Description of Issue

crontab feature was never implemented to support environment variables. As it looks, the container will never start cron because the crontab file never contains uncommented lines.

Suggestion

Support CRONTAB_xxxx variables to append lines to crontab file, before starting cron

for var in ${!CRONTAB_@}; do 
  eval 'echo "$'$var'" >> /ark/config/crontab'; 
done

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: The following managers configured in enabledManagers are not supported: "regexManagers"

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

regex
.circleci/config.yml
  • arkmanager/ark-server-tools v1.6.62
Dockerfile
  • arkmanager/ark-server-tools v1.6.62

  • Check this box to trigger a request for Renovate to run again on this repository

Permission issue when used in a cluster

Image Setup Details

  • Image Tag: latest-master
  • Docker Host OS: talos/ubuntu
  • docker run command or docker-compose.yml file:
docker run -it  docker.io/drpsychick/arkserver:latest-master /bin/bash

Description of Issue

Description of issue: Permissions on /arkserver seem to be incorrect. Running things as a cluster fails to start. The server is downloaded, but then the executable isn't found because steam is unable to copy the downloaded files to their destination.

Additional Information

$ ls -l /
total 56
drwxr-xr-x   2 steam steam 4096 Feb  1 05:35 ark
drwxr-xr-x   2 root  root  4096 Feb 28 03:02 arkserver
lrwxrwxrwx   1 root  root     7 Jan 26 02:03 bin -> usr/bin
drwxr-xr-x   2 root  root  4096 Apr 18  2022 boot
drwxr-xr-x   5 root  root   360 Feb 28 03:02 dev
drwxr-xr-x   1 root  root  4096 Feb 28 03:02 etc
drwxr-xr-x   1 root  root  4096 Feb  1 05:05 home
lrwxrwxrwx   1 root  root     7 Jan 26 02:03 lib -> usr/lib
lrwxrwxrwx   1 root  root     9 Jan 26 02:03 lib32 -> usr/lib32
lrwxrwxrwx   1 root  root     9 Jan 26 02:03 lib64 -> usr/lib64
lrwxrwxrwx   1 root  root    10 Jan 26 02:03 libx32 -> usr/libx32
drwxr-xr-x   2 root  root  4096 Jan 26 02:03 media
drwxr-xr-x   2 root  root  4096 Jan 26 02:03 mnt
drwxr-xr-x   2 root  root  4096 Jan 26 02:03 opt
dr-xr-xr-x 374 root  root     0 Feb 28 03:02 proc
drwx------   2 root  root  4096 Jan 26 02:06 root
drwxr-xr-x   5 root  root  4096 Jan 26 02:06 run
lrwxrwxrwx   1 root  root     8 Jan 26 02:03 sbin -> usr/sbin
drwxr-xr-x   2 root  root  4096 Jan 26 02:03 srv
dr-xr-xr-x  13 root  root     0 Feb 28 03:02 sys
drwxrwxrwt   1 root  root  4096 Feb  1 05:35 tmp
drwxr-xr-x   1 root  root  4096 Jan 26 02:03 usr
drwxr-xr-x   1 root  root  4096 Jan 26 02:06 var

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.