DayZ
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.
egg-dayz.json
updated
Ports
Add an allocation on the node for each port.
- Game 2302
- Steam Query 27016
- RCON 2305
Install
- Installer image
- ghcr.io/ptero-eggs/installers:debian
- Steam login
- required
- Install script
- 102 lines
Image
- dayz image ghcr.io/ptero-eggs/games:dayz
Panel features
- steam_disk_space
The Panel tells the user when SteamCMD does not have enough disk space.
Startup
The Panel runs this command to start the server. It replaces each variable in the command with the value of that variable.
32 variables
Startup command
./DayZServer -port=2302 -profiles=profiles -bepath=./ -config=serverDZ.cfg -mod={{CLIENT_MODS}} -serverMod={{SERVERMODS}} -dologs -adminlog -netlog -freezecheckDotted values come from the server settings. These values are examples.
UDP port for Steam server list features. Helps the server be visible in the client server browser.
QUERY_PORTUsers can see
required|integer|between:1024,65536
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_USERUsers cannot see
required|string|not_in:anonymousA value is required.
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_PASSUsers cannot see
required|stringA value is required.
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_UPDATESUsers cannot see
boolean
How many times SteamCMD should retry downloading a server or mod after a recoverable error. (ie. A particularly large mod download times out)
STEAMCMD_ATTEMPTSUsers cannot see
required|integer
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_INSTALLUsers cannot see
boolean
Quickly checks for any server or mod updates on startup, and updates if necessary.
UPDATE_SERVERUsers can edit
boolean
Name of the server that will appear in the server list.
SERVER_HOSTNAMEUsers can edit
required|string
Maximum number of players allowed to join the server.
MAX_PLAYERSUsers can edit
required|integer|gt:0
Password required to join the server. Leave blank to have no password.
SERVER_PASSWORDUsers can edit
nullable|string
Password to log in as an admin on the server.
ADMIN_PASSWORDUsers can edit
nullable|string
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_PORTUsers can see
required|integer|between:1024,65536
This password is used to authenticate third parties to access server controls via RCON.
RCON_PASSWORDUsers can edit
required|string|max:20A value is required.
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_FILEUsers can edit
nullable|string
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;)
MODIFICATIONSUsers can edit
nullable|string
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_SIGNATURESUsers can edit
required|string|in:0,2
When ON, the server will allow the connection only to clients with same the version as the server.
ENFORCE_BUILDUsers can edit
boolean
When ON, will disable Voice over Network (voice chat) in the server.
DISABLE_VONUsers can edit
boolean
Voice over Network codec quality; the higher the better. (Values 0-30)
VON_QUALITYUsers can edit
required|integer|between:0,30
When ON, will disable third person view while on the server.
DISABLE_THIRDUsers can edit
boolean
When ON, will disable the crosshair from being visible while on the server.
DISABLE_CROSSHAIRUsers can edit
boolean
When ON, will disable a personal light positioned above all clients during the night time while on the server.
DISABLE_PERSONAL_LIGHTUsers can edit
boolean
When ON, will make nights darker (more accurate nights, but hard to see without a light).
LIGHTING_CONFIGUsers can edit
boolean
The actual server time is saved to storage, so when ON, the next server start will use the saved time value.
PERSISTENT_TIMEUsers can edit
boolean
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_MULTUsers can edit
required|integer|between:0,24
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_MULTUsers can edit
required|numeric|between:0.1,64
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_LOWERCASEUsers can edit
boolean
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_SERVERUsers can edit
boolean
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;)
SERVERMODSUsers can edit
nullable|string
See https://community.bistudio.com/wiki/DayZ:Server_Configuration#Launch_Parameters for more info on valid flags for this field.
STARTUP_PARAMSUsers can edit
nullable|string
Cannot currently be changed. Left in case other branches with different executable names are introduced at a later date.
SERVER_BINARYUsers can see
required|string|in:DayZServer
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_APPIDUsers can see
required|integer|in:223350,1042420
Wings
- Stop command
- ^C (SIGINT)
- Running when the console shows
- Mission read.
Files Wings edits
Wings sets these values in these files before each start.
serverDZ.cfg file
- hostname =
- hostname = "{{env.SERVER_HOSTNAME}}";
- password =
- password = "{{env.SERVER_PASSWORD}}";
- passwordAdmin =
- passwordAdmin = "{{env.ADMIN_PASSWORD}}";
- maxPlayers
- maxPlayers = {{env.MAX_PLAYERS}};
- verifySignatures
- verifySignatures = {{env.VERIFY_SIGNATURES}};
- forceSameBuild
- forceSameBuild = {{env.ENFORCE_BUILD}};
- disableVoN
- disableVoN = {{env.DISABLE_VON}};
- vonCodecQuality
- vonCodecQuality = {{env.VON_QUALITY}};
- disable3rdPerson
- disable3rdPerson = {{env.DISABLE_THIRD}};
- disableCrosshair
- disableCrosshair = {{env.DISABLE_CROSSHAIR}};
- disablePersonalLight
- disablePersonalLight = {{env.DISABLE_PERSONAL_LIGHT}};
- lightingConfig
- lightingConfig = {{env.LIGHTING_CONFIG}};
- serverTimeAcceleration
- serverTimeAcceleration = {{env.TIME_MULT}};
- serverNightTimeAcceleration
- serverNightTimeAcceleration = {{env.NIGHT_MULT}};
- serverTimePersistent
- serverTimePersistent = {{env.PERSISTENT_TIME}};
- steamQueryPort
- steamQueryPort = {{env.QUERY_PORT}};
battleye/beserver_x64.cfg file
- RConPort
- RConPort {{env.RCON_PORT}}
- RConPassword
- RConPassword {{env.RCON_PASSWORD}}
Readme
DayZ
[!NOTE] This Egg is for the standalone version of DayZ only. It is not for the DayZ mod on Arma 2 or Arma 3.
Authors / Contributors
Game Description
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.
Egg Capabilities
- Able to download server updates on startup
- Able to download, update, and load Steam Workshop mods on startup (*see Installation/System Requirements: Game Ownership)
- Also accepts server-side only mods.
- Checks for mod updates against their Steam Workshop page's last update for quick and efficient update checks.
- Automatically moves mod
.bikey's to the/keys/directory. - Note: These features only work with mods in the
@workshopID#format. Manually uploaded mods are not automatically updated.
- Multiple basic settings found within the
serverDZ.cfgfile can be easily set from the server's Startup tab- Server name, passwords, disable third person, persistent time, and more...
- Max Players is configurable and able to be host enforced (*see Recommended Egg Modifications)
- Additional DayZ startup parameters can be added to fine-tune performance
- WHMCS compatible (*see Recommended Egg Modifications)
Server Ports
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 |
Installation/System Requirements
[!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. |
Game Ownership:
While not required, it is highly recommended that the Steam account used to install this server owns the DayZ game for the following reasons:
- Vanilla mission files will only update automatically with the server if the game is owned.
- They can still be manually updated by deleting the
mpmissions/directory and reinstalling the server (this will not erase other files).
- They can still be manually updated by deleting the
- Automatic Steam Workshop mod downloading requires ownership.
- This is optional functionality, and mods can be manually uploaded to the server if desired.
- Hosts may feel free to change the "[Host] Disable Mod Downloads/Updates" variable to
1if they would not like to offer this functionality to clients.
Recommended Egg Modifications
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.
Default Steam Username & Password
- To make deploying servers easy (or if you are using WHMCS), it is recommended to edit the default values of "Steam Username" and "Steam Password" to your Steam account dedicated for hosting. This will make all newly installed servers use these credentials. DO NOT make these fields visible to the end user so that they can use their own Steam accounts; the panel will save their Steam credentials in plain text, which is a BIG NO NO for security and privacy.
Restrict Max Players
- If you would like to restrict the maximum number of players that can join your client's server, you can change the permissions of the "Max Players" variable so that clients can only view this value (and not edit it). It's default value can also be changed, or the value can be changed on a server-by-server basis as desired.
Running With Steam Guard Enabled
[!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.
- When creating your server, set the variables "[Host] Skip Game Server Install" and "[Repair] Validate Server Files" to
1. - Proceed with installation as normal.
- If the server has not automatically started after installation, start it.
- The console will eventually appear to freeze on the line:
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.- If you have mods to install, you will have to repeat this process of obtaining and entering in a new Steam Guard code for every mod.
- The server should properly start at this time.
- Go to the Startup tab and disable "[Repair] Validate Server Files". Also, it is recommended you disable the "Automatic Updates" Startup Variable until you need to update again. Otherwise, you will have to go through the process of entering in Steam Guard codes again every boot.
Changes
- Validate and update embedded URLs
· Daniel Barton · bf9f3cb
- SteamCMD + Other fixes
· yesBad · edbf925
- Add Minecraft eggs
· Daniel Barton · 7322302
- Update DayZ to release
· Daniel Barton · 2c82355
- Add steamcmd based eggs
· Daniel Barton · 60ef9fb
Problem with this egg?
Open an issue on GitHub. Include your Panel and Wings versions.
Install script 102 lines /bin/bash in ghcr.io/ptero-eggs/installers:debian Show Hide
#!/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"