Automatic setup scripts for DayZ servers on Linux, designed to make it easier to create and maintain your own server.
This project is based on a real server used daily, already containing several ready-made configurations. This allows you to spin up a functional server with just a few commands.
- How the project works
- Requirements
- Configuration variables
- System configuration
- Step-by-step installation
- Required ports
- Project structure
- Profiles configuration
- Notes
- Contributing
Inside the scripts_server folder there is only one script:
Responsible for installing, configuring and keeping the server running, as well as checking and notifying updates for the server and installed mods.
| Feature | Description |
|---|---|
| 📦 Automatic installation | Installs the server if it doesn't exist yet |
| 🔽 Mod download | Downloads and prepares the configured mods |
| Starts the server automatically | |
| 🔍 Monitoring | Monitors the process in real time |
| 🔄 Timed restart | Restarts automatically every 6 hours |
| 💥 Crash restart | Restarts automatically in case of a crash |
| 🔍 Update check | Checks for server and mod updates |
| 🔔 Notification | Notifies when updates are available |
| 💬 Discord Webhook | Optional support for Discord notifications |
| 🤖 Discord Bot | Displays server status in real time on Discord (optional) |
Before starting, make sure you have:
- Operating System: Linux (tested on Ubuntu 24.04)
- Git installed
- An active Steam account with DayZ in your Steam library
⚠️ Important: To download Workshop mods, the Steam account used must own DayZ.
When the script runs for the first time, it will ask for your credentials, which will be used by SteamCMD to download the server and Workshop mods.
All settings are automatically saved to the scripts_server/config.env file, which is shared between start_server.sh and bot.py.
WEBHOOK_URL_SERVER="" # Server restart notifications
WEBHOOK_URL_MOD="" # Mod update notificationsYou will receive notifications when:
- 🔄 The server restarts or updates
- ⬇️ A mod is updated
DISCORD_BOT_TOKEN="" # Discord bot token
DISCORD_BOT_IP="" # Public IP of the DayZ server (e.g. 177.123.456.234)When configured, the Discord bot will display the server status as the bot's activity in real time, updating every 60 seconds:
- ✅
12/60 - Server Name— when the server is online - ❌
Server offline— when the server is not responding
⚠️ Important: IfDISCORD_BOT_TOKENorDISCORD_BOT_IPare empty, the bot will not start and Python 3 and its modules will not be installed.
1. Create the server folder:
mkdir /home/steamcmd/dayzserver
cd /home/steamcmd/dayzserver2. Clone the project:
git clone https://github.com/Dayz-Tools/DayZ-Linux-server.git .3. Start the server:
./scripts_server/start_server.sh4. (Optional) Configure:
- Discord Webhook:
sed -i 's|^WEBHOOK_URL_MOD=.*|WEBHOOK_URL_MOD="your_discord_webhook_url"|' scripts_server/config.env
sed -i 's|^WEBHOOK_URL_SERVER=.*|WEBHOOK_URL_SERVER="your_discord_webhook_url"|' scripts_server/config.env- Discord Bot:
sed -i 's|^DISCORD_BOT_TOKEN=.*|DISCORD_BOT_TOKEN="your_token_here"|' scripts_server/config.env
sed -i 's|^DISCORD_BOT_IP=.*|DISCORD_BOT_IP="your_ip_here"|' scripts_server/config.envOn the first run, the script will automatically:
- Install SteamCMD
- Download the DayZ Server
- Download the configured mods
- Start the server
- Start the Discord Bot (if configured)
If you don't have a bot yet, follow the steps below:
- Go to the Discord Developer Portal
- Click New Application and give your bot a name
- Go to Bot in the side menu and click Reset Token to generate the token
- Copy the token and paste it into
DISCORD_BOT_TOKENinconfig.env - Under OAuth2 → URL Generator, select the
botscope and theSend Messagespermission - Use the generated link to invite the bot to your Discord server
For the server to appear in the DayZ Launcher, open the following ports:
| Port | Protocol | Usage |
|---|---|---|
2302 - 2305 |
UDP | DayZ Server |
27016 |
UDP | Steam Query / Discord Bot (A2S) |
⚠️ Ports must be open in the system firewall, on the server/VPS, and on your router (if hosting at home).
DayZ-Linux-server/
│
├── scripts_server/
│ ├── logs/ # Server and Discord Bot logs
│ ├── mod_ids.txt # List of mod IDs to be used on the server
│ ├── config.env # Shared settings (Steam credentials, Discord Bot)
│ ├── bot.py # Discord bot to display server status (optional)
│ └── start_server.sh # Main startup and update-check script
│
├── serverDZ.cfg.example # Basic server configuration
├── profiles/ # Server mod settings
├── keys/ # Mod keys
├── servermod/ # Server-side only mods folder
├── mpmissions/ # Server mission folder (init.c, types.xml, events.xml)
└── README.md
After cloning the project, update the mod settings below via the command line (from the project root, e.g. /home/steamcmd/dayzserver).
⚠️ These files contain passwords and API keys — do not share or commit real values to Git. Restart the server after any change.
sed -i 's|"connectionVerification": 0|"connectionVerification": 1|' profiles/gamelabs.cfg
sed -i 's|"serverId": ".*"|"serverId": "YOUR_SERVER_ID_HERE"|' profiles/gamelabs.cfg
sed -i 's|"apiKey": ".*"|"apiKey": "YOUR_API_KEY_HERE"|' profiles/gamelabs.cfg| Field | Description |
|---|---|
connectionVerification |
0 = off, 1 = GameLabs API verification enabled |
serverId |
Server ID from the GameLabs panel |
apiKey |
API key from the GameLabs panel |
Use connectionVerification": 0 in the first command if you want verification disabled.
sed -i 's|^RConPassword.*|RConPassword "YOUR_RCON_PASSWORD_HERE"|' profiles/BattlEye/BEServer_x64.cfgThe file must contain only one line with the superadmin password (no blank lines).
echo -n 'YOUR_VPP_PASSWORD_HERE' > profiles/VPPAdminTools/Permissions/credentials.txtscreen -S dayzserver -X quit
sleep 2 && screen -S dayzserver -dm bash -c './scripts_server/start_server.sh'| File | What to update |
|---|---|
profiles/gamelabs.cfg |
connectionVerification, serverId, apiKey |
profiles/BattlEye/BEServer_x64.cfg |
RConPassword |
profiles/VPPAdminTools/Permissions/credentials.txt |
Single-line VPP password |
- Tested on Ubuntu 24.04
- May not work directly on other Linux distributions
- Depending on your system's directory structure, adjustments may be needed
- The
config.envfile contains sensitive credentials — do not share or commit this file
This project was created to:
- ✅ Make it easier to run DayZ servers on Linux
- ✅ Automate mod updates
- ✅ Reduce manual maintenance
- ✅ Serve as a base for server administrators
Suggestions, improvements and fixes are welcome!
- Fork the project
- Create a branch for your feature (
git checkout -b feature/my-feature) - Commit your changes (
git commit -m 'feat: my feature') - Push to the branch (
git push origin feature/my-feature) - Open a Pull Request
Now just start the server and survive in Chernarus. Good luck, survivor!
By default, closing the terminal or disconnecting from the VPS terminates all running processes — including the DayZ server. Screen solves this by creating terminal sessions that keep running in the background.
# Ubuntu / Debian
sudo apt-get install screen -yscreen -S dayzserver -dm bash -c './scripts_server/start_server.sh'| Parameter | Description |
|---|---|
-S dayzserver |
Sets the session name |
-dm |
Starts the session in the background (detached) |
bash -c '...' |
Command to run inside the session |
screen -lsExample output:
There is a screen on:
12345.dayzserver (Detached)
1 Socket in /run/screen/S-user.
screen -r dayzserver
⚠️ To exit without stopping the session, pressCtrl + AthenD. This keeps the server running in the background.
screen -S dayzserver -X quit# Stop the current session
screen -S dayzserver -X quit
# Wait 2 seconds and start again
sleep 2 && screen -S dayzserver -dm bash -c './scripts_server/start_server.sh'| Action | Command |
|---|---|
| Start server | screen -S dayzserver -dm bash -c './scripts_server/start_server.sh' |
| List active sessions | screen -ls |
| Attach to session | screen -r dayzserver |
| Exit without stopping | Ctrl + A → D |
| Stop session | screen -S dayzserver -X quit |
Scripts de configuração automática para servidores do DayZ em Linux, com o objetivo de facilitar a criação e manutenção do seu próprio servidor.
A base deste projeto é um servidor real utilizado no dia a dia, já contendo diversas configurações prontas. Com isso, é possível subir um servidor funcional com poucos comandos.
- Como o projeto funciona
- Requisitos
- Variáveis de configuração
- Configuração do sistema
- Instalação passo a passo
- Portas necessárias
- Estrutura do projeto
- Configuração profiles
- Observações
- Contribuições
Dentro da pasta scripts_server possui apenas um script:
Responsável por instalar, configurar e manter o servidor em execução, além de verificar e notificar atualizações do servidor e dos mods instalados.
| Funcionalidade | Descrição |
|---|---|
| 📦 Instalação automática | Instala o servidor caso ainda não exista |
| 🔽 Download de mods | Baixa e prepara os mods configurados |
| Inicia o servidor automaticamente | |
| 🔍 Monitoramento | Monitora o processo em tempo real |
| 🔄 Reinício por tempo | Reinicia automaticamente a cada 6 horas |
| 💥 Reinício por crash | Reinicia automaticamente em caso de crash |
| 🔍 Verificação | Verifica atualizações do servidor e dos mods instalados |
| 🔔 Notificação | Notifica quando houver atualizações disponíveis |
| 💬 Discord Webhook | Suporte opcional para notificações via Discord |
| 🤖 Discord Bot | Exibe status do servidor em tempo real no Discord (opcional) |
Antes de iniciar, certifique-se de que possui:
- Sistema Operacional: Linux (testado em Ubuntu 24.04)
- Git instalado
- Conta Steam ativa, com jogo DayZ na biblioteca da Steam
⚠️ Importante: Para baixar mods da Workshop, a conta Steam utilizada precisa possuir o DayZ na biblioteca.
Durante a execução do script, será solicitado suas credenciais que serão usadas pelo SteamCMD para baixar o servidor e os mods da Workshop.
Todas as configurações são salvas automaticamente no arquivo scripts_server/config.env, que é compartilhado entre o start_server.sh e o bot.py.
WEBHOOK_URL_SERVER="" # Notificações de reinício do servidor
WEBHOOK_URL_MOD="" # Notificações de atualização de modsCom isso você receberá notificações quando:
- 🔄 O servidor reiniciar ou atualizar
- ⬇️ Um mod for atualizado
DISCORD_BOT_TOKEN="" # Token do bot do Discord
DISCORD_BOT_IP="" # IP público do servidor DayZ (ex: 177.123.456.234)Quando configurado, o bot do Discord exibirá em tempo real o status do servidor como atividade do bot, atualizando a cada 60 segundos:
- ✅
12/60 - Nome do Servidor— quando o servidor está online - ❌
Server offline— quando o servidor não responde
⚠️ Importante: SeDISCORD_BOT_TOKENouDISCORD_BOT_IPestiverem vazios, o bot não será iniciado e o Python 3 e seus módulos não serão instalados.
1. Crie a pasta do servidor:
mkdir /home/steamcmd/dayzserver
cd /home/steamcmd/dayzserver2. Clone o projeto:
git clone https://github.com/Dayz-Tools/DayZ-Linux-server.git .3. Inicie o servidor:
./scripts_server/start_server.sh4. (Opcional) Configure:
- Webhook do Discord:
sed -i 's|^WEBHOOK_URL_MOD=.*|WEBHOOK_URL_MOD="webhook_discord_url"|' scripts_server/config.env
sed -i 's|^WEBHOOK_URL_SERVER=.*|WEBHOOK_URL_SERVER="webhook_discord_url"|' scripts_server/config.env- Bot do Discord:
sed -i 's|^DISCORD_BOT_TOKEN=.*|DISCORD_BOT_TOKEN="seu_token_aqui"|' scripts_server/config.env
sed -i 's|^DISCORD_BOT_IP=.*|DISCORD_BOT_IP="seu_ip_aqui"|' scripts_server/config.envNa primeira execução, o script irá automaticamente:
- Instalar o SteamCMD
- Baixar o DayZ Server
- Baixar os mods configurados
- Iniciar o servidor
- Iniciar o Bot do Discord (se configurado)
Caso ainda não tenha um bot criado, siga os passos abaixo:
- Acesse o Discord Developer Portal
- Clique em New Application e dê um nome ao bot
- Vá em Bot no menu lateral e clique em Reset Token para gerar o token
- Copie o token e cole em
DISCORD_BOT_TOKENnoconfig.env - Em OAuth2 → URL Generator, selecione o escopo
bote a permissãoSend Messages - Use o link gerado para convidar o bot ao seu servidor Discord
Para que o servidor apareça no Launcher do DayZ, libere as seguintes portas:
| Porta | Protocolo | Uso |
|---|---|---|
2302 - 2305 |
UDP | Servidor DayZ |
27016 |
UDP | Steam Query / Discord Bot (A2S) |
⚠️ As portas devem estar liberadas no firewall do sistema, no servidor/VPS e no roteador (caso esteja hospedando em casa).
- Primeiro verifique se o ufw está instalado/ativo:
sudo ufw status- Liberar intervalo 2302-2305 UDP:
sudo ufw allow 2302:2305/udp- Liberar porta 27016 UDP:
sudo ufw allow 27016/udpDayZ-Linux-server/
│
├── scripts_server/
│ ├── logs/ # Logs do servidor e do Discord Bot
│ ├── mod_ids.txt # Lista com ids dos mods que serão utilizados no servidor
│ ├── config.env # Configurações compartilhadas (credenciais Steam, Discord Bot)
│ ├── bot.py # Bot do Discord para exibir status do servidor (opcional)
│ └── start_server.sh # Script principal de inicialização e verificação de atualizações
│
├── serverDZ.cfg.example # Configurações básicas do servidor
├── profiles/ # Configurações dos mods do servidor
├── keys/ # Chaves dos mods
├── servermod/ # Pasta dos mods que são carregados apenas do lado servidor.
├── mpmissions/ # Pasta da missão do servidor (init.c, types.xml, events.xml)
└── README.md
Após clonar o projeto, atualize as configurações dos mods abaixo pela linha de comando (na raiz do projeto, ex.: /home/steamcmd/dayzserver).
⚠️ Esses arquivos contêm senhas e chaves de API — não compartilhe nem faça commit de valores reais no Git. Reinicie o servidor após qualquer alteração.
sed -i 's|"connectionVerification": 0|"connectionVerification": 1|' profiles/gamelabs.cfg
sed -i 's|"serverId": ".*"|"serverId": "SEU_SERVER_ID_AQUI"|' profiles/gamelabs.cfg
sed -i 's|"apiKey": ".*"|"apiKey": "SUA_API_KEY_AQUI"|' profiles/gamelabs.cfg| Campo | Descrição |
|---|---|
connectionVerification |
0 = desligado, 1 = verificação via API GameLabs ativa |
serverId |
ID do servidor no painel GameLabs |
apiKey |
Chave de API do painel GameLabs |
Use connectionVerification": 0 no primeiro comando se quiser manter a verificação desligada.
sed -i 's|^RConPassword.*|RConPassword "SUA_SENHA_RCON_AQUI"|' profiles/BattlEye/BEServer_x64.cfgO arquivo deve conter apenas uma linha com a senha de superadmin (sem linhas em branco).
echo -n 'SUA_SENHA_VPP_AQUI' > profiles/VPPAdminTools/Permissions/credentials.txtscreen -S dayzserver -X quit
sleep 2 && screen -S dayzserver -dm bash -c './scripts_server/start_server.sh'| Arquivo | O que atualizar |
|---|---|
profiles/gamelabs.cfg |
connectionVerification, serverId, apiKey |
profiles/BattlEye/BEServer_x64.cfg |
RConPassword |
profiles/VPPAdminTools/Permissions/credentials.txt |
Senha VPP em uma única linha |
- Testado em Ubuntu 24.04
- Pode não funcionar diretamente em outras distribuições Linux
- Dependendo da estrutura de diretórios do seu sistema, ajustes podem ser necessários
- O arquivo
config.envcontém credenciais sensíveis — não o compartilhe nem faça commit deste arquivo
Este projeto foi criado para:
- ✅ Facilitar a criação de servidores DayZ no Linux
- ✅ Automatizar atualizações de mods
- ✅ Reduzir manutenção manual
- ✅ Servir como base para administradores de servidores
Sugestões, melhorias e correções são bem-vindas!
- Faça um fork do projeto
- Crie uma branch para sua feature (
git checkout -b feature/minha-feature) - Faça o commit das suas alterações (
git commit -m 'feat: minha feature') - Faça o push para a branch (
git push origin feature/minha-feature) - Abra um Pull Request
Agora é só iniciar o servidor e sobreviver em Chernarus. Boa sorte, sobrevivente!
Por padrão, ao fechar o terminal ou desconectar da VPS, todos os processos em execução são encerrados — incluindo o servidor DayZ. O Screen resolve isso permitindo criar sessões de terminal que continuam rodando em segundo plano.
# Ubuntu / Debian
sudo apt-get install screen -yscreen -S dayzserver -dm bash -c './scripts_server/start_server.sh'| Parâmetro | Descrição |
|---|---|
-S dayzserver |
Define o nome da sessão |
-dm |
Inicia a sessão em segundo plano (detached) |
bash -c '...' |
Comando a ser executado na sessão |
screen -lsExemplo de saída:
There is a screen on:
12345.dayzserver (Detached)
1 Socket in /run/screen/S-user.
screen -r dayzserver
⚠️ Para sair sem encerrar a sessão, pressioneCtrl + Ae depoisD. Isso mantém o servidor rodando em segundo plano.
screen -S dayzserver -X quit# Encerra a sessão atual
screen -S dayzserver -X quit
# Aguarda 2 segundos e inicia novamente
sleep 2 && screen -S dayzserver -dm bash -c './scripts_server/start_server.sh'| Ação | Comando |
|---|---|
| Iniciar servidor | screen -S dayzserver -dm bash -c './scripts_server/start_server.sh' |
| Ver sessões ativas | screen -ls |
| Acessar sessão | screen -r dayzserver |
| Sair sem encerrar | Ctrl + A → D |
| Encerrar sessão | screen -S dayzserver -X quit |
Abaixo estão os arquivos de configuração dos mods que suportam notificações via Discord Webhook. Todos são opcionais, mas recomendados para acompanhar eventos do servidor em tempo real.
⚠️ Reinicie o servidor após qualquer alteração.
| Arquivo | Campo |
|---|---|
profiles/BXDKoth/KothConfig.json |
KOTH_Web_hook |
profiles/BXD_InterceptFlag/config.json |
eventWebhook |
profiles/BXDHeli/HeliConfig.json |
HELI_Web_hook |
profiles/AC/Settings/KillFeed.json |
m_Webhook |
profiles/BXD_Sequestrador/BXD_Sequestrador_Settings.json |
discordAddress |
sed -i 's|"KOTH_Web_hook": ".*"|"KOTH_Web_hook": "SEU_WEBHOOK_AQUI"|' profiles/BXDKoth/KothConfig.jsonsed -i 's|"eventWebhook": ".*"|"eventWebhook": "SEU_WEBHOOK_AQUI"|' profiles/BXD_InterceptFlag/config.jsonsed -i 's|"HELI_Web_hook": ".*"|"HELI_Web_hook": "SEU_WEBHOOK_AQUI"|' profiles/BXDHeli/HeliConfig.jsonsed -i 's|"m_Webhook": ".*"|"m_Webhook": "SEU_WEBHOOK_AQUI"|' profiles/AC/Settings/KillFeed.jsonsed -i 's|"discordAddress": ".*"|"discordAddress": "SEU_WEBHOOK_AQUI"|' profiles/BXD_Sequestrador/BXD_Sequestrador_Settings.jsonscreen -S dayzserver -X quit
sleep 2 && screen -S dayzserver -dm bash -c './scripts_server/start_server.sh'No linux, o DayZ exige que o parâmetro vm.max_map_count esteja com um valor mínimo de 1048576. Sem isso, o servidor não inicializa. É recomendado configurar isso uma única vez antes de iniciar o servidor pela primeira vez, o script start_server.sh já realiza essa configuração, porém caso falhe, você pode executar escolhendo uma das opções abaixo:
O valor é perdido ao reiniciar a VPS/máquina.
sudo sysctl -w vm.max_map_count=1048576Crie um arquivo de configuração que é carregado automaticamente toda vez que o sistema inicia. Feito uma única vez, não precisa repetir. Caso 99-dayzserver.conf não funcione, tente em: /etc/sysctl.conf.
echo "vm.max_map_count=1048576" | sudo tee /etc/sysctl.d/99-dayzserver.conf
sudo sysctl --system