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.
- OS: Windows XP or later. Linux or Mac can run nwn2server using Wine, but nwnx4 does not work. In this
- Processor: Since nwn2server is single threaded (i.e. it will use only one core), you need the highest frequency possible on a single core. The required frequency vary greatly depending on the used scripts, module size, number of players, etc. but 2.5GHz should be enough for a medium sized module.
- RAM: 4GB should be enough for windows + nwn2server + MySQL. Very large servers use 6GB.
- Disk: Disk speed will impact both nwn2server boot time and run-time responsiveness when instantiating creatures, placeables, etc. SSD are probably the best since they allow to read small files very quickly compared to hard drive disks. If you have extra RAM, you can setup a ramdisk for even better performances.
- Network: A fast network will improve player's area loading time.
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.
- Install the game using the disks / gog / steam installer
- Make sure your game is up to date
Method 2: light server install
- Copy the following files and folders from the a standard NWN2 install to a separate folder, keeping the same folder structure:
Campaigns/Neverwinter Nights 2 Campaign*/Campaign.cam
- The created folder should now contain only the required files to launch a NWN2Server instance.
- Install required windows libraries: directx 9, dotnet3.5
NWN2Server uses by default port
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
- Download nwnx4 on the official website
- Extract the zip file somewhere on the system
nwn2: Path to the nwn2 installation folder
parameters: Command line parameters passed to the nwn2server process, like:
-module yourmoduleautomatically load yourmodule.mod
-moduledir yourmoduleautomatically load yourmodule if saved as directory
-cpu 3Assign the nwn2server process to the CPU core 3
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 !)
- Install Visual C++ 2005 SP1 CRT
- Download the latest version of the plugin on the forum page
- Extract the zip file and copy the
inifiles inside the nwnx4 folder
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.
- If you don't need a MySQL server, remove
- Otherwise install a MySQL-compatible server (https://mariadb.org/ is probably the best) on the server, and edit the
server: MySQL server IP address
user: MySQL user for executing queries
password: user's password
schema: Default used MySQL schema
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.
- If you don't need SQLite, remove
- Otherwise edit
filePath to the file for storing the database file
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:
Let players automatically download / update their custom content files when they connect to a server:
NWNX4_GUI.exe from the nwnx4 folder, and you should see a NWN2Server window appearing.
NWN2Server command-line arguments
The NWN2Server process can receive multiple command-line arguments:
-home <home_path>: Path to a folder that replaces the default
Documents\Neverwinter Nights 2
-du <1|0>: Disable Client UI
-do <1|0>: Disable Client Override
-cs <1|0>: Require client to use the AutoDownloader
-difficulty <diff>: Game rules difficulty. 1=Easy, 2=Normal, 3=Hardcore D&D, 4=Very difficult
-oneparty <1|0>: Group all players in one single party
-ilr <1|0>: Item level restriction
-elc <1|0>: Enforce legal characters
-adminpassword <pass>: Admin console access password
-dmpassword <pass>: DM password
-playerpassword <pass>: Player password
-autosaveinterval <minutes>: Auto-save served game every X minutes
-pauseandplay <1|0>: Allow players to pause/unpause
-cpu <id>: Assign server process to a specific core ID
-maxlevel <level>: Server max level
-minlevel <level>: Server required minimum level
-pvp <1|0>: PVP settings. 0=None, 1=Party, 2=Full
-load <save_name>: Load saved game
-moduledir <module_name>: Load module in directory mode
-module <module_name>: Load module
-servervault <path>: Servervault path ?
-port <port>: NWN2Server port (defaults to 5121)
-maxclients <number>: Max number of players connected
You can set these arguments by editing the
parameters line in