Sign inSign up

mornedhels/enshrouded-server

By mornedhels

Updated about 2 months ago

Enshrouded-Dedicated-Server with autoupdate (supervisord)

Image
Integration & delivery
Operating systems
42

100K+

mornedhels/enshrouded-server repository overview

Enshrouded-Dedicated-Server

Docker Pulls Docker Stars Docker Image Size (tag) GitHub

GitHub

Docker image for the game Enshrouded. The image is based on the steamcmd image and uses supervisor to handle startup, automatic updates and cleanup.

Environment Variables

VariableRequiredDefaultContraintsDescriptionWIP
SERVER_NAMEEnshrouded ServerstringThe name of the server
SERVER_SLOT_COUNT16integer (1-16)Max allowed concurrent players
SERVER_QUERYPORT15637integerThe steam query port for the server
SERVER_IP0.0.0.0string (ipv4)Server IP for internal network configuration
SERVER_SAVE_DIR./savegamestringFolder for savegames (relative and absolute paths are supported)
SERVER_LOG_DIR./logsstringFolder for logs (relative and absolute paths are supported)
SERVER_VOICE_CHAT_MODEProximityProximity | GlobalThis setting allows switching between the proximity voice chat and the global, server-wide voice chat
SERVER_ENABLE_VOICE_CHATfalseboolean (true, false)This setting allows switching voice chat completely off or enabling it.
SERVER_ENABLE_TEXT_CHATfalseboolean (true, false)This setting allows switching text chat completely off or enabling it.
PUID4711integerThe UID to run server as (file permission)
PGID4711integerThe GID to run server as (file permission)
UPDATE_CRONstring (cron format)Update game server files cron (eg. */30 * * * * check for updates every 30 minutes)
UPDATE_CHECK_PLAYERSfalseboolean (true, false)Should the update check if someone is connected
BACKUP_CRONstring (cron format)Backup game server files cron (eg. */15 * * * * backup saves every 15 minutes) - don't set cron under 10 minutes
BACKUP_DIR./backupsstringFolder for backups (relative and absolute paths are supported)
BACKUP_MAX_COUNT0integerNumber of backups to keep (0 means infinite)
RESTART_CRONstring (cron format)Restart game server cron (eg. 0 3 * * * restart server daily at 3)⚠️
RESTART_CHECK_PLAYERSfalseboolean (true, false)Should the restart check if someone is connected⚠️
GAME_BRANCHpublicstringSteam branch (eg. testing) of the Enshrouded server
STEAMCMD_ARGSvalidatestringAdditional steamcmd args for the updater
SERVER_PASSWORD ⚠️DEPRECATEDstring⚠️ DEPRECATED: The password for the server (Enshrouded ignores this value - use Server Roles instead)
Server Rolesfurther informations can be found following the link
Server Difficultyfurther informations can be found following the link⚠️

All environment Variables prefixed with SERVER, are the available enshrouded_server.json options (see Enshrouded Docs)

⚠️: Work in Progress

Additional Information
  • During the update process, the container temporarily requires more disk space (up to 2x the game size).
  • Server role configuration can be done via the enshrouded_server.json file directly or the SERVER_ROLE_<index>_XYZ environment vars. The file is located in the game/server folder. More information can be found in the official documentation.
Hooks
VariableDescriptionWIP
BOOTSTRAP_HOOKCommand to run after general bootstrap
UPDATE_PRE_HOOKCommand to run before update
UPDATE_POST_HOOKCommand to run after update
BACKUP_PRE_HOOKCommand to run before backup & cleanup
BACKUP_POST_HOOKCommand to run after backup & cleanup
RESTART_PRE_HOOKCommand to run before server restart
RESTART_POST_HOOKCommand to run after server restart

The scripts will wait for the hook to resolve/return before continuing.

⚠️: Work in Progress

Image Tags

TagVirtualizationDescription
latestprotonLatest image based on proton
<version>protonPinned image based on proton (>= 1.x.x)
stable-protonprotonSame as latest image
<version>-protonprotonPinned image based on proton
stable-winewineLatest image based on wine
<version>-winewinePinned image based on wine
dev-protonprotonDev build based on proton
dev-winewineDev build based on wine
dev-wine-stagingwineDev build based on wine (staging branch)

Ports (default)

PortDescription
15637/udpSteam query port

Volumes

VolumeDescription
/opt/enshroudedGame files (steam download path)

Note: By default the volumes are created with the UID and GID 4711 (that user should not exist). To change this, set the environment variables PUID and PGID.

  • CPU: >= 6 cores
  • RAM: >= 16 GB
  • Disk: >= 30 GB (preferably SSD)

Official Docs

Usage

Docker
docker run -d --name enshrouded \
  --hostname enshrouded \
  --restart=unless-stopped \
  -p 15637:15637/udp \
  -v ./game:/opt/enshrouded \
  -e SERVER_NAME="Enshrouded Server" \
  -e UPDATE_CRON="*/30 * * * *" \
  -e PUID=4711 \
  -e PGID=4711 \
  mornedhels/enshrouded-server:latest
Docker Compose
services:
  enshrouded:
    image: mornedhels/enshrouded-server:latest
    container_name: enshrouded
    hostname: enshrouded
    restart: unless-stopped
    stop_grace_period: 90s
    ports:
      - "15637:15637/udp"
    volumes:
      - ./game:/opt/enshrouded
    # only add ntsync device if your kernel supports it (6.14 or newer)
    devices:
      - /dev/ntsync:/dev/ntsync
    environment:
      - SERVER_NAME=Enshrouded Server
      - UPDATE_CRON=*/30 * * * *
      - PUID=4711
      - PGID=4711

Note: The volumes are created next to the docker-compose.yml file. If you want to create the volumes, in the default location (eg. /var/lib/docker) you can use the following compose file:

services:
  enshrouded:
    image: mornedhels/enshrouded-server:latest
    container_name: enshrouded
    hostname: enshrouded
    restart: unless-stopped
    stop_grace_period: 90s
    ports:
      - "15637:15637/udp"
    volumes:
      - game:/opt/enshrouded
    # only add ntsync device if your kernel supports it (6.14 or newer)
    devices:
      - /dev/ntsync:/dev/ntsync
    environment:
      - SERVER_NAME=Enshrouded Server
      - UPDATE_CRON=*/30 * * * *
      - PUID=4711
      - PGID=4711

volumes:
  game:

Security Hardening

For information on how to run the Enshrouded server more securely, please refer to the Security Hardening guide.

Backup

The image includes a backup script that creates a zip file of the last saved game state. To enable backups, set the BACKUP_CRON environment variable. To limit the number of backups, set the BACKUP_MAX_COUNT environment variable.

To restore a backup, stop the server and simply extract the zip file to the savegame folder and start the server up again. If you want to keep the current savegame, make sure to make a backup before deleting or overwriting the files.

Warning

Verify the permissions of the extracted files. The files should be owned by the user with the UID and GID set in the environment variables. If the image is running in privileged mode, the files will be automatically chowned to the given `UID` and `GID`.

Commands

  • Force Update:
    docker compose exec enshrouded supervisorctl start enshrouded-force-update
    
  • Reset Server Roles: (Restarts the whole docker container) ⚠️
    docker compose exec enshrouded supervisorctl start enshrouded-reset-roles
    
  • Restart Enshrouded Server: (can be used for periodic restarts)
    docker compose exec enshrouded supervisorctl restart enshrouded-server
    

Known Issues

  • The server doesn't start (not logging 'HostOnline' (up)!) or the update fails with following error:
    Error! App '2278520' state is 0x202 after update job.
    
    This means there is probably something wrong with your file permissions, or you don't have enough disk space left. Make sure the UID and GID are correct and the files are owned by the correct user.
  • The (auto-)update fails with the following error:
    Error! App '2278520' state is 0x6 after update job.
    
    Officially this means the updater has no connection to the content servers.
    But there could also be something wrong with the steam appmanifest (#119). To fix this, you can use the force update command.

Tag summary

Content type

Image

Digest

sha256:85978a10f

Size

700.2 MB

Last updated

3 months ago

docker pull mornedhels/enshrouded-server