Announcement

Collapse
No announcement yet.

[HowTo] Dedicated Server step-by-step

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [HowTo] Dedicated Server step-by-step

    How to install and run a Dedicated Server (Windows)

    1. Intro
    I often get questions about dedicated server, how to run them, how server configs are working, problems with server, etc.
    In this tutorial I want to give you a detailed step-by-step tutorial, how you can set up one ore more Days of War dedicated servers from ground up.
    You don't need much expirience to do that, I will explain it as simple as possible.

    First of all: At the moment there are only Windows executables available. But you can run them over tricks on a Linux too (ToDo: see Linux Wine tutorial below).
    If you already installed a dedicated server and have problems with it you can jump to (ToDo: Problems and Solving).

    There is also a video tutorial from JinxSwe:
    https://www.youtube.com/watch?v=bikSJims1sU

    btw. if you like my English, I can give you a course.

    Ok lets Start...

    2. Prerequirements Hardware & Software
    2.1. Minimum Requirements

    Windows OS compatible with VS 2015 Runtime = Windows Server 2008+
    1GB Ram
    ~1GB free space (Dedicated Server + Steam environment - SteamCMD)
    Full access to the Internet to configure listening ports

    2.2. Recommend (from my testing expiriences)
    Windows Server 2008 R2 SP1 (you can download it for free here)
    2 full CPU cores (at least I7 -> More Ghz is better)
    1.5GB (lightweight Windows Installation) / 1GB Ram (Core-Installation) - per dedicated server (will increase in future)
    1GB free space per instance (you will need more space in future)

    3. Prepare your System
    3.1. User
    Make sure that you are logged in as the Windows-user, which you plan to use for updating/running your DoW-server (It should have Administrator rights).

    3.2. Enable file extensions
    If you don't already have file-extensions enabled, you'll need to do that now:
    a. Go into a Windows explorer. Click Organize in menu and then "Folder and search options".

    b. Change into the tab View and uncheck "Hide extensions for known file typpes". After it click on OK button. You should now see file extensions in exporer like .exe, .txt, .bat, ...



    4. SteamCMD
    This lighweight toll to install and update your server files.

    4.1. Create Folder for SteamCMD
    Create a folder for SteamCMD at:
    C:\Program Files (x86)\SteamCMD
    (You will need Admin-Rights for doing that)

    4.2. Set folder permissions
    You will need to set the permissions for your user to the folder of SteamCMD (Full control):
    C:\Program Files (x86)\SteamCMD
    a. Goto C:\Program Files (x86)\
    b. Right click on SteamCMD directory and click Properties.

    c. In the properties window go to the tab Security and klick on the button Edit.

    d. Now you need to add your user, by clicking on the button Add.

    e. Next you enter the exact name of your current Windows user (mine is called Dani for example) and klick OK button.

    f. Now make sure your current created user is selected and give them all rights (click on the checkbox Full control/Allow). Next click OK button.

    g. You should see now your user in the final list with Full controll permissions. Klick OK button to confirm that. Your user should have all needed rights now.




    4.3. Download SteamCMD
    Download the Steam CMD for Windows here: https://steamcdn-a.akamaihd.net/clie...r/steamcmd.zip (Doku: https://developer.valvesoftware.com/wiki/SteamCMD)

    4.4. Extract SteamCMD
    Extract the SteamCMD.exe somewhere and move it into the C:\Program Files (x86)\SteamCMD\ folder.





    4.5. First run of SteamCMD
    In the first run of SteamCMD we make sure that everything works fine with SteamCMD and allow the program to update itself.
    a. Double-click on the SteamCMD.exe to open it.

    b. Now a command window opens and it should update itself. If everything ran successfully, it should look something like this:


    c. It will create also a lot of files and folders in your SteamCMD folder, so now it should look like this:


    d. (optional) If it doesn't look like this, there could be one of this problems:
    1. Your firewall is blocking SteamCMD or ...
    2. SteamCMD doesn't have permissions to write in the folder (in this case go back to ToDo:Xxx point and repeat thoose steps.)


    5. Creating server folders
    This section will explain how you can simplify your update / install procedure.

    5.1. Create a container-folder
    Create the folder C:\DoWServer like shown in the next picture. This is where all your DoW-servers will be created in. You can create it also on a different location if you want and change all links in the next steps to your location.




    5.2. Change permissions
    It's importaint that you set the permissions here too (same as you set it for your SteamCMD folder. Repeat the steps of point 4.1). It should look like this:





    5.3. Create a server-folder
    Now create a folder named "dow1". This is where SteamCMD installs your server. You can create dow2, dow3 and so on, if you want to run more than one dedicated server on this machine.
    You don't need to set the permissions here, it will get automatically the same permissions of it root-folder.



    6. Create the update script
    6.1. dowupdate.txt
    This script will be executed from SteamCMD.
    Create a new file "dowupdate.txt" in C:\DoWServer\dow1\ (Right-click/New/Text Document)




    Now edit it, and save with the folowing contend:
    PHP Code:
    login anonymous
    force_install_dir 
    "C:\DoWServer\dow1"
    app_update 541790 validate
    quit 
    Repeat this step if you have more than one server folders (dow2, dow3, ...) and keep the filename dowupdate.txt.

    6.2. Create the update batch file & install
    This is the file where you actually click at when you want to update your server.
    Create a dowupdate1.bat on your Desktop (You can create it where you want). Make sure that the file extension is .bat. The file should look like this:




    Edit it and save it with the contend:
    Code:
    @echo off
    
    echo Updating DoW Server 1 ...
    
    cd "C:\Program Files (x86)\SteamCMD\"
    steamcmd.exe +runscript "C:\DoWServer\dow1\dowupdate.txt"
    
    pause
    Repeat this step if you have more than one server (dow2, dow3, ...) and change the folder in the script from dow1 to dow2, dow3, ...

    6.3. Install the server
    Start the dowupdate1.bat on your Desktop with a double-click on it to install the 1st server. Repeat this for the other servers too, if you have created more than one.
    The update script looks like this on a successfully install:




    If the installation was successfully your C:\DoWServer\dow1\ folder should look like this:




    You can run the update-script now everytime you want to update your server-files.

    6.4. Directory structure
    Change to C:\DoWServer\dow1
    .\DaysOfWarServer.exe - This is not the server runtime. Ignore this Binary.
    .\DaysOfWar\Binaries\Win64\ - That's where you can find the actual server binary (DaysOfWarServer-Win64-Shipping.exe) and where our startscript is located at.
    .\DaysOfWar\Config\DefaultGame.ini - That's the Config which contains the default settings. Do not edit this file! It will get overwritten on every update.
    .\DaysOfWar\Saved\Config\WindowsServer\Game.ini - That's where your Server-Config is located at later. If you use the admin panel to change your settings, it will change this file.


    Continue in next post ...
    Last edited by Reiser; 02-03-2017, 08:43 AM.

    Visit official Days of War Discord server: https://discord.gg/G78HJKT
    DoW-Serverlist: http://gstats.frontscript.com/

  • #2
    7. Create start-script
    Go to C:\DoWServer\dow1\DaysOfWar\Binaries\Win64

    7.1. Copy LaunchServer.bat
    You should see a batchfile LaunchServer.bat
    Copy it and rename it to startdow1.bat (you can name it to whatever you want).




    7.2. Edit the startscript
    Importaint: Do not edit LaunchServer.bat! This is an example file and will be overwritten on update.
    Edit startdow1.bat and search for the line, which contains DaysOfWarServer-Win64-Shipping.exe
    Change it to:
    PHP Code:
    DaysOfWarServer-Win64-Shipping.exe dow_carentan Port=7777 QueryPort=27015 -LOG 
    You can change your Port and QueryPort to whatever you want. Make sure they are not in use from another server/program.
    dow_carentan would be your starting map and can be replaced to whatever map you want to use.

    Your whole file should look something like this:
    PHP Code:
    @echo "Days of War Server is Running Please Do Not Close This Window!"
    @echo off

    :START
    if exist "update" (
      
    del "update"
    )
    if 
    exist "shutdown" (
      
    del "shutdown"
      
    exit /b
    ) else (
      
    DaysOfWarServer-Win64-Shipping.exe dow_carentan Port=7777 QueryPort=27015 -LOG
      
    goto START

    You can repeat this steps for all other servers you have, but change your ports then.

    7.3. Create Shortcut
    This is optional but I highly recommend it. Make a right-click on your startscript, Send to/Desktop (create shortcut)
    Now you can start your server from the Desktop.


    8. Runtime & Firewall
    8.1. Install VC2015 Runtime
    Before we start our server(s) we will need to install the VC2015 Runtime. This is located in:
    C:\DoWServer\dow1\_CommonRedist\vcredist\2015\vc_r edist.x64.exe





    If you get an error here, check ToDo: Troubleshoot section.

    8.2. Firewall settings
    Open your firewall by clicking on the Windows Start button and typing "wf.msc" into the searchfield. Pressing Enter will open the "Windows Firewall with Advanced Security".

    a. Select on the left side "Inbound Rules" and click on the right side on "New Rule...".

    b. Select in "New Inbound Rule Wizard" window "Program" and click on Next.
    c. Select "This program path:" and click on "Browse...". Now select the server runtime C:\DoWServer\dow1\DaysOfWar\Binaries\Win64\DaysOfW arServer-Win64-Shipping.exe and click on Next.


    d. Make sure that "Allow the connection" is selected and click Next.
    e. Use Defaults (All checked), click Next.
    f. Write a Name "DoW Server 1" (Whatever you want) for example and finish the wizard by clicking Finish.





    Repeat this steps if you have more servers (don't forget to change the Ports!).

    9. First Run
    Lets do a first run to check if everything works.

    9.1. Start with startscript
    Double-click on the startdow1.bat shortcut on your Desktop.
    You should now see 2 windows opening, which should look like this (Without any error/warning window):






    Your server should now be reachable and listed.
    Wait 10 seconds and close both windows.

    9.2. Save folder
    You may have been noticed that a new folder C:\DoWServer\dow1\DaysOfWar\Saved has been created.
    Go to C:\DoWServer\dow1\DaysOfWar\Saved\Config\WindowsSe rver\
    The Game.ini is actually our server config, where we will put in variables like hostname, admin password, etc.


    10. Config
    We will now configure some server parameters.

    10.1. Edit Game.ini
    Open the Game.ini.
    The config variables are in different sections. You need to write them under the right section otherwise it will not take affect.
    As you see there is already some contend stored in the Config.

    10.2. Add hostname & passwords
    Add the folowing variables on the beginn of the existing section [/Script/DaysOfWar.ShooterGameInstance] of the Config:
    PHP Code:
    ServerName="My first server"
    ServerPassword=""
    ServerAdminPassword=mypass 
    The first line sets the servers name.
    In the second line you can define a server password.
    The third line will set a admin-password.

    You can change this line to whatever you want.

    10.3. Add Playercount
    The section [/Script/Engine.GameSession] should not exist by default:

    Add the section and the parameter at the end of the config:
    PHP Code:
    [/Script/Engine.GameSession]
    MaxPlayers=32 
    Thats where you can define the maximum of players, which are allowed to join.

    10.4. Conclusion
    Your Server config Game.ini should now look something like this:
    PHP Code:
    [/Script/DaysOfWar.ShooterGameInstance]
    ServerName="My first server"
    ServerPassword=""
    ServerAdminPassword=mypass
    bFriendlyFireEnabled
    =False
    FriendlyFireKickThreshold
    =0
    FriendlyFireBanThreshold
    =0

    [/Script/Engine.GameSession]
    MaxPlayers=32 
    Congratulation. You wrote your first server config!

    11. Start the server
    Let's start the server now and take a look if it apears in serverlist with the right name.
    Doubleclick on your startdow1.bat for doing that.

    If not check your firewall settings (you can deactivate it one time to check if it's the firewall) and check if you have edited the right config.

    12. Final word
    You installed your first Server!

    I will add soon:
    • A troubleshoot section (Problems and Solving)
    • FAQ
    • Detailed informations about server configs
    • Tuning tips
    Last edited by Reiser; 02-02-2017, 12:29 PM.

    Visit official Days of War Discord server: https://discord.gg/G78HJKT
    DoW-Serverlist: http://gstats.frontscript.com/

    Comment


    • #3
      Troubleshoot
      I can't see my server in the ingame serverbrowser. What to do?
      1. Refresh your Serverlist. It's a common issue, that sometime servers don't apears in the list the first time.
      2. Check your firewall settings: The fastes way to do that is temporary disable the firewall and restart the server. Don't forget to turn it back on. See point 8.2. for firewall settings.
      3. Check your Server Config Game.ini if you wrote your Hostname under the right section. See point 10.2.
      4. Check if your server is visible in the Steam gameserver-list: In the Steam-Client-Menu go to View / Servers and set the game filter to "Days of War".
        Otherwise you can also add your server manually by IP to Favorites.


      Since the update 1.0.4.6 my server is named "ServerNameGoesHere" and the server settings have changed. How to restore the old settings?
      First your server config is not lost! Only the config structure has changed since 1.0.4.6 and has to be corrected manually:
      1. Open your Server-Config: DaysOfWar\Saved\Config\WindowsServer\Game.ini
      2. You will see two headers [/Script/DaysOfWar.ShooterGameInstance] and [/Game/Blueprints/BP_ShooterGameInstance.BP_ShooterGameInstance_C]. The first one is the old one with your server settings. The other one was created automatically, delete the last one (the marked tesxt on my screenshot, which includes the servername "ServerNameGoesHere"):
      3. Rename your old header from [/Script/DaysOfWar.ShooterGameInstance] to [/Game/Blueprints/BP_ShooterGameInstance.BP_ShooterGameInstance_C].
      4. Restart your server. Your name and your settings should be back correctly.
      Last edited by Reiser; 04-29-2017, 12:35 PM.

      Visit official Days of War Discord server: https://discord.gg/G78HJKT
      DoW-Serverlist: http://gstats.frontscript.com/

      Comment


      • #4
        FAQ

        How to run multiple server instances?
        You need to create for every server instance a separate folder. Create a folder dow2 like you did for dow1. Repeat steps begining at 5.3.


        What is the variable for changing the Respawn Time in the server config?
        We didn't got it from the devs right now. If we get it, I will post it here!

        How can I change the server tickrate?
        You can change it with adding the following to your DaysOfWar\Saved\Config\WindowsServer\Engine.ini:
        PHP Code:
        [/script/onlinesubsystemutils.ipnetdriver]
        NetServerMaxTickRate=XX 
        I cant say if that brings you a better quality. In the past some guys also got worser performance on highter tickrate. You'll need to try it out yourself

        What is the default server tickrate?
        The default server tickrate is 30.

        How can I add maps/mods/plugins to my server?
        The DoW-Editor has not released right now, to make maps, mods, etc.
        So it's not possible right now to add maps or mods to your server.

        How can I add bans and admins via config to my server?
        Bans
        Open Game.ini
        Search for the section [/Script/DaysOfWar.ShooterGameInstance].
        To add a ban for the SteamID 12345678901234567 add the following line in this section:
        PHP Code:
        BannedPlayers=(PlayerUniqueID="12345678901234567",PlayerName="NAME",PlayerIPAddress="",bIsAdmin=False,bIsBanned=True,BannedDate="2017-02-01T08:00:00.000Z",BanReason="You have been banned by admin!"
        BannedDate is the date and time of the ban.
        BanReason is by standard "You have been banned by admin!".
        It looks like PlayerName, PlayerIPAddress, BannedDate and BanReason are not used anywhere in the current game version, but I would recommend you to set a PlayerName for you as info.

        Admins
        If you want to add admins to your config, it's almost the same (be carefull, that you don't mix it up with bans )
        Add in the [/Script/DaysOfWar.ShooterGameInstance] of your Game.ini the following line to give the user with the SteamID "01234567890123456" admin-rights:
        PHP Code:
        Administrators=(PlayerUniqueID="01234567890123456",PlayerName="NAME",PlayerIPAddress="",bIsAdmin=True,bIsBanned=False,BannedDate="",BanReason=""


        All SteamID's in the config are in SteamID64-format. You can convert your SteamID's for example here: https://steamid.io/

        Sometimes it is necessary to restart your gameserver that the changes take effect.

        Last edited by Reiser; 03-02-2017, 10:48 AM.

        Visit official Days of War Discord server: https://discord.gg/G78HJKT
        DoW-Serverlist: http://gstats.frontscript.com/

        Comment


        • #5
          ServerCfgs (comming soon)

          Visit official Days of War Discord server: https://discord.gg/G78HJKT
          DoW-Serverlist: http://gstats.frontscript.com/

          Comment


          • #6
            Tuning (comming soon)

            Visit official Days of War Discord server: https://discord.gg/G78HJKT
            DoW-Serverlist: http://gstats.frontscript.com/

            Comment


            • #7
              Mods (comming)

              Visit official Days of War Discord server: https://discord.gg/G78HJKT
              DoW-Serverlist: http://gstats.frontscript.com/

              Comment


              • #8
                Linux (comming soon)

                Visit official Days of War Discord server: https://discord.gg/G78HJKT
                DoW-Serverlist: http://gstats.frontscript.com/

                Comment


                • #9
                  Thank you for this marvelous thread! Helas i get some irritating disapointment as you can see. I still have much clues to investigate but just in case it demonstrates any obvious error, could you please let me know which one?


                  Last edited by LeBabouin; 02-13-2017, 07:00 PM.
                  http://anubis.clan.free.fr

                  Comment


                  • #10
                    Originally posted by LeBabouin View Post
                    Thank you for this marvelous thread! Helas i get some irritating disapointment as you can see. I still have much clues to investigate but just in case it demonstrates any obvious error, could you please let me know which one?

                    Hi also had that bottom error message eac_server.dll - but this cleared after manually running the server update script - but after update server no longer shows in game browser ref https://forums.playdaysofwar.com/for...4-2-to-1-0-4-3
                    http://www.mohaaaa.co.uk FPS gaming community

                    Comment


                    • #11
                      Hey heatsinkbod cool you're here too, at least 2 mohaaers in the place. Well im nearly in the place because my server doesnt start yet

                      Did i understand right the game.ini being exec'ed is the one from the "Saved" folder?
                      If i dont turn it readonly, it gets overwritten each time i try to launch.

                      Also my server console wont let me type anything into it and doesnt display anything more than in the pic i posted. Is it the normal way?
                      http://anubis.clan.free.fr

                      Comment


                      • #12
                        Originally posted by heatsinkbod View Post

                        Hi also had that bottom error message eac_server.dll - but this cleared after manually running the server update script - but after update server no longer shows in game browser ref https://forums.playdaysofwar.com/for...4-2-to-1-0-4-3
                        Did you use .\DaysOfWar\Config\DefaultGame.ini ? If yes, it's the wrong file. If you update the server it will be overwritten. So it would explain that your server is not in the list anymore, or under another name.
                        You should use .\DaysOfWar\Saved\Config\WindowsServer\Game.ini instead.

                        Originally posted by LeBabouin View Post
                        Hey heatsinkbod cool you're here too, at least 2 mohaaers in the place. Well im nearly in the place because my server doesnt start yet

                        Did i understand right the game.ini being exec'ed is the one from the "Saved" folder?
                        If i dont turn it readonly, it gets overwritten each time i try to launch.

                        Also my server console wont let me type anything into it and doesnt display anything more than in the pic i posted. Is it the normal way?
                        Yes, .\DaysOfWar\Saved\Config\WindowsServer\Game.ini is for your server configuration. It's also the save-file for admin-panel changes, so it will be changed after you change things in admin panel, thats normal. If some of your settings were removed through some changes, check if they are on the right Block and the variables have the right name too. (see my example file above)
                        Last edited by Reiser; 02-16-2017, 03:14 PM.

                        Visit official Days of War Discord server: https://discord.gg/G78HJKT
                        DoW-Serverlist: http://gstats.frontscript.com/

                        Comment


                        • #13
                          i made some progress using the -multihome option. I swear the server is updated to 1.0.4.3.

                          http://anubis.clan.free.fr

                          Comment


                          • #14
                            Originally posted by LeBabouin View Post
                            i made some progress using the -multihome option. I swear the server is updated to 1.0.4.3.

                            Thats a current bug in this version with the multihome parameter. Remove it from your startscript and it should run.

                            Visit official Days of War Discord server: https://discord.gg/G78HJKT
                            DoW-Serverlist: http://gstats.frontscript.com/

                            Comment


                            • #15


                              Port 7777 was not good for me.. Also // cannot stand in the server name. Thanks a lot for your help!
                              http://anubis.clan.free.fr

                              Comment

                              Working...
                              X