This is a rough guide for setting up a new online NWN2 server.

There are a lot of sections that would need to be improved / more detailed. Don't hesitate to edit this page and add anything.


System requirements


NWN2 Installation

You can install the NWN2Server using one of these methods:

Method 1: standard install

This is the easiest method, but will use more disk space than using Method 2.

Method 2: light server install

Method used here


Port redirection

NWN2Server uses by default port 5121.

If your server runs behind a NAT (like an internet access provider router), you will need to configure the router to redirect 5121 to your server hosting machine.

Also make sure your firewall allows port 5121.


NWNX4

  1. Download nwnx4 on the official website
  2. Extract the zip file somewhere on the system
  3. Edit nwnx.ini

NWNX4 plugins

xp_bugfix (required)

Required for displaying the server in the in-game server list (using the Client Extension). Also comes with a bunch of server bug fixes and optimization (a must have !)

Official xp_bugfix page

  1. Install Visual C++ 2005 SP1 CRT
  2. Download the latest version of the plugin on the forum page
  3. Extract the zip file and copy the dll and ini files inside the nwnx4 folder

xp_mysql (optional)

xpmysql is used by a lot of nwn2 servers as an efficient persistent database. You may not require it. You cannot use both xpmysql and xp_sqlite at the same time.

xp_sqlite (optional)

xpsqlite is used by some nwn2 servers as an easy to setup persistent database. You may not require it. You cannot use both xpmysql and xp_sqlite at the same time.


Server rules configuration

You can change the server game rules by editing Documents/Neverwinter Nights 2/nwn2player.ini

Here is an example of server options:

[Server Options]

# Server setup
Server Name=nwn.wiki server config example
ModuleUrl=https://your-module-website.com
Game Port=5121
Max Players=42
Game Type=9
PVP Setting=2
Game Region=0
GameSpy Enabled=1
Disable AutoSave=0
Auto Save Interval=0
CD Banned Behavior=0
Validate Character Ownership=1
BackupSavedChars=0
Reload Module When Empty=0
ServerDownTimer=180
MPEnabled=1
PlayerPassword=
DMPassword=5up3r53cr37

# Performance tuning / debugging
2DA Cache Size=100
2DA Engine Cache Size=100
Scripts Print To Log=1
Scripts Print To Screen=0
EnableClientModuleCleanup=1
EnableClientCampaignCleanup=1

# Server behaviour
Pause Loading During Cutscenes=0
HideChallengeRatingInExamine=0
HideEffectListInExamine=0
ShowSearchSpam=0
ShowDMJoinedMessage=0

# Player settings
AllowLocalChars=0
Suppress Base Servervault=1
Enforce Legal Characters=0
ItemLevelRestrictions=1
MinCharLevel=1
MaxCharLevel=30
Disable log in heal=1
Restore Spell Uses On Login=0
One Party Only=0
Disallow Shouting=0
PauseAndPlay=0

# Auto DownLoader
ClientSyncRequired=1
DisableClientCustomUI=1
DisableClientOverride=1
ClientCachePassphrase=ReplaceMeWithSomethingVeryRandom
ClientCacheStrategy=2
InfoURL=http://your-module-website.com/info/info.html
NewsURL=http://your-module-website.com/info/news.html
RulesURL=http://your-module-website.com/info/rules.html
AdminEmail=YourEmail@doge.com


Autodownloader

Let players automatically download / update their custom content files when they connect to a server:

https://neverwintervault.org/project/nwn2/other/nwn2-patch-123-content-autodownloader-guides


Launch server

Simply launch NWNX4_GUI.exe from the nwnx4 folder, and you should see a NWN2Server window appearing.