Skip to content

Ns2server

github-actions[bot] edited this page Sep 11, 2026 · 2 revisions

Natural Selection 2

This guide covers the ns2server module in AlphaGSM.

The checked-in Natural Selection 2 lifecycle is wired for both process and Docker runtimes on the documented Ubuntu 24.04 Linux baseline. Its corrected launch/A2S contract is pending replacement GitHub validation, so no new PASSED tracker result is recorded for this change.

Requirements

  • Process runtime: screen
  • Docker runtime: Docker and the shared steamcmd-linux runtime image
  • SteamCMD runtime libraries (lib32gcc-s1, lib32stdc++6)
  • Python packages from requirements.txt

Quick Start

Create the server:

alphagsm myns2 create ns2server

Run setup:

alphagsm myns2 setup

Start it:

alphagsm myns2 start

Check it:

alphagsm myns2 status
alphagsm myns2 query
alphagsm myns2 info

Stop it:

alphagsm myns2 stop

Setup Details

Setup configures:

  • the game port (default 27015)
  • the install directory
  • SteamCMD downloads the server files
  • a per-instance config directory at <install_dir>/<server_name>/
  • a workshop storage directory at <install_dir>/<server_name>/Workshop
  • a managed log directory at <install_dir>/logs
  • managed claims for game UDP, game + 1 UDP, web-admin TCP, and mod-server TCP

Useful Commands

alphagsm myns2 update
alphagsm myns2 backup

Notes

  • Module name: ns2server
  • Game: Natural Selection 2
  • Engine: Spark
  • SteamCMD App ID: 4940
  • Executable: <install_dir>/x64/server_linux
  • Default map: ns2_summit
  • Process and Docker launch identical game argv as ./x64/server_linux from the install root, with relative config, log, and workshop paths
  • AlphaGSM probes exact runtime-resolved A2S on game port + 1
  • Web admin is enabled by default on httpport 8080
  • Mod server is enabled by default on modserverport 27031
  • Current correction status: replacement GitHub validation pending

Server variables

After create ns2server, inspect or change these with set:

alphagsm myserver set --list
alphagsm myserver set KEY --describe
alphagsm myserver set KEY VALUE
Key Aliases Type What it does
dir — string Install directory for the server.
exe_name — string Server executable filename.
httppassword — string Web admin password.
httpport — integer Web admin port.
httpuser — string Web admin username.
maxplayers users integer Maximum allowed players.
maxspectators — integer Maximum allowed spectators.
modserverport — integer Mod server port.
port gameport integer Primary gameplay port.
servername hostname, name string The advertised server name.
startmap map, gamemap, level, world string Startup map.

Developer Notes

Run File

  • Executable: x64/server_linux
  • Location: <install_dir>/x64/server_linux
  • Working directory: <install_dir>
  • Launch path: ./x64/server_linux
  • Engine: Spark
  • SteamCMD App ID: 4940

Server Configuration

  • Config path: <install_dir>/<server_name>/
  • Workshop storage: <install_dir>/<server_name>/Workshop
  • Log directory: <install_dir>/logs
  • Runtime argv paths: ./<server_name>, ./logs, and ./<server_name>/Workshop
  • Key settings:
    • port — Game port (default: 27015)
    • httpport — Web admin port (default: 8080)
    • modserverport — Mod server port (default: 27031)
    • maxplayers — Maximum players (default: 20)
    • maxspectators — Maximum spectators (default: 5)
    • startmap — Starting map (default: ns2_summit)

Maps and Mods

  • Map selection: via startmap
  • Mod directory: <install_dir>/<server_name>/Workshop
  • Workshop support: manual storage path only in this first AlphaGSM slice

Clone this wiki locally