This project provides a small bash script (
dayzserver.sh) to manage a DayZ server on Linux: install SteamCMD, download/update DayZ server files and Workshop mods, perform backups, and help with automatic restarts.
Note: This repository is community-maintained. Use at your own risk.
If you like the project, keep the credits at the top of dayzserver.sh. Thanks! 🙏
- Installs SteamCMD and the DayZ server files
- Downloads and updates Steam Workshop mods listed in
workshop.cfg - Creates backups of mission and profile data
- Provides start/stop/restart/monitor/console commands via
dayzserver.sh
- A Linux server with a normal user account (do NOT run as
root) - Basic tools:
tmux,curl,jq,wget, and the 32-bit C runtime (lib32gcc-s1on Debian/Ubuntu)
Install example (Debian/Ubuntu):
sudo apt update
sudo apt install tmux curl jq wget lib32gcc-s1 -y- Download the script to your server home directory (example:
/home/dayz):
cd ~
curl -O https://raw.githubusercontent.com/haywardgg/DayZ_Server_Manager/main/dayzserver.sh
chmod +x dayzserver.sh- Run the script interactively (it will create
config.iniif missing):
./dayzserver.sh- Open
config.iniand update the required settings (at minimum setsteamlogin):
# Example
steamlogin=anonymous # or "username password"
port=2301
config=serverDZ.cfg-
Add Workshop mod IDs into
workshop.cfg(one numeric ID per line). The script will try to lookup mod names automatically. -
Start your server:
./dayzserver.sh start- Add one Workshop mod ID per line. Example:
123456789
987654321
- The script will download mods using SteamCMD, place them under
serverfiles/steamapps/workshop/content/221100, and create@modnamefolders insideserverfiles. - If you want mods enabled in the server launch line, add
@modname;@modname2toworkshopinconfig.ini(lowercase recommended).
Recommended crontab for the DayZ user (crontab -e as the dayz user):
@reboot /home/dayz/dayzserver.sh start > /dev/null 2>&1
*/1 * * * * /home/dayz/dayzserver.sh monitor > /dev/null 2>&1
# Optional backup every 30 minutes
# */30 * * * * /home/dayz/dayzserver.sh backup > /dev/null 2>&1monitorwill restart the server if it crashed or was shut down via RCON/messages.xml. If you intentionally stop the server with./dayzserver.sh stop,monitorwill not start it again (by design).
- Edit
config.inifor launch parameters, ports, and Discord webhook URL for mod update notifications. - Set RCon and game ports in
serverfiles/battleye/beserver_x64*.cfgandserverDZ.cfg(do not use the same port for both). - Confirm
steamQueryPortis set inserverfiles/serverDZ.cfg, e.g.steamQueryPort = 27016;
- Install & validate server files:
./dayzserver.sh install # install steamcmd and server files
./dayzserver.sh validate # validate server files with SteamCMD- Start/stop/restart/console:
./dayzserver.sh start
./dayzserver.sh stop
./dayzserver.sh restart
./dayzserver.sh console # attach to tmux console (follow prompts)- Script warns and exits if run as
root. Run as a regular user. - If SteamCMD fails, try running the SteamCMD command manually from
~/steamcmdto inspect output. - Check
~/.dayzlockfileand~/.dayzlockupdatefor status during updates/monitoring.
Made with ❤️ — enjoy running your DayZ server!