Server Administration

**Days of War** features dedicated servers which can be hosted by players all around the globe. To set up a server yourself, you need to install and configure the server yourself.

## Note before starting

Steam doesn't allow hosting a server and playing with a client on the same machine. That's why it's useful to host the server either on a second machine or rent a small vServer for hosting it.

## Prerequesites

Since DoW is a 64-bit application, the server needs a 64-bit operating system to run and will not work on any 32-bit systems. The server has been tested on Ubuntu 18 and Windows 10 but should work on any other system aswell after installing the nessecary redistributables.

## Hardware

The server requirs at least **1GB of RAM** to start. Memory requirements increase as the number of connected players increases. The server takes ~300MB of RAM without any players and ~500MB of RAM when full. Also, it requires about **2GB of free disk space available**.

## Network

The server listens for incoming connections on the ports listed below. Ensure your network configuration allows incoming connections to these ports and directs them to the host that will be running. Usually, you need to set these ports to be allowed in your firewall and create a port forwarding rule in your router configuration.

 UDP 27015

## Multiple servers on the same machine

You can host multiple servers on the same host machine, however be aware that the CPU and memory should be monitored carefully! Also, you need to expand the port rules above to fit as one server uses one pair of ports.

Example:

 Server Instance 2
 Server Instance 3

## Installation

1. Install SteamCMD on your host machine.
2. Create a folder to contain the server files (respect the disk space mentioned above!)
3. Launch *SteamCMD* on your host and use it to download the server files. The **Days of War** server uses the app ID 541790. Here's how you can download it:

```
Steam> login anonymous
Steam> force_install_dir <YourServerFolder>
Steam> app_update 541790 validate

```

Wait until the download has finished, then you can exit using `exit`. You can also use the command line:

```
steamcmd +login anonymous +force_install_dir <YourServerFolder> +app_update 541790 +quit
```

## Launching: Windows

To launch the server on Windows, do the following:

1. Install Microsoft Visual C++ 2015 Redistributable if not already installed. You can find it in `YourServerFolder/541790/_CommonRedist/vcredist/2015`
2. Right-click and edit the `LaunchServer.bat` file found in `YourServerFolder/541790/DaysOfWar/Binaries/Win64` to manually set the port, query port and map to launch with. The command line works like this:
```
DaysOfWarServer-Win64-Shipping.exe <map> Port=<GamePort> QueryPort=<QueryPort>

```

Here's an example:

```
DaysOfWarServer-Win64-Shipping.exe dow_dockyard Port=7777 QueryPort=27015

```
3. Now you can launch the server by double-clicking the `LaunchServer.bat` file.

## Launching: Linux

To launch the server on Linux, do the following:

1. Navigate to the server folder and execute the server using the following command line:

```
./DaysOfWarServer.sh <map> Port=<GamePort> QueryPort=<QueryPort>

```
2. You can also create a bash script to run the DoW server with set command line arguments and/or use it to automate the process further.

## Updating

To update the server when a new version is released repeat the SteamCMD steps shown above. See SteamCMDs documentation for details on automating this process.

## Configuration

To configure the server, you need to edit the `Engine.ini` and `Game.ini` files. You can find them in `YourServerFolder/DaysOfWar/Saved/Config/WindowsServer` for Windows or `YourServerFolder/DaysOfWar/Saved/Config/LinuxServer` for Linux.

Here are a few settings you can adjust:

1. **Set the tick rate**

The tick rate indicates how many updates per second the server will do to update physics, positions etc.

Here's an example in the `Engine.ini` to set a tickrate of 60. Default is 30.

```
[/Script/OnlineSubsystemUtils.IpNetDriver]
NetServerMaxTickRate=60

```
6. **Set max player slots**

Change the amount of maximum player slots of a session in the `Game.ini` file.

```
[/Script/Engine.GameSession]
MaxPlayers=24

```
11. **Set server name, admin password and server password**

Change the server cosmetic setting in `Game.ini`.

```
ServerName=name_of_your_server
ServerAdminPassword=administration_password
ServerPassword=server_password

```

Remove the line if you don't want to set a server password

18. **Add administrator**

You need to add this line to `Game.ini`:

```
[/Script/DaysOfWar.ShooterGameInstance]
Administrators=(PlayerUniqueId="yourSteamID64",PlayerName="yourName",PlayerClass="",PlayerIPAddress="",bIsAdmin=True,bIsBanned=False,BannedDate="",BanReason="")
```

You can find your SteamID64 here

Here's an example of an optimal `Game.ini` file configured for 24 players with 10 bots and class limits.

```
[/Script/DaysOfWar.ShooterGameInstance]
ServerName=MY_SERVER_NAME
ServerAdminPassword=MY_ADMIN_PASSWORD
ServerDiscordURL="https://discord.gg/daysofwar"
ServerWebsiteURL="http://www.drivenarts.com/"
ServerMessageOfTheDay=YOUR_WELCOME_MESSAGE
MapRotation=dow_amalfi
MapRotation=dow_bocage
MapRotation=dow_carentan
MapRotation=dow_cathedral
MapRotation=dow_chateau
MapRotation=dow_dockyard
MapRotation=dow_kaysersberg
MapRotation=dow_railyard
MapRotation=dow_riverbed
MapRotation=dow_torch
MapRotation=dow_leningrad
MapRotation=dow_mirage
bFriendlyFireEnabled=False
FriendlyFireKickThreshold=0
FriendlyFireBanThreshold=0
Administrators=(PlayerUniqueId="MY_STEAMID64",PlayerName="MY_NAME",PlayerClass="",PlayerIPAddress="",bIsAdmin=True,bIsBanned=False,BannedDate="",BanReason="")
RiflemanClassMaximum=4
AssaultClassMaximum=4
SupportClassMaximum=4
SniperClassMaximum=2
MGClassMaximum=2
RocketClassMaximum=2
ClanWarHostClanName=
ClanWarAwayClanName=
ClanWarMatchTime=20
bClanWarFriendlyFire=False
ClanWarRiflemanClassMaximum=11
ClanWarAssaultClassMaximum=11
ClanWarSupportClassMaximum=11
ClanWarSniperClassMaximum=11
ClanWarMGClassMaximum=11
ClanWarRocketClassMaximum=11

[/Script/DaysOfWar.DoWGameMode_Domination]
GameWarmupTime=30
RoundWarmupTime=8
RoundRestartTime=8

[/Script/Engine.GameSession]
MaxPlayers=24

[/Script/DaysOfWar.ShooterGameMode]
MaxBots=10

```

**You can update most of these settings in the in-game server menu (SERVER INFO).**