logo logo
Installing NWNX on Linux

You can choose to download precompiled binaries or compile NWNX from the sources.
  • The (precompiled) release versions and packages are generally stable, but may be outdated.
  • The Github repository contains the latest versions of the plugins; some plugins (funcs, weapons, etc.) are available only on Git. Although, the latest code in the repository may be unstable.
Compiling from sources is usually the recommended way: some plugins are not available as precompiled binaries, and those that are may be seriously outdated.

Downloading

NWNX Linux downloads can be found here:
http://www.nwnx.org/index.php?id=nwnx2
Download linnwnx2-2.5.3-rc1.tar.gz (it contains nwnstartup.sh, nwnx2.ini), then nwnx-2.7-beta4-linux.rar. Unpack nwnstartup.sh, nwnx2.ini, nwnx2.so from these packages to your nwn server folder.
Generally, a plugin can be installed by just copying nwnx_*.so file to the server folder, but some plugins may require additional configuration (i.e. database connection settings for ODBC). Refer to plugin documentation.

Compiling from latest Git sources
To compile NWNX from sources, you need a terminal access to your server (usually via SSH). Also, GCC, gmake, git packages must be installed.
Create a new directory and run:
Code:
cd </path/to/your/directory>
git clone https://github.com/NWNX/nwnx2-linux.git .
./compile.sh

The install script will automatically configure and build NWNX.
Copy nwnstartup.sh, nwnx2.ini, nwnx2.so and nwnx_*.so for the plugins you need from 'compiled' subdirectory to your nwn server folder.

Configuring and running NWNX
Edit nwnstartup.sh and replace default vaules with your module name, server name, etc.
Install 'screen' package and run ./nwnstartup.sh from the 'screen' terminal. (Read screen manpage for more info)
There is a more advanced shell script configurable with an external .conf file that restarts the server when it crashes:
http://data.virusman.ru/nwn/nwnx-shscripts.rar

If you don't have any terminal access and don't control the script that starts the server (i.e. you can't reconfigure it to run nwnstartup.sh instead of nwserver), you can make a workaround:
1. Rename nwserver to nw_server
2. Upload this script to the server: http://data.virusman.ru/nwn/nwserver-wrapper.rar
3. Set the file execution permission (chmod 755)

Another guide for Debian-based distributions

There's another guide to installing NWNX of Debian-based Linux distributions that may also be useful: NWNX Tutorial