How long can you survive a post-apocalyptic world? A land overrun with an infected "zombie" population, where you compete with other survivors for limited resources. Will you team up with strangers and stay strong together? Or play as a lone wolf to avoid betrayal? This is DayZ – this is your story.
[!NOTE] This Egg is for the standalone version of DayZ only. It is not for the DayZ mod on Arma 2 or Arma 3.
From Bohemia Interactive's Website:
How long can you survive a post-apocalyptic world? A land overrun with an infected "zombie" population, where you compete with other survivors for limited resources. Will you team up with strangers and stay strong together? Or play as a lone wolf to avoid betrayal? This is DayZ – this is your story.
.bikey
's to the /keys/
directory.@workshopID#
format. Manually uploaded mods are not automatically updated.serverDZ.cfg
file can be easily set from the server's Startup tab
Default server ports are listed below, but all ports can be changed freely.
Port | Default | Protocol | Required | Notes |
---|---|---|---|---|
Game | 2302 | UDP | Yes | Primary port in Panel |
Steam Query | 27016 | UDP | Partially | Required for server listing |
RCON | 2305 | UDP | No | Required to be defined, but not required to be assigned to the server |
[!IMPORTANT] A real, valid Steam account is required to install this game server.
[!WARNING] Steam Guard must be completely turned off for the server and mods to download efficiently. See Running With Steam Guard Enabled for an unofficial workaround.
Bare Minimum | Recommended | |
---|---|---|
Processor | Recent x86/64 (AMD/Intel) processor. No 32-bit or ARM support. | Avoid CPU Pinning; may cause issues. |
RAM | 4096-5120 MiB | 8192 MiB |
Storage | 3072 MiB | 7168+ MiB (depends on how many mods are installed) |
Network | 0.512 Mbit/s/player | 1-5 Mbit/s/player |
Host OS | Most stable Linux OS branches should work | Using the latest kernel version for your installed OS can prevent some edge-case installation/boot issues. |
While not required, it is highly recommended that the Steam account used to install this server owns the DayZ game for the following reasons:
mpmissions/
directory and reinstalling the server (this will not erase other files).1
if they would not like to offer this functionality to clients.The following are highly recommended variable modifications you can make to the egg after importing it to your panel. While viewing this egg, simply go to the "Variables" tab of the egg editor to make these changes.
[!CAUTION] The following is highly discouraged for production environments or even private use. It should only be used if you really don't want to disable Steam Guard and don't plan on updating your server/mods often. Support will not be given to those with Steam Guard enabled. Additionally, using this method, you are at risk of rate limiting your account if something goes wrong.
1
.Loading Steam API...OK
. You will likely receive a Steam Guard request for login at this time. Approve this request just to be safe, but this will not log you in. Next, obtain a valid Steam Guard code, enter it into the console, and press Enter to submit it. This should log you in. It is successful if you see: Two-factor code:OK
. The server will then download for the first time. Note: It may glitch and not display installation progress; be patient while it downloads and verifies.
Name | Tag |
---|---|
ghcr.io/ptero-eggs/games:dayz | ghcr.io/ptero-eggs/games:dayz |
Name | Description | Environment Variable | Default Value | User Viewable | User Editable |
---|---|---|---|---|---|
[Host] Steam Query Port | UDP port for Steam server list features. Helps the server be visible in the client server browser. | QUERY_PORT | 27016 | Yes | No |
[Host] Steam Username | Used for installation and updates. Account does not need to own DayZ, but MUST BE a VALID Steam account (anonymous login cannot be used). For security reasons it is recommended that you create a new Steam account just for your dedicated servers. *This info is not visible to the server owner.* | STEAM_USER | No | No | |
[Host] Steam Password | Used for installation and updates. Steam Guard MUST be completely TURNED OFF for the server and mods to download efficiently. *This info is not visible to the server owner, BUT IS stored in PLAIN TEXT. It is NOT advised to use a personal account; best to use a dummy account.* | STEAM_PASS | No | No | |
[Host] Disable Mod Downloads/Updates | If the Steam account does not own the base DayZ game, Steam Workshop mod downloads/updates will not work. If so, this setting allows disabling of this feature to avoid errors. (1 ON | 0 OFF) | DISABLE_MOD_UPDATES | 0 | No | No |
[Host] Number of SteamCMD Retry Attempts | How many times SteamCMD should retry downloading a server or mod after a recoverable error. (ie. A particularly large mod download times out) | STEAMCMD_ATTEMPTS | 3 | No | No |
[Host] Skip Game Server Install | Skips the installation of game server files via SteamCMD during the installation script. Should only be enabled if you are trying to install the server with a Steam account that has Steam Guard enabled (not recommended). | SKIP_INSTALL | 0 | No | No |
Automatic Updates | Quickly checks for any server or mod updates on startup, and updates if necessary. | UPDATE_SERVER | 1 | Yes | Yes |
Server Name | Name of the server that will appear in the server list. | SERVER_HOSTNAME | DayZ Server | Yes | Yes |
Max Players | Maximum number of players allowed to join the server. | MAX_PLAYERS | 64 | Yes | Yes |
Server Password | Password required to join the server. Leave blank to have no password. | SERVER_PASSWORD | Yes | Yes | |
Admin Password | Password to log in as an admin on the server. | ADMIN_PASSWORD | Yes | Yes | |
RCON Port | Used by Tools or Battlemetrics to manage servers from outside. RCON Port is recommended to be at Game Port +3. For example, If the Game Port is 2302, then RCON Port should be 2305. | RCON_PORT | 2305 | Yes | No |
RCON Password | This password is used to authenticate third parties to access server controls via RCON. | RCON_PASSWORD | Yes | Yes | |
Modlist File (Exported from DayZ Launcher) | Filename for an exported modlist. This file will be parsed for mod installation and loading. Upload your HTML file to the root directory (eg. /home/container/modlist.html). Leave blank to disable loading mods from a modlist. | MOD_FILE | modlist.html | Yes | Yes |
Additional Mods | A semicolon-separated list of mod folders to load from the root directory. Useful for loading manually uploaded mods. Any mods in this list that are in "@workshopID" form will also be included in Automatic Updates (if enabled). NO capital letters, spaces, or folders starting with a number! (ex. myMod;@123456789;@987654321;etc;) | MODIFICATIONS | Yes | Yes | |
Verify Signatures | Ensures all clients have exactly the same version of mods or addons that the server is running. Otherwise, they will be kicked upon connection. (2 ON | 0 OFF) | VERIFY_SIGNATURES | 2 | Yes | Yes |
Enforce Game Version | When ON, the server will allow the connection only to clients with same the version as the server. | ENFORCE_BUILD | 1 | Yes | Yes |
Disable VoN | When ON, will disable Voice over Network (voice chat) in the server. | DISABLE_VON | 0 | Yes | Yes |
VoN Quality | Voice over Network codec quality; the higher the better. (Values 0-30) | VON_QUALITY | 20 | Yes | Yes |
Disable Third Person | When ON, will disable third person view while on the server. | DISABLE_THIRD | 0 | Yes | Yes |
Disable Crosshair | When ON, will disable the crosshair from being visible while on the server. | DISABLE_CROSSHAIR | 0 | Yes | Yes |
Disable Personal Light | When ON, will disable a personal light positioned above all clients during the night time while on the server. | DISABLE_PERSONAL_LIGHT | 1 | Yes | Yes |
Darker Nights | When ON, will make nights darker (more accurate nights, but hard to see without a light). | LIGHTING_CONFIG | 0 | Yes | Yes |
Persistent Time | The actual server time is saved to storage, so when ON, the next server start will use the saved time value. | PERSISTENT_TIME | 0 | Yes | Yes |
Time Multiplier | This is a time multiplier for in-game time (ie. 12 would move a full 24-hour day in-game 12 times faster, making it last 2 hours "in real life"). (Values: 0-24) | TIME_MULT | 12 | Yes | Yes |
Night Multiplier | This is an additional multiplier to either speed up or slow down nights in-game. It is multiplied with the "Time Multiplier" variable to get it's final multiplier for night time speed. (Values: 0.1-64.0) | NIGHT_MULT | 1 | Yes | Yes |
[Repair] Make Mod Files Lowercase | Every mod that is set to be loaded will have its folder and files changed to lowercase (to prevent errors). It is recommended to enable this for one server boot after copying a mod from a Windows machine to the server, or if mods seem to not be loading. | MODS_LOWERCASE | 0 | Yes | Yes |
[Repair] Validate Server Files | Validates all server files when Automatic Updates is ON. Note: This will significantly increase server startup times, so it is recommended to only enable this when needed. | VALIDATE_SERVER | 0 | Yes | Yes |
[Advanced] Server-Side Only Mods | Mod folders to be used with the "-serverMods" startup option. They only run server-side and are not required by clients if "Verify Signatures" is ON. Any mods in this list that are in "@workshopID" form will also be included in Automatic Updates (if enabled). NO capital letters, spaces, or folders starting with a number! Each folder must be followed with a semicolon (ex. @123456789;@987654321;etc;) | SERVERMODS | Yes | Yes | |
[Advanced] Extra Startup Parameters | See https://community.bistudio.com/wiki/DayZ:Server_Configuration#Launch_Parameters for more info on valid flags for this field. | STARTUP_PARAMS | -dologs -adminlog -netlog -freezecheck | Yes | Yes |
[Advanced] Server Binary | Cannot currently be changed. Left in case other branches with different executable names are introduced at a later date. | SERVER_BINARY | DayZServer | Yes | No |
[Advanced] DayZ Dedicated Server App ID | Used for installation and updates. Rarely needs to be changed. 223350 is for Stable branch and 1042420 is for experimental branch. Changing branches may require deleting all server files and reinstalling. | STEAMCMD_APPID | 223350 | Yes | No |
#!/bin/bash
## File: Pterodactyl DayZ Egg - egg-pterodactyl-day-z.json
## Author: David Wolfe (Red-Thirten)
## Date: 2024/07/04
## License: MIT License
## Image to install with is 'ghcr.io/ptero-eggs/installers:debian'
export HOME=/mnt/server
CONFIG_URL="https://raw.githubusercontent.com/ptero-eggs/game-eggs/main/dayz/config/serverDZ.cfg"
MISSIONS_GITHUB_PACKAGE="BohemiaInteractive/DayZ-Central-Economy"
## Download and install SteamCMD
cd /tmp
mkdir -p $HOME/steamcmd $HOME/steamapps
curl -sSL -o steamcmd.tar.gz https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xzvf steamcmd.tar.gz -C $HOME/steamcmd
cd $HOME/steamcmd
# SteamCMD fails otherwise for some reason, even running as root.
# This is changed at the end of the install process anyways.
chown -R root:root /mnt
if [ "$SKIP_INSTALL" -eq 1 ]; then
# This is for the minority of hosts who want to install this server with Steam Guard enabled.
# Please read the README for instructions on how to do this properly!
echo -e '"Skip Game Server Install" variable is set to enabled!'
echo -e "\tOnly SteamCMD will be installed..."
./steamcmd.sh +quit
else
# Install/Verify game server using SteamCMD
./steamcmd.sh +force_install_dir $HOME "+login \"${STEAM_USER}\" \"${STEAM_PASS}\"" +app_update ${STEAMCMD_APPID} $( [[ -z ${STEAMCMD_BETAID} ]] || printf %s "-beta ${STEAMCMD_BETAID}" ) $( [[ -z ${STEAMCMD_BETAPASS} ]] || printf %s "-betapassword ${STEAMCMD_BETAPASS}" ) ${INSTALL_FLAGS} validate +quit
fi
echo -e ""
# Set up 32 and 64 bit libraries
mkdir -p $HOME/.steam/sdk{32,64}
cp -v linux32/steamclient.so $HOME/.steam/sdk32/steamclient.so
cp -v linux64/steamclient.so $HOME/.steam/sdk64/steamclient.so
## DayZ Setup
cd $HOME
# Check for successful server binary installation
if [ ! -f DayZServer ] && [ "$SKIP_INSTALL" -ne 1 ]; then
echo -e "\n\n[ERROR] SteamCMD failed to install the DayZ Dedicated Server!"
echo -e "\tTry reinstalling the server again.\n"
exit 1
fi
# Download default serverDZ.cfg if it is missing or empty (occurs when Steam account *owns* the DayZ game)
if [ ! -f serverDZ.cfg ] || [ ! -s serverDZ.cfg ]; then
echo -e "'serverDZ.cfg' is missing or empty. Downloading default config file..."
curl -LO ${CONFIG_URL}
if [ ! -f serverDZ.cfg ]; then
echo -e "\n\n[ERROR] Failed to download default server config file!"
exit 1
fi
chmod 644 serverDZ.cfg
fi
# Add required 'steamQueryPort' parameter to the end of serverDZ.cfg (if it's missing)
if ! grep -q "steamQueryPort" serverDZ.cfg; then
echo -e "Adding additional required parameters to the end of 'serverDZ.cfg'..."
cat >> serverDZ.cfg << EOL
steamQueryPort = ${QUERY_PORT};
EOL
fi
# Download vanilla mission files if they are missing (occurs when Steam account *does not own* the DayZ game)
if { [ ! -d "mpmissions" ] || [ -z "$(ls -A mpmissions 2>/dev/null)" ]; } && [ "$SKIP_INSTALL" -ne 1 ]; then
echo -e "[WARNING] The Steam account used to install this server does not own the DayZ game!"
echo -e "\tVanilla mission files will have to be MANUALLY updated in the future if they update! (See Egg's README for instructions)"
echo -e "\tDownloading and installing vanilla mission files..."
mkdir -p $HOME/mpmissions
cd $HOME/mpmissions
LATEST_JSON=$(curl --silent "https://api.github.com/repos/${MISSIONS_GITHUB_PACKAGE}/releases/latest")
DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq -r .tarball_url)
curl -Lo mpmissions.tar.gz ${DOWNLOAD_URL}
if [ ! -f mpmissions.tar.gz ]; then
echo -e "\n\n[ERROR] Failed to download vanilla mission files!"
exit 1
fi
tar -xzvf mpmissions.tar.gz --strip-components=1 --wildcards '*/dayzOffline.chernarusplus/*' '*/dayzOffline.enoch/*'
rm -f mpmissions.tar.gz
fi
# Check for BattlEye RCon configuration
mkdir -p $HOME/battleye
cd $HOME/battleye
if [ ! -f beserver_x64.cfg ]; then
echo -e "Creating BattlEye RCon Configuration..."
cat > beserver_x64.cfg << EOF
RConPort ${RCON_PORT}
RConPassword ${RCON_PASSWORD}
RestrictRCon 0
EOF
fi
echo -e "\nDayZ Dedicated Server successfully installed!\n"