.steamcmd | ||
profile_data | ||
server_files | ||
workshop_mods | ||
.dockerignore | ||
.editorconfig | ||
.gitignore | ||
docker-compose.yml | ||
Dockerfile | ||
download.sh | ||
README.md | ||
run_server.sh | ||
serverDZ_extra.example.cfg | ||
serverDZ.example.cfg |
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 mydownload.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
- DayZ Server Files Documentation on DayZ Forums
- 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 is2303
(gamePort + 1 = rconPort
)
- Unless
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
- Copy
serverDZ.example.cfg
to a new file calledserverDZ.cfg
. Edit the configuration options as you see fit.- Optional: Copy extra configuration options from the
serverDZ_extra.example.cfg
file into theserverDZ.cfg
file you created.
- Optional: Copy extra configuration options from the
- 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 runningnproc
.
- Run
docker-compose up -d
to start up the server. It will download the server files intoserver_files
(unless changed indocker-compose.yml
). - 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
- Corbpie - For having a pretty solid blog post on how to set up a DayZ server on Windows. While I'm doing it on Linux, it was still useful for command-line flags and whatnot.