- Steam Copy of ArmA 2: Combined Operations
- Instance of a MySQL server (if you do not have one installed, follow steps below)
- Download the following Microsoft C++ Redistributables - make sure to get both
x86
andx64
versions installed. - Alternativly you can download Visual Studio 2015 Community Edition which will install any prerequisites you will ever need.
- Create a path with no spaces somewhere near the root of your drive. (Example:
C:\Servers\DayZ1
) - Download SteamCMD and extract it.
- Download this batch file and place it in your SteamCMD extracted directory.
- Edit
update_server.bat
's variables to match your settings- Set
STEAM_DIR
to the directory you created in step 1. - Set
STEAM_USERNAME
andSTEAM_PASSWORD
to your Steam login with ArmA 2: Combined Operations
- Set
- Edit
- Run
update_server.bat
and wait for it to complete. This will download ArmA2 and ArmA2: Operation Arrowhead into the same directory to make ArmA2: Combined Operations.
- Download the latest stable release of this server pack or the latest development version.
- Extract the server pack you have just downloaded into the directory you created in the previous step (
C:\Servers\DayZ1
). - After you have completed all of the previous install instructions you can now move on to changing the config. Navigate in your DayZ server directory, then to
cfgdayz
. Inside you'll find aserver.cfg
which will allow you to change the default settings of the server to your liking, such as the server name, password and much more. For any questions regarding theserver.cfg
file, please follow this guide here. - Download BE Server for Windows - ARMA 2: OPERATION ARROWHEAD (INCLUDING DAYZ MOD) and place it inside the
cfgdayz\BattlEye
folder.
- Download MySQL Community Server Installer (offline installer is preferred)
- Accept the license terms and press Next.
- Select the type of setup you would like. (
Server only
is preferred) - After the installer completes it is time to configure the new MySQL instance with the installer
- Config Type =>
Server Machine
orDedicated Machine
- TCP/IP =>
Checked
- Port Number =>
3306
- Open Firewall port for network access =>
Checked
- Click Next
- MySQL Root Password => Set it to a
STRONG_PASSWORD
- MySQL User Accounts => Click
Add User
- Username =>
dayzhivemind
- Host =>
REMOTE_GAME_SERVER_IP
- Role =>
DB Admin
(temporary) - Password =>
STRONG_PASSWORD
- Username =>
- Press Next and hit Execute, wait for your service to be configured and hit Finish
- Config Type =>
- Download and run the HeidiSQL Installer.
- Run HeidiSQL and connect to your MySQL server under root privileges.
- Create a database named
hivemind
and use your servers default charset. - Download the latest SQL file (
https://raw.githubusercontent.com/Pwnoz0r/DayZ-Private-Server/master/SQL/CURRENT_DAYZ_VERSION.sql
), pressCtrl + O
in HeidiSQL and load the SQL file. Make sure yourhivemind
database is selected and pressF9
or the blue triangle button up in the toolbar that saysExecute SQL...
- After the SQL file executes, you may receive warnings - this is okay to ignore.
- Once the SQL file is finished, click on the
User manager
and edit yourdayzhivemind
user to only have full permissions to yourhivemind
database and nothing else. It is also a good practice to only allow this user to connect from yourREMOTE_GAME_SERVER_IP
. - If you followed all of the previous steps properly, you should now be able to connect to your MySQL service from your game server.
- The flavor of Linux used in this tutorial was
Ubuntu 15.10 x64
- Connect to your machine via SSH and run the following commands:
- If you would like to confirm everything prior to installing the commands, remove the
-y
switch from each command.
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get install mysql-server -y
- If you would like to confirm everything prior to installing the commands, remove the
- Set your root password in the following prompt:
- After your root password has been successfully set, run the following command:
sudo mysql_secure_installation
and follow the steps in securing your new MySQL service properly.- Create database
mysql -u root -p
CREATE DATABASE hivemind;
- Create a remote user for non-SSH access:
- Root access is temporarily required to execute the SQL file in a few steps.
CREATE USER 'dayzhivemind'@'REMOTE_GAME_SERVER_IP' IDENTIFIED BY 'STRONG_PASSWORD';
GRANT ALL PRIVILEGES ON *.* TO 'dayzhivemind'@'REMOTE_GAME_SERVER_IP' WITH GRANT OPTION;
FLUSH PRIVILEGES;
- Create database
- If you have an issue connecting remotely to your new user, make sure to add your MySQL port to your
iptables
and bind your remote address to themysqld.cnf
file.iptables -A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT
nano /etc/mysql/mysql.conf.d/mysqld.cnf
- Find and change
bind-address = 127.0.0.1
tobind-address = REMOTE_MYSQL_SERVER_IP
service mysql restart
- Execute
SERVER_INSTANCE\SQL\CURRENT_DAYZ_VERSION.sql
on your newhivemind
database. Make sure to changeCURRENT_DAYZ_VERSION
to the latest version that is currently supported.wget https://raw.githubusercontent.com/Pwnoz0r/DayZ-Private-Server/master/SQL/CURRENT_DAYZ_VERSION.sql
mysql -u root -p hivemind < ~/CURRENT_DAYZ_VERSION.sql;
- If that successfully executes, we want to revoke the root access we granted this user and grant it only full permissions to the
hivemind
database.REVOKE ALL PRIVILEGES ON *.* FROM 'dayzhivemind'@'REMOTE_GAME_SERVER_IP';
GRANT ALL PRIVILEGES ON hivemind.* TO 'dayzhivemind'@'REMOTE_GAME_SERVER_IP' WITH GRANT OPTION;
(grant the user full permissions only to the one database)FLUSH PRIVILEGES;
- At this point your MySQL Server on Linux should be ready for production. Make sure to remove all unnecessary users that you will not be using. It is also a good idea to only allow the remote machine you will be using for your DayZ Mod game server to connect to the database.
With the new MySQL server you have just set up, it's time to configure your game server to be able to connect to it. Here is a working example of what we just set up:
[Database]
;Hostname or IP of the server to connect to
;You can use the value "." (without quotes) to indicate named-pipe localhost connection
;If you leave this line commented or blank, HiveExt will connect to the OFFICIAL Hive, which requires registration
;See support.dayzmod.com for more information on what OFFICIAL Hive means, what are the rules, etc.
;If using OFFICIAL hive, the rest of the settings in this section have no effect
Host = MYSQL_SERVER_IP
;The default is MySql, which is better supported than Postgre (completely untested)
Type = MySql
;Port to connect to. The default is the default listening port of a server of the selected Type
;Instead of specifying Port, you can specify Socket and set Value to the socket name
Port = 3306
;Database name to connect to (you must supply this if private).
Database = hivemind
;Username to connect with
Username = dayzhivemind
;Password to authenticate with (default is blank)
Password = STRONG_PASSWORD
Configuring time can be great if you want to play DayZ without the hassle of night time, you can make the mission constantly day time. An example of making the time constant day would be to change the type setting in the Time section, for example:
[Time]
;Possible values: Local, Custom, Static
;You cannot use Static on OFFICIAL Hive, it will just revert to Local
Type = Static
;If using Custom type, offset from UTC in hours (can be negative as well)
;Offset = 0
;If using Static type (Hour value always the same on every server start), the value (0-24) to set the Hour to
Hour = 8
- Download the following batch file and extract it into your
STEAM_DIR
you set up earlier. - Run the batch file and your server should start right up and become joinable.
Join the community! Remember to visit OpenDayZ where you can suggest new ideas and help out other community members.
DayZ-Private-Server Created by @Pwnoz0r. Original GitHub README by RazorFlint - updated by @Pwnoz0r - 03/29/2016