jonrainier / DayZ-Private-Server

DayZ Private Server by Pwnoz0r
98 stars 131 forks source link

Requirements

Installation Instructions

Install - ArmA2: Combined Operations

  1. Create a path with no spaces somewhere near the root of your drive. (Example: C:\Servers\DayZ1)
  2. Download SteamCMD and extract it.
  3. Download this batch file and place it in your SteamCMD extracted directory.
    • Edit update_server.bat's variables to match your settings
      1. Set STEAM_DIR to the directory you created in step 1.
      2. Set STEAM_USERNAME and STEAM_PASSWORD to your Steam login with ArmA 2: Combined Operations
  4. 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.

    Install - DayZMod Server

  5. Download the latest stable release of this server pack or the latest development version.
  6. Extract the server pack you have just downloaded into the directory you created in the previous step (C:\Servers\DayZ1).
  7. 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 a server.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 the server.cfg file, please follow this guide here.
  8. Download BE Server for Windows - ARMA 2: OPERATION ARROWHEAD (INCLUDING DAYZ MOD) and place it inside the cfgdayz\BattlEye folder.

Install - MySQL Server (Windows)

  1. Download MySQL Community Server Installer (offline installer is preferred)
  2. Accept the license terms and press Next.
  3. Select the type of setup you would like. (Server only is preferred)
  4. After the installer completes it is time to configure the new MySQL instance with the installer
    1. Config Type => Server Machine or Dedicated Machine
    2. TCP/IP => Checked
    3. Port Number => 3306
    4. Open Firewall port for network access => Checked
    5. Click Next
    6. MySQL Root Password => Set it to a STRONG_PASSWORD
    7. MySQL User Accounts => Click Add User
      1. Username => dayzhivemind
      2. Host => REMOTE_GAME_SERVER_IP
      3. Role => DB Admin (temporary)
      4. Password => STRONG_PASSWORD
    8. Press Next and hit Execute, wait for your service to be configured and hit Finish
  5. Download and run the HeidiSQL Installer.
  6. Run HeidiSQL and connect to your MySQL server under root privileges. HeidiSQL Session Manager Dialogue
  7. Create a database named hivemind and use your servers default charset. HeidiSQL Database Creation Dialogue
  8. Download the latest SQL file (https://raw.githubusercontent.com/Pwnoz0r/DayZ-Private-Server/master/SQL/CURRENT_DAYZ_VERSION.sql), press Ctrl + O in HeidiSQL and load the SQL file. Make sure your hivemind database is selected and press F9 or the blue triangle button up in the toolbar that says Execute SQL...
  9. After the SQL file executes, you may receive warnings - this is okay to ignore.
  10. Once the SQL file is finished, click on the User manager and edit your dayzhivemind user to only have full permissions to your hivemind database and nothing else. It is also a good practice to only allow this user to connect from your REMOTE_GAME_SERVER_IP. HeidiSQL User Manager Dialogue
  11. If you followed all of the previous steps properly, you should now be able to connect to your MySQL service from your game server.

Install - MySQL Server (Linux)

Configure - HiveExt.ini

MySQL Settings

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

Time Config

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

Start Server (Batch - Windows)

  1. Download the following batch file and extract it into your STEAM_DIR you set up earlier.
  2. Run the batch file and your server should start right up and become joinable.

Community

Join the community! Remember to visit OpenDayZ where you can suggest new ideas and help out other community members.

Author

DayZ-Private-Server Created by @Pwnoz0r. Original GitHub README by RazorFlint - updated by @Pwnoz0r - 03/29/2016