Difference between revisions of "Server Hosting"

From Holdfast: Nations At War
Jump to navigation Jump to search
Line 18: Line 18:
  
 
  | featured_title    = Server Hosting
 
  | featured_title    = Server Hosting
  | featured_content  =
+
  | featured_content  = {{:{{FULLPAGENAME}}/Body}}  <!-- everything below lives on /Body -->
 
 
The following documentation details how to host a public or private game server for [[Holdfast: Nations At War]]. The game offers an anonymous dedicated server for both Linux and Windows.
 
 
 
== Quick Start Guide ==
 
Quick start guide for local testing:
 
 
 
# Download <code>Holdfast: Nations At War - Dedicated Server</code> from Steam (<code>Tools</code> section).
 
# Change the map rotation file (<code>serverconfig_default.txt</code>) and add mods or change maps.
 
# Launch the server using <code>LaunchServer.ps1</code> (Windows) or <code>LaunchServer.sh</code> (Linux).
 
 
 
* In Holdfast’s server browser click **Join Custom Server**, then click the top **Connect** (leave localhost; change the port if required).
 
* If you want other players to connect, you’ll likely need to set up port forwarding on your router and open the ports in your local firewall.
 
 
 
'''Warning: Game updates will overwrite the changes to the <code>LaunchServer</code> script and <code>serverconfig_default.txt</code>. To prevent this, create copies of both files and change the arguments of your custom <code>LaunchServer</code> script to point to your custom <code>serverconfig</code> file.'''
 
 
 
== Windows ==
 
=== Obtaining the game files ===
 
==== Download using Steam Client ====
 
The easiest way is through Steam using the <code>Holdfast: Nations At War - Dedicated Server</code> app in your library.
 
 
 
1. Open your Steam Library.
 
2. Choose **Tools** in the library filter (or search for <code>holdfast</code> and tick **Tools**).
 
3. Install **Holdfast: Nations At War - Dedicated Server**.
 
4. After install, right-click the app → **Manage** → **Browse local files**.
 
 
 
{|style="margin:0 auto;"
 
| [[File:ServerSteamLocation.png|thumb|Steam application to download]]
 
| [[File:ServerBrowseLocalFiles.png|thumb|Browse local files in Steam]]
 
|}
 
 
 
==== Download using SteamCMD ====
 
The '''Steam Console Client''' or [https://developer.valvesoftware.com/wiki/SteamCMD SteamCMD] is a command-line Steam client used to install/update dedicated servers.
 
 
 
Download and set up SteamCMD (see Valve’s guide). Then run:
 
<pre>
 
steamcmd +login [LOGINNAME] [PASSWORD] +force_install_dir "C:\holdfastserver" +app_update 589290 +quit
 
</pre>
 
 
 
Notes:
 
: ''+anonymous'' will fail here; the account must own the game to download these files.
 
: You may be prompted for a two-factor code.
 
: If the server stops working, run with ''+app_update 589290 validate'' to verify files.
 
 
 
=== Basic Configuration & Starting the Server ===
 
[[File:FolderStructure.jpg|thumb|Holdfast merged server & game files folder structure]]
 
 
 
The server files include example configs. See [[Server_Configuration|Server Configuration]] for all options.
 
 
 
Duplicate the defaults:
 
<pre>
 
serverconfig_default.txt -> serverconfig_newserver.txt
 
LaunchServer.ps1        -> LaunchServer_newserver.ps1
 
</pre>
 
 
 
Edit the new config:
 
<pre>
 
### Server & Steam Ports (Both ports must be unique per server instance).
 
server_port 20100
 
steam_query_port 27000
 
</pre>
 
 
 
'''Notes:'''
 
: Open the corresponding UDP ports in your firewall.
 
: Properly configured servers respond to [https://developer.valvesoftware.com/wiki/Server_queries A2S queries] on ''steam_query_port'' (map, player count, etc.). Official servers do not respond to A2S; community servers do.
 
 
 
Basic variables:
 
<pre>
 
server_name My Server
 
server_region europe #
 
server_admin_password defaultAdminPWReplace
 
#server_password mypassword
 
</pre>
 
 
 
Update the launch script to use your config:
 
<pre>
 
# LaunchServer_newserver.ps1
 
$args = '-s -r --serverConfigFilePath "serverconfig_newserver.txt" --outputLog "logs_output\outputlog_newserver.txt" --logArchivesDirectory "logs_archive" --framerate 120 --serverheadless --adminCommandLogFilePath "logs_adminactions\adminlog_newserver.txt" --chatLogFilePath "logs_chat\chatlog_newserver.txt" --playersLogFilePath "logs_playerlogin\playerlogin_newserver.txt" --scoreboardLogFilePath "logs_score\scorelog_newserver.txt"'
 
Start-Process -FilePath "vapuriloadtester.exe" -Verb RunAs -ArgumentList $args
 
</pre>
 
 
 
Run <code>LaunchServer_newserver.ps1</code> to start the server.
 
 
 
== Linux ==
 
=== Docker ===
 
If you use [https://www.docker.com/ Docker]:
 
<pre>
 
docker run -d --net=host --name=holdfastnaw-dedicated cm2network/holdfastnaw
 
</pre>
 
 
 
The container auto-updates on start—restart it after a game update.
 
 
 
Config path: <code>/home/steam/holdfastnaw-dedicated/</code>
 
 
 
Another instance (adjust ports):
 
<pre>
 
docker run -d --net=host -e SERVER_PORT=20100 -e STEAM_QUERY_PORT=27000 --name=holdfastnaw-dedicated cm2network/holdfastnaw
 
</pre>
 
 
 
Docker Hub:
 
[https://hub.docker.com/r/cm2network/holdfastnaw/ https://hub.docker.com/r/cm2network/holdfastnaw/]
 
 
 
=== Manual Setup ===
 
==== Downloading using SteamCMD ====
 
Install [https://developer.valvesoftware.com/wiki/SteamCMD SteamCMD], then:
 
<pre>
 
steamcmd.sh +login anonymous +force_install_dir /opt/holdfastserver +app_update 1424230 +quit
 
</pre>
 
 
 
Notes:
 
: To verify files later: ''+app_update 1424230 validate''.
 
 
 
==== Basic Configuration & Starting the Server (Linux) ====
 
Duplicate the default config:
 
<pre>
 
cd /opt/holdfastserver
 
cp serverconfig_default.txt serverconfig_myserver.txt
 
</pre>
 
 
 
Configure ports:
 
<pre>
 
### Server & Steam Ports (Both ports must be unique per server instance).
 
server_port 20100
 
steam_query_port 27000
 
</pre>
 
 
 
Notes:
 
: Open the UDP ports in your firewall.
 
: Properly configured servers respond to A2S on ''steam_query_port''.
 
 
 
Basic variables:
 
<pre>
 
server_name My Server
 
server_region europe #
 
server_admin_password defaultAdminPWReplace
 
#server_password mypassword
 
</pre>
 
 
 
Start the server:
 
<pre>
 
"./Holdfast NaW" -startserver \
 
  -batchmode \
 
  -nographics \
 
  -screen-width 640 \
 
  -screen-height 480 \
 
  -screen-quality "Fastest" \
 
  -framerate "120" \
 
  --serverheadless \
 
  -serverConfigFilePath "serverconfig_myserver.txt" \
 
  -logFile "logs_output/outputlog_server.txt" \
 
  -logArchivesDirectory "logs_archive/" \
 
  -p "20100"
 
</pre>
 
 
 
 
  | image_content      =
 
  | image_content      =
 
  | layout            = auto
 
  | layout            = auto

Revision as of 08:47, 19 September 2025


Server Hosting

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

Navigation menu