1
0
Messing around with a DayZ Docker setup
Go to file
2021-09-13 16:52:29 +02:00
.steamcmd [Initial] Initial commit with helper scripts and whatnot 2021-09-09 13:09:44 +02:00
profile_data [Initial] Initial commit with helper scripts and whatnot 2021-09-09 13:09:44 +02:00
server_files [Initial] Initial commit with helper scripts and whatnot 2021-09-09 13:09:44 +02:00
workshop_mods [Initial] Initial commit with helper scripts and whatnot 2021-09-09 13:09:44 +02:00
.dockerignore [Initial] Initial commit with helper scripts and whatnot 2021-09-09 13:09:44 +02:00
.editorconfig Add setup instructions in README 2021-09-10 15:41:37 +02:00
.gitignore [Initial] Initial commit with helper scripts and whatnot 2021-09-09 13:09:44 +02:00
docker-compose.yml Docker Compose - Persist SteamCMD 2021-09-13 15:48:41 +02:00
Dockerfile Run SteamCMD updates of server via the entrypoint, now that anonymous login works 2021-09-13 13:08:10 +02:00
download.sh Use 'anonymous' for downloading server files, apparently that works now 2021-09-10 15:59:25 +02:00
README.md Add links to handy DayZ server resources in README 2021-09-13 16:52:29 +02:00
run_server.sh Run SteamCMD updates of server via the entrypoint, now that anonymous login works 2021-09-13 13:08:10 +02:00
serverDZ_extra.example.cfg Add setup instructions in README 2021-09-10 15:41:37 +02:00
serverDZ.example.cfg [Initial] Initial commit with helper scripts and whatnot 2021-09-09 13:09:44 +02:00

linux-dayz-docker

For 1.14 experimental, Linux support for servers was finally released. This is my half-assed attempt at creating a Docker container for running a (barebones) DayZ server.

Requirements

  • System/server specifications matching the minimum requirements
    • During my testing I was running a VM with 6 dedicated threads and 32 GB RAM, on Debian 11 (though OS doesn't matter much).
    • By default the docker-compose.yml file limits the memory usage to 8 GB (mem_limit). Feel free to tweak as you see fit for your system.
    • From my experience: 3 threads/cores + 5 GB RAM available for the DayZ server is the absolute minimum.
  • A Linux OS with bash installed, as I have no idea if my download.sh script is POSIX-compatible.
    • I use Debian 11 (Bullseye) as I'm writing, but other major OSes such as Ubuntu/CentOS will likely work just fine.
  • Familiarity with the Linux commandline is a "must", as this isn't really intended for "Linux newbies".
  • Server also needs Docker & Docker Compose installed
  • Workshop content only: A Steam account with DayZ
    • It seems Steam does not allow downloading workshop content "anonymously", nor can you download workshop content for games you do not own on Steam.

Useful resources

  1. DayZ Server Files Documentation on DayZ Forums
  2. DayZ Server Configuration on Bohemia's wiki
    • Some duplicate information that's also included in #1.

Things that need to be done manually at the moment

  • Mount the whitelist.txt / priority.txt files in the Docker Compose file
  • Remote access via RCON isn't enabled by default. You can configure that by following the steps on Bohemia's wiki
    • Unless -bePath is used, the path for BattlEye should be: server_files/battleye/beserver_x64.cfg
    • You will also need to forward the RCON port in the docker-compose.yml file. By default I think it is 2303 (gamePort + 1 = rconPort)

Known issues

  • Crashes. Server will often crash and "hang". I haven't been able to look into why, nor how to detect it. You'll just have to watch logs and manually restart accordingly (docker-compose down && docker-compose up -d).
    • There doesn't seem to be a good way to really detect it, as the server seems to still respond to "queries" and acting responsive, even if it has crashed.

Setup

  1. Copy serverDZ.example.cfg to a new file called serverDZ.cfg. Edit the configuration options as you see fit.
    • Optional: Copy extra configuration options from the serverDZ_extra.example.cfg file into the serverDZ.cfg file you created.
  2. Edit the file docker-compose.yml to match your server specs/needs.
    • Make sure all the paths (volumes), environment variables (for extra configuring) and memory limit matches what you want to limit your system to.
    • CPU_COUNT is practically "thread count" from what I understand. Easiest way to get that number is running nproc.
  3. Run docker-compose up -d to start up the server. It will download the server files into server_files (unless changed in docker-compose.yml).
  4. Optional: Run docker-compose logs -ft to watch the console/server logs. Hit CTRL+C to get out of the logs.

Once you're done with the server, run docker-compose down to shut the server/container down.
If you wanna boot it back up, just run docker-compose up -d again.

Server updates will run using SteamCMD every time the server is started back up, so it might take a few extra seconds.

Workshop content

For workshop content, run ./download.sh -w WORKSHOP_ID_HERE, which will prompt you for your Steam username and a "Workshop mod name".
Specifically for DayZ workshop content you need a Steam account that owns DayZ.

  • The "Workshop mod name" is used to create a folder within server_files/<Workshop Mod Name Here>, where mod files are later copied into.
  • All workshop content will be downloaded to the workshop_mods folder.

I am not entirely sure if this is the correct method. I have literally zero experience with DayZ servers, so you might have to look into proper methods yourself.

Thanks to