Difference between revisions of "Server Hosting"

From Holdfast: Nations At War
Jump to navigation Jump to search
Line 27: Line 27:
 
==Linux==
 
==Linux==
 
===Obtaining the game files===
 
===Obtaining the game files===
 +
===Download Requirements===
 +
dpkg --add-architecture i386 && \
 +
        apt-get update && apt-get install -y \
 +
        gnupg \
 +
        gnupg1 \
 +
        gnupg2 \
 +
        curl \
 +
        xvfb && \
 +
        apt-get -y upgrade && \
 +
        curl -o Release.key https://dl.winehq.org/wine-builds/Release.key && \
 +
        apt-key add Release.key && \
 +
        echo "deb http://dl.winehq.org/wine-builds/debian stretch main" >> /etc/apt/sources.list && \
 +
        apt-get update && \
 +
        apt-get install -y --install-recommends winehq-stable && \
 +
        rm Release.key && \
 +
        apt-get clean autoclean && apt-get autoremove -y && \
 +
        rm -rf /var/lib/{apt,dpkg,cache,log}/ && \
 +
        curl http://dl.winehq.org/wine/wine-mono/4.7.1/wine-mono-4.7.1.msi | wine msiexec /i; exit 0
 
====Downloading using SteamCMD====
 
====Downloading using SteamCMD====
 
The '''Steam Console Client''' or [https://developer.valvesoftware.com/wiki/SteamCMD '''SteamCMD'''] is a command-line version of the Steam client. Its primary use is to install and update various dedicated servers available on Steam using a command-line interface. It works with games that use the SteamPipe content system. All games have been migrated from the deprecated HLDSUpdateTool to [https://developer.valvesoftware.com/wiki/SteamCMD '''SteamCMD''']. This is usually required if you are forced to use a terminal for your server setup. You can find instructions on how to download [https://developer.valvesoftware.com/wiki/SteamCMD '''SteamCMD'''] here: https://developer.valvesoftware.com/wiki/SteamCMD#Linux
 
The '''Steam Console Client''' or [https://developer.valvesoftware.com/wiki/SteamCMD '''SteamCMD'''] is a command-line version of the Steam client. Its primary use is to install and update various dedicated servers available on Steam using a command-line interface. It works with games that use the SteamPipe content system. All games have been migrated from the deprecated HLDSUpdateTool to [https://developer.valvesoftware.com/wiki/SteamCMD '''SteamCMD''']. This is usually required if you are forced to use a terminal for your server setup. You can find instructions on how to download [https://developer.valvesoftware.com/wiki/SteamCMD '''SteamCMD'''] here: https://developer.valvesoftware.com/wiki/SteamCMD#Linux

Revision as of 09:18, 29 May 2019

The following documentation details how to host a public or private gameserver for Holdfast: Nations At War. The game is currently in its Alpha stage and therefor doesn't have a dedicated server steamappID. The only officially supported game build is currently compiled for Windows x64, this means that hosting a server on Linux requires library-level virtualization (e.g. Wine).

To host a gameserver, you will require a Steam account that owns a copy of the game.

Windows

Obtaining the game files

Downloading using Steam Client

Holdfast game files folder structure

Obtaining the game files can be done via the regular Steam Client. Download the game and copy the files to another folder. It's not recommended to use the SteamApps location as a base for the gameserver, as this might lead to file corruption if a game update overwrites files whilst the server is running.

This is the default directory where the Holdfast: Nations At War game files are located:

C:\Steam\steamapps\common\Holdfast Nations At War

Downloading using SteamCMD

The Steam Console Client or SteamCMD is a command-line version of the Steam client. Its primary use is to install and update various dedicated servers available on Steam using a command-line interface. It works with games that use the SteamPipe content system. All games have been migrated from the deprecated HLDSUpdateTool to SteamCMD. This is usually required if you are forced to use a terminal for your server setup. You can find instructions on how to download SteamCMD here: https://developer.valvesoftware.com/wiki/SteamCMD#Windows

The files can then be obtain using the following batch command:

$ steamcmd +login [LOGINNAME] [PASSWORD] +force_install_dir "C:\holdfastserver" +app_update 589290 +quit

Obtaining the server files

Linux

Obtaining the game files

Download Requirements

dpkg --add-architecture i386 && \

       apt-get update && apt-get install -y \
       gnupg \
       gnupg1 \
       gnupg2 \
       curl \
       xvfb && \
       apt-get -y upgrade && \
       curl -o Release.key https://dl.winehq.org/wine-builds/Release.key && \
       apt-key add Release.key && \
       echo "deb http://dl.winehq.org/wine-builds/debian stretch main" >> /etc/apt/sources.list && \
       apt-get update && \
       apt-get install -y --install-recommends winehq-stable && \
       rm Release.key && \
       apt-get clean autoclean && apt-get autoremove -y && \
       rm -rf /var/lib/{apt,dpkg,cache,log}/ && \
       curl http://dl.winehq.org/wine/wine-mono/4.7.1/wine-mono-4.7.1.msi | wine msiexec /i; exit 0

Downloading using SteamCMD

The Steam Console Client or SteamCMD is a command-line version of the Steam client. Its primary use is to install and update various dedicated servers available on Steam using a command-line interface. It works with games that use the SteamPipe content system. All games have been migrated from the deprecated HLDSUpdateTool to SteamCMD. This is usually required if you are forced to use a terminal for your server setup. You can find instructions on how to download SteamCMD here: https://developer.valvesoftware.com/wiki/SteamCMD#Linux

The files can then be obtain using the following bash command:

$ steamcmd.sh \
        +@sSteamCmdForcePlatformType windows \
        +login [LOGINNAME] [PASSWORD] \
        +force_install_dir /opt/holdfastserver \
        +app_update 589290 +quit

Notes:

This will download the Windows game files. Library-level virtualization is required to run them (e.g. Wine.
+anonymous will fail because the account requires to own a copy of the game to download the game files!

Obtaining the server files