Xarkanoth (talk | contribs)
No edit summary
Xarkanoth (talk | contribs)
No edit summary
Line 66: Line 66:
<div class="hf-admin-file-card hf-admin-file-card-important">
<div class="hf-admin-file-card hf-admin-file-card-important">
<div class="hf-admin-file-name">serverAdmins.txt</div>
<div class="hf-admin-file-name">serverAdmins.txt</div>
<div class="hf-admin-file-desc">Stores server administrators.</div>
<div class="hf-admin-file-desc">Auto-authorizes server administrators.</div>
</div>
</div>
</div>
</div>
Line 73: Line 73:
* '''Automatic updates:''' The game writes to <code>bannedplayers.txt</code>, <code>mutedplayerschat.txt</code>, and <code>mutedplayersvoip.txt</code> when server admins ban, chat mute, or VoIP mute players in-game.
* '''Automatic updates:''' The game writes to <code>bannedplayers.txt</code>, <code>mutedplayerschat.txt</code>, and <code>mutedplayersvoip.txt</code> when server admins ban, chat mute, or VoIP mute players in-game.
* '''Manual edits:''' You can manually add players to these lists. Restart the server for manual changes to take effect, or use [[Remote Console Commands|Remote Console Commands]] if you are reloading supported ban and mute files with <code>rc fileReloader</code>.
* '''Manual edits:''' You can manually add players to these lists. Restart the server for manual changes to take effect, or use [[Remote Console Commands|Remote Console Commands]] if you are reloading supported ban and mute files with <code>rc fileReloader</code>.
* '''Server admins:''' <code>serverAdmins.txt</code> must be placed in the base <code>/holdfastnaw-dedicated/</code> directory. Restart the server after editing it.
* '''Server admins:''' <code>serverAdmins.txt</code> is only needed if you want listed players to automatically be logged into the admin console without using [[Remote Console Commands|Remote Console Commands]]. Place it in the base <code>/holdfastnaw-dedicated/</code> directory and restart the server after editing it.


<h3>Player ID Format</h3>
<h3>Player ID Format</h3>

Revision as of 16:54, 3 July 2026

Overview

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

For rapid local testing before hosting publicly:

  1. Acquire files: Install Holdfast: Nations At War - Dedicated Server from your Steam library (Tools section).
  2. Configuration: Modify the default map rotation file, which is located in (serverconfig_default.txt).
  3. Launch: Start the server using the provided launch script: LaunchServer.ps1 (Windows) or LaunchServer.sh (Linux).
  4. Connect: In the Holdfast game, go to the server browser, click Join Custom Server, and then click the top Connect button (leaving the address as Localhost unless you changed the port).
  5. Important: To allow other players to connect, you must configure port forwarding on your router and open the necessary UDP ports in your local firewall.

Prevent Overwrites on Update

Game updates often overwrite the default launch script and configuration file. To prevent this, always create copies of these files and use the copies for your custom server:

  1. Duplicate serverconfig_default.txt to a custom name (e.g., serverconfig_myname.txt).
  2. Duplicate the launch script (e.g., LaunchServer.ps1 to LaunchServer_myname.ps1).
  3. Edit your custom launch script to point to your custom config file.

Admin, Ban & Mute Files

Holdfast dedicated servers use several plain text files to persist administrator access, bans, and mutes. These files are useful when reviewing admin actions, carrying lists between servers, or manually adding a player before the server launches.

bannedplayers.txt
Stores banned players.
mutedplayerschat.txt
Stores players muted from text chat.
mutedplayersvoip.txt
Stores players muted from VoIP.
serverAdmins.txt
Auto-authorizes server administrators.

How These Files Are Updated

  • Automatic updates: The game writes to bannedplayers.txt, mutedplayerschat.txt, and mutedplayersvoip.txt when server admins ban, chat mute, or VoIP mute players in-game.
  • Manual edits: You can manually add players to these lists. Restart the server for manual changes to take effect, or use Remote Console Commands if you are reloading supported ban and mute files with rc fileReloader.
  • Server admins: serverAdmins.txt is only needed if you want listed players to automatically be logged into the admin console without using Remote Console Commands. Place it in the base /holdfastnaw-dedicated/ directory and restart the server after editing it.

Player ID Format

Use the player's AGS ID. This is the same value as their PlayFab ID.

<ags_id> # Name of person

Anything after a # is treated as a comment. Comments are useful for leaving the player's name or the reason they were added.

SteamID is still supported for backwards compatibility when manually adding users to these files. AGS ID / PlayFab ID is the default identifier written by the game when players are added automatically.

Windows Server Hosting

Obtaining the Game Files

You can acquire the dedicated server files using one of two methods:

1. Steam Client (Recommended)

This is the easiest method if you have Steam installed:

  1. Open your Steam Library.
  2. Use the filter to select Tools (or search for Holdfast and tick the Tools box).
  3. Install Holdfast: Nations At War - Dedicated Server.
  4. Once installed, right-click the app → ManageBrowse local files to access the server folder.
Steam application to download
Browse local files in Steam

2. SteamCMD

SteamCMD is a command-line utility used to install and update dedicated servers.

  1. Download and set up SteamCMD.
  2. Run the following command, replacing [LOGINNAME] and [PASSWORD] with your Steam credentials:
steamcmd +login [LOGINNAME] [PASSWORD] +force_install_dir "C:\holdfastserver" +app_update 589290 +quit
  • Note: The account used must own the game; anonymous login will fail.
  • If the server has issues, run the command again with validate to verify files: +app_update 589290 validate.

Basic Configuration & Starting (Windows)

Holdfast merged server & game files folder structure

The server files include example configs. See Server Configuration for all options.

Duplicate Files: Following the warning above, make copies of the default files:

serverconfig_default.txt → serverconfig_newserver.txt
LaunchServer.ps1 → LaunchServer_newserver.ps1

Edit Configuration (serverconfig_newserver.txt): Set up your ports and server details. Both ports must be unique for each server instance.

# Server & Steam Ports
server_port 20100
steam_query_port 27000

# Basic variables
server_name My Custom Server
server_region europe
#server_admin_password defaultAdminPWReplace (Uncomment and replace)
#server_password mypassword (Uncomment for private server)

Action: Ensure the server_port and steam_query_port (UDP) are open in your Windows firewall and have corresponding port forwarding rules on your router. The steam_query_port is what allows the server browser to display information like player count and map.

Update Launch Script: Edit your custom launch script (LaunchServer_newserver.ps1) to ensure the arguments point to your custom config file:

# LaunchServer_newserver.ps1 - Example arguments
$args = '-s -r --serverConfigFilePath "serverconfig_newserver.txt" --outputLog "logs_output\outputlog_newserver.txt" ...'
Start-Process -FilePath "vapuriloadtester.exe" -Verb RunAs -ArgumentList $args

Start Server: Run LaunchServer_newserver.ps1 to start the server process.

Linux Server Hosting

Docker Setup (Recommended)

Using the official Docker image simplifies installation, maintenance, and updates:

Basic Installation: This command runs the server and uses the host network to automatically map required ports:

docker run -d --net=host --name=holdfastnaw-dedicated cm2network/holdfastnaw

Custom Ports: To run multiple instances, you can specify custom ports using environment variables:

docker run -d --net=host -e SERVER_PORT=20100 -e STEAM_QUERY_PORT=27000 --name=holdfastnaw-dedicated cm2network/holdfastnaw

Docker Hub: https://hub.docker.com/r/cm2network/holdfastnaw/

Note: The container automatically checks for updates on start. You must restart the container after a game update to apply it. The configuration files are located inside the container at /home/steam/holdfastnaw-dedicated/.

Manual Setup

If you are not using Docker, you can manually set up the server using SteamCMD.

Install SteamCMD, then run the following to download the dedicated server files (App ID 1424230):

steamcmd.sh +login anonymous +force_install_dir /opt/holdfastserver +app_update 1424230 +quit

Note: Use +app_update 1424230 validate later to verify the files if needed.

Basic Configuration & Starting (Linux Manual)

Duplicate Config: Navigate to the server directory and copy the default config:

cd /opt/holdfastserver
cp serverconfig_default.txt serverconfig_myserver.txt

Edit Config (serverconfig_myserver.txt): Configure your ports and server details as detailed in the Windows section (setting server_port and steam_query_port):

server_name My Server
server_region europe
server_admin_password defaultAdminPWReplace
#server_password mypassword

Start Server: Execute the main game file with required arguments. This uses the -startserver flag and runs in a headless, no-graphics mode for stability:

"./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"

Note: Replace "serverconfig_myserver.txt" with your actual config file name and verify the port -p "20100" matches your configuration file.