Installing WSL1 is not covered in this guide, you can follow the steps in this article. Only do the Installing WSL. and Getting Started with your Linux subsystem. steps. Be sure to install the Ubuntu 18.04 LTS distro. You can try the Ubuntu distro which is Ubuntu version 20.04, but I haven't tested it myself.
This guide will only support SQLite and MySQL for NWNX_SQL.
While NWNX_SQL will be compiled with MySQL support, setting up the actual MySQL database is not covered in this guide.
Advanced plugins like the Profiler, Lua, Ruby and DotNET plugins are not covered.
sudo apt update && sudo apt upgrade -y
sudo apt install -y git unzip zip cmake build-essential libsqlite3-dev libssl-dev libmysqlclient-dev
git clone https://github.com/nwnxee/unified.git
cd ~/unified./Scripts/buildnwnx.sh -j 4
Check the NWNX Repo for the NWN Build NWNX is targetting and replace the XXXX.YY-ZZ below with the right NWN Build. Note: the NWNX and NWN server binary version must match.
cd ~/mkdir servercd serverwget https://nwn.beamdog.net/downloads/nwnee-dedicated-XXXX.YY-ZZ.zipunzip nwnee-dedicated-XXXX.YY-ZZ.ziprm nwnee-dedicated-XXXX.YY-ZZ.zipcd bin/linux-x86./nwserver-linuxexitcd
If your Windows NWN Userdirectory is C:\Users\<Username>\Documents\Neverwinter Nights\ it can be accessed in WSL through /mnt/c/Users/<Username>/Documents/Neverwinter Nights/
-
nano ~/.local/share/Neverwinter\ Nights/nwn.iniChange the
MODULES,HAKandTLKaliases to your windows nwn userdirectory:MODULES=/mnt/c/Users/<Username>/Documents/Neverwinter Nights/modulesHAK=/mnt/c/Users/<Username>/Documents/Neverwinter Nights/hakTLK=/mnt/c/Users/<Username>/Documents/Neverwinter Nights/tlkPress
Ctrl+xto exit andyto save
-
cd ~/ -
wget https://raw.githubusercontent.com/Daztek/NWNX-WSL/master/run-server.sh -
chmod +x run-server.sh -
nano run-server.shEdit the file to your liking, by default all plugins but
ServerLogRedirectorare disabled. Don't forget to setMODNAMEto your module filename, without .mod.Press
Ctrl+xto exit andyto save.
-
./run-server.shIt'll automatically load your module from the windows side and start the server, by default it's only accessible through LAN.
To stop the server, just type
exitin the console.
If you want to update NWNX:EE at some point you can do the following:
cd ~/unifiedgit pull./Scripts/buildnwnx.sh -j 4cd
When Beamdog releases a patch you'll need to update nwserver-linux, this is how:
Replace XXXX.YY-ZZ with the needed version, for example 8193.35-37
cd ~/serverrm -r bin/ data/ lang/wget https://nwn.beamdog.net/downloads/nwnee-dedicated-XXXX.YY-ZZ.zipunzip nwnee-dedicated-XXXX.YY-ZZ.ziprm nwnee-dedicated-XXXX.YY-ZZ.zipcd
If you want to edit settings like "Sticky Player Names", "Show DM Joined Messages" etc you can do the following:
nano ~/.local/share/Neverwinter\ Nights/settings.tml
Change the settings you want and press Ctrl+x to exit and y to save.
If you want Redis support, you can do the following:
-
sudo apt install -y redis-server -
sudo nano /etc/redis/redis.confFind the
supervised noline and change it tosupervised systemdPress
Ctrl+xto exit andyto save. -
sudo service redis-server startThis starts the redis server and has to be done every time your PC is restarted.