Difference between revisions of "Server Hosting"

From Holdfast: Nations At War
Jump to navigation Jump to search
 
(79 intermediate revisions by 7 users not shown)
Line 1: Line 1:
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. [https://www.winehq.org/ Wine]).
+
{{DISPLAYTITLE:Server Hosting}}
 +
{{ContentTemplateModernInline
 +
| welcome            = [[File:Forum Logo.png|link=|left|alt=Server Hosting]]
 +
| blurb              = How to host a public or private Holdfast server on Windows or Linux (Steam client, SteamCMD, Docker)
 +
| sections_title    = On this page
 +
| sections_content  =
 +
* [[#Quick Start Guide|Quick Start Guide]]
 +
* [[#Windows|Windows]]
 +
** [[#Obtaining the game files|Obtaining the game files]]
 +
*** [[#Download using Steam Client|Download using Steam Client]]
 +
*** [[#Download using SteamCMD|Download using SteamCMD]]
 +
** [[#Basic Configuration & Starting the Server|Basic Configuration & Starting the Server]]
 +
* [[#Linux|Linux]]
 +
** [[#Docker|Docker]]
 +
** [[#Manual Setup|Manual Setup]]
 +
*** [[#Downloading using SteamCMD|Downloading using SteamCMD]]
 +
*** [[#Basic Configuration & Starting the Server (Linux)|Basic Configuration & Starting the Server (Linux)]]
  
'''To host a gameserver, you will require a Steam account that owns a copy of the game.'''
+
| featured_title    = Server Hosting
 
+
| featured_content  = {{:{{FULLPAGENAME}}/Body}}  <!-- everything below lives on /Body -->
==Windows==
+
| image_content      =
===Obtaining the game files===
+
| layout            = auto
====Downloading using Steam Client====
+
| left_width         = 320px
[[File:FolderStructure2.jpg|thumb|Holdfast game files folder structure]]
+
| aside_width        = 320px
 
+
  | gap                = 0.5rem
Obtaining the game files can be done via the regular [https://store.steampowered.com/about/ 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.
+
| show_toc          = no
 
+
| show_section_edit  = yes
This is the default directory where the [[Holdfast: Nations At War]] game files are located:
+
}}
<pre>
 
C:\Steam\steamapps\common\Holdfast Nations At War
 
</pre>
 
 
 
====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#Windows
 
 
 
The files can then be obtain using the following batch command:
 
<pre>
 
$ steamcmd +login [LOGINNAME] [PASSWORD] +force_install_dir "C:\holdfastserver" +app_update 589290 +quit
 
</pre>
 
 
 
===Obtaining the server files===
 
 
 
==Linux==
 
As there is no dedicated server and no Linux build, setting up a [[Holdfast: Nations At War]] game server requires the usage of [https://www.winehq.org/ Wine] or some other sort of library-level virtualization. This will always incur [https://www.phoronix.com/scan.php?page=article&item=wine_win7_2010&num=2 performance looses], so it's not recommended to use [https://www.winehq.org/ Wine] to host large player servers (> 60 players). One can observe such behaviour if players start continuously sliding and jittering on the server, this can't be observed on non-virtualized game servers
 
===Download Requirements===
 
====Ubuntu & Debian====
 
Make sure no previous version of [https://www.winehq.org/ Wine] has been installed, if it has, uninstall it completely and don't forget to run apt-get autoremove to clean up the remaining files. This command will install all required packages and [https://www.winehq.org/ Wine] for you:
 
<pre>
 
$ dpkg --add-architecture i386 \
 
        && apt-get update \
 
        && apt-get install -y \
 
            gnupg \
 
            gnupg1 \
 
            gnupg2 \
 
            curl \
 
            unzip \
 
            xvfb \
 
        && 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 \
 
        && curl http://dl.winehq.org/wine/wine-mono/4.7.1/wine-mono-4.7.1.msi | wine msiexec /i; exit 0
 
</pre>
 
 
 
If you want to perform a cleanup run the following command:
 
<pre>
 
$ apt-get clean autoclean \
 
         && apt-get autoremove -y \
 
        && rm -rf /var/lib/{apt,dpkg,cache,log}/
 
</pre>
 
 
 
===Obtaining the game files===
 
====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 files can then be obtain using the following bash command:
 
<pre>
 
$ steamcmd.sh \
 
        +@sSteamCmdForcePlatformType windows \
 
        +login [LOGINNAME] [PASSWORD] \
 
        +force_install_dir /opt/holdfastserver \
 
        +app_update 589290 +quit
 
</pre>
 
 
 
Notes:
 
: This will download the Windows game files. Library-level virtualization is required to run them (e.g. [https://www.winehq.org/ Wine]).
 
: ''+anonymous'' will fail because the account requires to own a copy of the game to download the game files!
 
: You might need to enter a ''2-Factor Auth Code'' during this step.
 
: In case the server ever stops working you can run the command with ''+app_update 589290 validate'' to verify the game files
 
 
 
===Obtaining the server files===
 
You can obtain the server files, hosted [https://www.dropbox.com/sh/ppkfny3r9kcnz8x/AADiIXOrlAWPh-XbhPpimw0ja?dl=1 here], using the following command:
 
<pre>
 
$ cd /opt/holdfastserver \
 
        && curl -L -o holdfast_naw_public_servers.zip https://www.dropbox.com/sh/ppkfny3r9kcnz8x/AADiIXOrlAWPh-XbhPpimw0ja?dl=1 \
 
        && unzip -o holdfast_naw_public_servers.zip \
 
        && rm holdfast_naw_public_servers.zip
 
</pre>
 
This will place the server files in the install directory of the [[Holdfast: Nations At War|Holdfast]] game files.
 
 
 
===Basic Configuration & Starting the Server===
 

Latest revision as of 09:27, 19 September 2025


Server Hosting

How to host a public or private Holdfast server on Windows or Linux (Steam client, SteamCMD, Docker)

Navigation menu