Server Start .bat
Batch script for launching your server with proper parameters, mod configurations, and startup options.
Overview
A .bat (batch) file is used to launch the DayZ server executable with the correct parameters. It defines the server port, config file path, profile directory, logging options, and mod list.
The batch file should be placed in the DayZ Server root directory alongside DayZServer_x64.exe.
Basic Batch Script Structure
@echo off
start "DayZ Server" DayZServer_x64.exe ^
-config=serverDZ.cfg ^
-port=2302 ^
-profiles=profiles ^
-dologs ^
-adminlog ^
-netlog ^
-freezecheck
The ^ character allows line continuation in batch files for readability.
Common Parameters
| Parameter | Description |
|---|---|
| -config= | Path to serverDZ.cfg file |
| -port= | Server port (default: 2302). Each server instance needs a unique port |
| -profiles= | Directory for logs, ban lists, and server profile data |
| -dologs | Enable script logging (RPT files) |
| -adminlog | Enable admin action logging |
| -netlog | Enable network traffic logging |
| -freezecheck | Monitor and restart on server freeze |
| -BEpath= | Path to BattlEye directory |
| -cpuCount= | Number of CPU cores to use |
| -noFilePatching | Disable file patching (security measure) |
Mod Loading (-mod=)
Mods are loaded using the -mod= parameter. Multiple mods are separated by semicolons. Server-side-only mods use -serverMod= instead.
:: Client + server mods (players must also have these) -mod=@CF;@VPPAdminTools;@TraderMod;@BuilderItems :: Server-only mods (players don't need these) -serverMod=@AdminTools;@FileManager
Load order matters. Mods that depend on other mods (e.g., @CF) must be listed first. Check each mod's documentation for dependencies.
Example: Vanilla Server
@echo off
title DayZ Server - Vanilla
start "DayZ Server" /wait DayZServer_x64.exe ^
-config=serverDZ.cfg ^
-port=2302 ^
-profiles=profiles ^
-dologs ^
-adminlog ^
-netlog ^
-freezecheck ^
-BEpath=battleye ^
-noFilePatching
Example: Modded Server
@echo off
title DayZ Server - Modded
set MODS=@CF;@VPPAdminTools;@TraderMod;@BuilderItems;@MuchStuffPack
set SERVER_MODS=@AdminTools
start "DayZ Server" /wait DayZServer_x64.exe ^
-config=serverDZ.cfg ^
-port=2302 ^
-profiles=profiles ^
-dologs ^
-adminlog ^
-netlog ^
-freezecheck ^
-BEpath=battleye ^
-noFilePatching ^
-mod=%MODS% ^
-serverMod=%SERVER_MODS%
Auto-Restart Script
This script automatically restarts the server if it crashes or is shut down:
@echo off
title DayZ Server - Auto Restart
set MODS=@CF;@VPPAdminTools
set SERVER_MODS=@AdminTools
set CONFIG=serverDZ.cfg
set PORT=2302
set PROFILES=profiles
:start
echo (%date% %time%) Starting DayZ Server...
start "DayZ Server" /wait DayZServer_x64.exe ^
-config=%CONFIG% ^
-port=%PORT% ^
-profiles=%PROFILES% ^
-dologs ^
-adminlog ^
-netlog ^
-freezecheck ^
-BEpath=battleye ^
-noFilePatching ^
-mod=%MODS% ^
-serverMod=%SERVER_MODS%
echo (%date% %time%) Server stopped or crashed. Restarting in 10 seconds...
timeout /t 10
goto start
The /wait flag on start is critical — it makes the script wait for the server process to exit before continuing to the restart loop.
Production Checklist
Use absolute paths when needed
Hosted servers may start scripts from a different working directory than expected.
Keep profiles persistent
The profile directory holds logs, bans, storage data, and troubleshooting output.
Document load order
Keep required dependencies first and separate client mods from server-only mods.
Rotate logs
Verbose logging helps debugging but can fill disk space on active servers.
Troubleshooting
| Problem | Check |
|---|---|
| Server opens then closes | Run from a terminal window and inspect the RPT log in the profiles folder. |
| Players cannot join modded server | Check mod load order, required client mods, and serverDZ.cfg mission template. |
| BattlEye fails to start | Verify -BEpath and the BattlEye folder relative to the server executable. |
| Second server conflicts | Use a unique port, profile folder, config file, and storage path for each instance. |