Introduction
This guide aims to show a was to setup a Server via SteamCMD on a Windows OS. It runs through the steps of installing the Server and making the basic configuration. This guide uses the folder E:\Games\NS2Server\
but any other valid folder works analogously. Any other folder manually set in this guide is replaceable just the same.
Tip: If you want to host the server publicly over the internet, make sure to forward both, the specified port, and the port+1 to the Server's IP-address. |
Video Tutorial
Installing the Server
Installing SteamCMD
- Download - SteamCMD for Windows
- Extract the contents to the folder that you want to run SteamCMD from (the following guide uses E:\Games\SteamCMD\).
- Your SteamCMD folder should only contain SteamCMD and not the Natural Selection 2 server files.
- This guide works with anonymous login in SteamCMD.
- DO NOT use use your personal steam account as passwords are kept in plain text on the server.
- Run steamcmd.exe
- On the first run, it will download the latest version of itself
- If you are unable to download the files, try lowering your Internet Options Security Settings to Medium, and checking the "Automatically detect settings" in the proxy options.
Installing the Dedicated Server
- Once SteamCMD is installed and updated:
- Set the folder you want Natural Selection 2 to be installed.
- Login with either your account or anonymously.
- Install the Server.
force_install_dir E:\Games\NS2Server\ login anonymous app_update 4940 validate
Creating the CMD files
- Anywhere you want, create a file with the following contents:
E:\Games\SteamCMD\SteamCmd.exe +force_install_dir E:\Games\NS2Server\ +login anonymous +app_update 4940 -beta none validate +quit E:\Games\NS2Server\x64\Server.exe -config_path "E:\Spiele\ns2dedicated\config\" -file "E:\Games\NS2Server\config\config.txt"
- Save this file as "Updateserver.cmd". If you're using notepad, make sure you change the file type to 'All Files', and include the quotes around the file name.
- Run this file whenever you need to update your server before starting it.
- Create another file with the following contents:
E:\Games\NS2Server\x64\Server.exe -file "E:\Games\NS2Server\config\config.txt"
- Save this file as "Runserver.cmd". If you're using notepad, make sure you change the file type to 'All Files', and include the quotes around the file name.
- Run this file whenever you need to update your server before starting it.
Windows Shortcut
- Alternatively, you can create a shortcut to E:\Games\NS2Server\x64\Server.exe anywhere you like and enter the following into the Target field:
E:\Games\NS2Server\x64\Server.exe -file "E:\Games\NS2Server\x64\config\config.txt"
Setting up the launch parameters
- Navigate to
E:\Games\NS2Server\config\
(if the subfolder config does not exist, create it). InE:\Games\NS2Server\config\
create a txt file called config.txt and open it. - Fill it with the following content and save it:
-config_path "E:\Games\NS2Server\config\" -logdir "E:\Games\NS2Server\config\logs\" -modstorage "E:\Games\NS2Server\mods\" -name "Test Dedicated Server" -verbose 1 -limit 20 -startmodserver -speclimit 5 -port 27018 -map ns2_veil
This creates a server called "Test Dedicated Server" that runs on port 27018, has 20 max players, 5 max spectators and starts on Veil as default map. Any of these settings can be set to a different value.
List of additional startup parameters | ||
---|---|---|
Command Line Setting | Values | Description |
-ip | IP Address | Sets the IP that the server will listen on. (omit if you do not know what this means) |
-password | string | Specifies a password for clients connecting to the server. Omit this to remove password protection. |
-webadmin | N/A | See Web Administration. If specified, runs the built-in web interface. Omit this option to disable. |
-webdomain | "string" | This string must be covered in double-quotes. Defines a web address to allow remote connections to the web interface from. If you want to use an IP address you have to set this to you internal IP (e.g. 192.168.1.2). If not set, the web server will only accept connections from localhost. |
-webport | integer | Set the port the web administration system should listen on. (Default: 80) |
-webuser | string | Specifies the user name for logging into the web server. (Single-user mode) |
-webpassword | string | Specifies the password for logging into the web server. (Single-user mode) |
-webusers | path | Loads username/password data from the specified .htpasswd file. (Multi-user mode) |
-console | N/A | Displays the interactive console on startup. Press tilde key (~) to display console after grey window appears. This is the only way to reach the console if you are using Wine on Linux to run the server. |
Setting up the MapCycle.json
(This section might require the server to be started at least once)
- In your config:// folder (in this example
E:\Games\NS2Server\config\
) you will find a file MapCycle.json you can edit.
Any Mods set in the MapCycle.json will always be loaded on the server. Mods are no longer required to be in the launch parameters.
{
"mode":"order",
"maps":["ns2_ayumi",
"ns2_biodome",
"ns2_caged",
"ns2_eclipse",
"ns2_derelict",
"ns2_descent",
"ns2_docking",
"ns2_kodiak",
"ns2_metro",
"ns2_mineshaft",
"ns2_origin",
"ns2_refinery",
"ns2_summit",
"ns2_tanith",
"ns2_tram",
"ns2_unearthed",
"ns2_veil",
{"mods":[2905095973],"map":"ns2_nexus_fixes"},
{"map":"ns2_jambi","mods":[129599221]}],
"time":30,
"mods":[117887554,208649136],
"comment":"Shine Administration 117887554, [Shine] Epsilon 208649136"
}
Additional Mods
This is a non exhaustive list of further whitelisted mods popular at the time of writing of this guide.
List of Popular Whitelisted Mods: | |
---|---|
Mod | ID |
Badges+ | 191973881 |
BlueprintObstacleFix | 2891240122 |
D&D - Interesting Score Screen | 2606061626 |
Devnull - Enhanced ScoreBoard | 2597529958 |
Devnull - Fair Start | 2569595369 |
Devnull - Quick Buy | 2658159429 |
Devnull - [Shine] Extras | 2608952840 |
Driter Kill Fix | 2876415328 |
Improved Structure Placement | 2874307238 |
InfantryPortal | 2886849901 |
[Shine] Switch Teams | 1651491195 |
Setting up ServerAdmin.json
(This section might require the server to be started at least once)
- In your config:// folder (in this example
E:\Games\NS2Server\config\
) you will find a file ServerAdmin.json you can edit.
sv_reset
", "sv_ban
", and "sv_changemap
". Use a Steam ID finder to find the Steam ID32 of all players you want to assign a role.{
"groups":{
"admin_group":{
"type":"disallowed",
"commands":[]
},
"mod_group":{
"type":"allowed",
"commands":["sv_reset","sv_ban","sv_changemap"]
}
},
"users":{
"You":{
"groups":["admin_group"],
"id":1176579681
},
"Your Mod":{
"groups":["mod_group"],
"id":205659
}
}
}
Setting up Shine Admin
(This section might require the server to be started at least once)
- In your config://shine folder (in this example
E:\Games\NS2Server\config\shine
) you will find a file UserConfig.json you can edit.
sh_reset
", "sh_ban
", and "sh_changemap
". Use a Steam ID finder to find the Steam ID32 of all players you want to assign a role.{
"Groups": {
"admin_group": {
"Commands": [],
"Immunity": 100,
"IsBlacklist": true
},
"mod_group": {
"Commands": [ "sh_reset", "sh_ban", "sh_changemap" ],
"Immunity": 10,
"IsBlacklist": false
}
},
"Users": {
"1176579681": {
"Group": "admin_group"
},
"205659": {
"Group": "mod_group"
}
},
"DefaultGroup": {
"Commands": [],
"Immunity": 0,
"IsBlacklist": false
}
}
Setting up NS2Panel reporting
- Visit NS2Panel.
- Login to your account, or create one if you don't have one already.
- Go to your profile and create a community and get an API-Token. Save this token and don't share it with anyone. Anyone with this token can report games to your community.
Warning: Be careful not to mix up the two versions of NS2Panel.json. The filename is case sensitive, and you can only use one of the two methods. |
Without Shine (Recommended)
- Add the NS2Panel Mod (2856795526) to your MapCycle.json.
- Navigate to your config:// folder
E:\Games\NS2Server\config\
and create a file named NS2Panel.json and fill it with the following content (replacing the tokenu66iGTLE7Sh7vjMO2DoO7IUkY21yJeRKyVQu9Lcq
with your token:
{
"authToken": "u66iGTLE7Sh7vjMO2DoO7IUkY21yJeRKyVQu9Lcq",
"log": 1
}
With Shine
(This section requires you to run Shine and to have Admin access.)
- In your config://shine/plugins folder (in this example
E:\Games\NS2Server\config\shine\plugins\
) you have to create a file named NS2Panel.json and fill it with the following content (replacing the tokenu66iGTLE7Sh7vjMO2DoO7IUkY21yJeRKyVQu9Lcq
with your token:
{
"AuthToken": "u66iGTLE7Sh7vjMO2DoO7IUkY21yJeRKyVQu9Lcq",
"PlayerConnectReport": {
"Enabled": true,
"SubmitTimeout": 5
},
"RoundEndReport": {
"MaxSubmitRetries": 3,
"SubmitTimeout": 5
},
"__Version": "1.0"
}
- Once the file is saved, launch the Server and join it.
- When on the Server, open the Shine Admin Menu (Default M) and activate the Plugin (permanently).
Setting up Badges+
First step is obviously to mount the mod on your server. This is done by adding its ModID (191973881) to your MapCycle.json.
- In your config://shine folder (in this example
E:\Games\NS2Server\config\shine
) you will find a file BaseConfig.json you can edit.
Here you can set badges to true. If you already are Shine Admin on your server, this step can be done through the shine interface too.
"ActiveExtensions": {
"adverts": false,
"afkkick": false,
"badges": true,
...
}
After that is done, you can start setting up the Badges. This is done easiest via the UserConfig.json
Warning: All badge names are case sensitive! |
{
"Groups": {
"admin_group": {
"Commands": [],
"Immunity": 100,
"IsBlacklist": true,
"ForcedBadges": {
"1": "admin"
}
},
"mod_group": {
"Commands": [ "sh_reset", "sh_ban", "sh_changemap" ],
"Immunity": 10,
"IsBlacklist": false,
"Badge": "mod"
}
},
"Users": {
"1176579681": {
"Group": "admin_group",
"Badges": [ "troll","kappa1" ]
},
"205659": {
"Group": "mod_group",
"Badge": "d4"
}
},
"DefaultGroup": {
"Commands": [],
"Immunity": 0,
"IsBlacklist": false,
"Badges": {
"2": [ "steam_Rookie", "steam_Squad Leader", "steam_Veteran", "steam_Commander", "steam_Special Ops", "steam_Sanji Survivor" ],
"3": [ "spongebob", "patrick", "plankton", "squidward", "crabs" ],
"4": [ "doge1", "doge2", "doge3" ],
"5": [ "skull", "skull1", "skull2gun", "skullomega", "skullskul" ]
}
}
}
In this example there are several techniques used.
- Admins always have the admin badge in their first badge slot.
- This is done utilizing
ForceBadges
on the AdminGroup specifying the slot.
- This is done utilizing
- Mods have the option to use the mod badge.
- This is done utilizing
Badge
on the ModGroup.
- This is done utilizing
- The first player gets access to the troll and kappa1 badges.
- This is done utilizing
Badges
on the player.
- This is done utilizing
- The second player gets access to the d4 badge.
- This is done utilizing
Badge
on the player.
- This is done utilizing
- The default players gets access to several badges. Certain badges are restricted to certain badge slots.
- This is done utilizing
Badges
on the DefaultGroup with the column numbers.
- This is done utilizing
- For a more in-depth description see gitHub.
Warning: Forced badges overwrite player-set badges in their slot. |
Badge Names
You can find all badges in the mod folder. If you have joined any server running Badges+ recently you can find it in your Steam folder Steam\steamapps\workshop\content\4920\191973881\ui\badges
.
If you want your badges to show any other text than "Custom Badge" ingame, you need to specify this text in the file associated with the badges plugin.
- In your config://shine/plugins folder (in this example
E:\Games\NS2Server\config\shine\plugins
) you will find a file Badges.json you can edit.
{
"BadgeNames": {},
"LogLevel": "INFO",
"__Version": "2.3"
}
And this is how you can set names for different badges. In this example, the admin badge and all the Spongebob badges have a tooltip other than "Custom Badge".
{
"BadgeNames": {
"admin": "This is god himself",
"spongebob": "Spongebob Squarepants",
"patrick": "No, this is Patrick",
"plankton": "Plankton",
"squidward": "Squidward",
"crabs": "Mr. Crabs"
},
"LogLevel": "INFO",
"__Version": "2.3"
}
Badge Lists
Warning: When using Badge Lists the L in BadgeList needs to be upper case! |
{
"Badges": {
"SteamBadges": [ "steam_Rookie", "steam_Squad Leader", "steam_Veteran", "steam_Commander", "steam_Special Ops", "steam_Sanji Survivor" ],
"SpongeBadges": [ "spongebob", "patrick", "plankton", "squidward", "crabs" ],
"SkullBadges": [ "skull", "skull1", "skull2gun", "skullomega", "skullskul"],
"AllBadges": [ { "BadgeList": "SteamBadges" }, { "BadgeList": "SpongeBadges" }, { "BadgeList": "SkullBadges" }, "doge1", "doge2", "doge3" ]
},
"Groups": {
"admin_group": {
"Commands": [],
"Immunity": 100,
"IsBlacklist": true,
"ForcedBadges": {
"1": "admin"
},
"Badges":{
"2": [ { "BadgeList": "AllBadges" } ],
"3": [ { "BadgeList": "AllBadges" } ],
"4": [ { "BadgeList": "AllBadges" } ],
"5": [ { "BadgeList": "AllBadges" } ]
}
},
"mod_group": {
"Commands": [ "sh_reset", "sh_ban", "sh_changemap" ],
"Immunity": 10,
"IsBlacklist": false,
"Badge": "mod"
}
},
"Users": {
"1176579681": {
"Group": "admin_group",
"Badges": [ "troll","kappa1" ]
},
"205659": {
"Group": "mod_group",
"Badge": "d4"
}
},
"DefaultGroup": {
"Commands": [],
"Immunity": 0,
"IsBlacklist": false,
"Badges": {
"1": [ { "BadgeList": "AllBadges" } ],
"2": [ { "BadgeList": "SteamBadges" } ],
"3": [ { "BadgeList": "SpongeBadges" } ],
"4": [ "doge1", "doge2", "doge3" ],
"5": [ { "BadgeList": "SkullBadges" } ]
}
}
}
- Admins have free access to all badges of the default user, but can put them freely in slots 2-5.
- Default players have the same access as before but can put any of their available badges in slot 1.
- The additional Badges the special users have can only be put in the slot adjacent to the vanilla badges, to their left.