DayZ
DayZ dedicated server. Needs a Steam account that owns DayZ (Steam accounts page); maps like Chernarus, Livonia, Sakhal and Badlands come with the server download. Stable or experimental branch.
| Download | Steam, with an account |
|---|---|
| Architectures | amd64 |
| Ports | game UDP 2302 · query UDP 27016 · rcon UDP 2305 |
| Recommended | 4096 MB memory + 32 MB per player · 3 cores · 20 GB disk |
| Player count | a2s |
| RCON | battleye |
| Version | 974a95dcee22 |
Settings
- Server name
- Map (mission) — Folder in mpmissions: dayzOffline.chernarusplus (Chernarus), dayzOffline.enoch (Livonia), dayzOffline.sakhal (Sakhal). The install log lists the missions of your download, including Badlands.
- Max players
- Join password — Empty for a public server.
- Admin password — For
- RCON password (BattlEye) — For RCON tools and the DayZ whitelist app.
- Workshop mods — Steam Workshop ids, separated by commas (the number in the item's URL), e.g. 1559212036,1564026768. Downloaded on install and update, loaded in this order; run Update after changing.
- Other mods — Uploaded mod folders separated by ;, e.g. @MyMod. Upload them (with their keys) via Files or SFTP.
- Server-side mods
Template
dayz.yaml · import it in the panel or add it from the catalogue.
# DayZ dedicated server, downloaded with the tenant's Steam account (the account must own DayZ).
id: dayz
name: DayZ
description: DayZ dedicated server. Needs a Steam account that owns DayZ (Steam accounts page); maps like Chernarus, Livonia, Sakhal and Badlands come with the server download. Stable or experimental branch.
architectures: [amd64]
images:
- label: Steam runtime
image: registry.audifire.ch/hosting-panel/runtime-images/steam:latest
startupMode: shell
# the Workshop mods first (as prepared by the install script), then the uploaded ones;
# exec: DayZ itself must get the stop signal, not the shell
startup: >-
mods="";
for id in $(echo "$WORKSHOP_MODS" | tr ',;' ' '); do [ -d "@$id" ] && mods="$mods@$id;"; done;
exec ./DayZServer -config=serverDZ.cfg -port={{SERVER_PORT}} -profiles=profiles -BEpath=/home/container/battleye
-doLogs -adminLog -netLog -freezecheck "-mod=$mods{{MODS}}" "-serverMod={{SERVER_MODS}}"
stop:
signal: SIGINT
timeoutSeconds: 60
ports:
- role: game
protocol: udp
default: 2302
- role: query
protocol: udp
default: 27016
variable: QUERY_PORT
- role: rcon
protocol: udp
default: 2305
variable: RCON_PORT
steam:
appId: "{{STEAM_APP}}"
account: required
# mods from the Steam Workshop: DayZ's items (app 221100), downloaded with the account
workshop:
appId: "221100"
items: "{{WORKSHOP_MODS}}"
# players and map from the Steam query port
query:
protocol: a2s
port: query
# BattlEye RCon: the console's commands go over it (DayZ reads no commands from stdin)
rcon:
protocol: battleye
password: "{{env.RCON_PASSWORD}}"
console: true
# starting points for the limits when creating a server; memory grows with the player slots
resources:
memoryMb: 4096
memoryPerPlayerMb: 32
playersVariable: MAX_PLAYERS
cpuPercent: 300
diskMb: 20480
variables:
- key: STEAM_APP
name: Branch
description: "223350: stable · 1042420: experimental. Reinstall after changing."
default: "223350"
visibility: admin
rules: required|in:223350,1042420
- key: SERVER_NAME
name: Server name
default: DayZ Server
rules: required|string|max:60
- key: MISSION
name: Map (mission)
description: "Folder in mpmissions: dayzOffline.chernarusplus (Chernarus), dayzOffline.enoch (Livonia), dayzOffline.sakhal (Sakhal). The install log lists the missions of your download, including Badlands."
default: dayzOffline.chernarusplus
rules: required|regex:/^[\w.-]+$/
- key: MAX_PLAYERS
name: Max players
default: "60"
rules: required|integer|between:1,127
- key: SERVER_PASSWORD
name: Join password
description: Empty for a public server.
visibility: secret
rules: nullable|string|max:64
- key: ADMIN_PASSWORD
name: Admin password
description: For #login in the in-game chat.
visibility: secret
rules: nullable|string|max:64
- key: RCON_PASSWORD
name: RCON password (BattlEye)
description: For RCON tools and the DayZ whitelist app.
visibility: secret
rules: required|string|min:6|max:64
- key: WORKSHOP_MODS
name: Workshop mods
description: "Steam Workshop ids, separated by commas (the number in the item's URL), e.g. 1559212036,1564026768. Downloaded on install and update, loaded in this order; run Update after changing."
rules: nullable|regex:/^[0-9,; ]*$/
- key: MODS
name: Other mods
description: "Uploaded mod folders separated by ;, e.g. @MyMod. Upload them (with their keys) via Files or SFTP."
rules: nullable|string|max:1000
- key: SERVER_MODS
name: Server-side mods
rules: nullable|string|max:1000
configFiles:
- path: serverDZ.cfg
parser: file
values:
- key: hostname =
value: hostname = "{{env.SERVER_NAME}}";
- key: password =
value: password = "{{env.SERVER_PASSWORD}}";
- key: passwordAdmin =
value: passwordAdmin = "{{env.ADMIN_PASSWORD}}";
- key: maxPlayers =
value: maxPlayers = {{env.MAX_PLAYERS}};
- key: steamQueryPort =
value: steamQueryPort = {{env.QUERY_PORT}};
- key: template=
value: template="{{env.MISSION}}";
- path: battleye/beserver_x64.cfg
parser: file
values:
- key: RConPort
value: RConPort {{env.RCON_PORT}}
- key: RConPassword
value: RConPassword {{env.RCON_PASSWORD}}
- key: RestrictRCon
value: RestrictRCon 0
install:
image: registry.audifire.ch/hosting-panel/runtime-images/base:latest
entrypoint: bash
# also after updates: the Workshop mods are prepared again
onUpdate: true
script: |
cd /mnt/server
mkdir -p profiles battleye keys
if [ ! -f DayZServer ]; then
echo "DayZServer is missing: the Steam download failed (does the account own DayZ?)."
exit 1
fi
chmod +x DayZServer
# lines the panel keeps up to date on every start (it replaces existing lines)
grep -q 'steamQueryPort' serverDZ.cfg || printf '\nsteamQueryPort = 27016;\n' >> serverDZ.cfg
[ -f battleye/beserver_x64.cfg ] || printf 'RConPort 2305\nRConPassword changeme\nRestrictRCon 0\n' > battleye/beserver_x64.cfg
# Workshop mods: @<id> folders with lowercase names (the Linux server needs them), made of hard
# links to Steam's copy (no extra space, Steam's copy stays as downloaded); their keys into keys/
workshop=steamapps/workshop/content/221100
for dir in @[0-9]*; do [ -d "$dir" ] && rm -rf "$dir"; done
for id in $(echo "${WORKSHOP_MODS:-}" | tr ',; ' '\n\n\n'); do
if [ ! -d "$workshop/$id" ]; then echo "Workshop item $id was not downloaded (wrong id, or not a DayZ item?)."; continue; fi
cp -al "$workshop/$id" "@$id"
find "@$id" -depth -mindepth 1 -name '*[A-Z]*' | while read -r path; do
lower="$(dirname "$path")/$(basename "$path" | tr '[:upper:]' '[:lower:]')"
[ -e "$lower" ] || mv -T "$path" "$lower"
done
find "@$id" -iname '*.bikey' -exec cp -f {} keys/ \;
name=$(sed -n 's/^[[:space:]]*name[[:space:]]*=[[:space:]]*"\(.*\)".*/\1/p' "@$id/meta.cpp" 2>/dev/null | head -1)
echo "Mod @$id: ${name:-unnamed}"
done
echo "Missions in mpmissions:"
ls mpmissions 2>/dev/null | sed 's/^/ /' || echo " none (the account must own DayZ for the official maps)"
echo "DayZ installed."