Skip to content
Neverwinter Nights

Install a Neverwinter Nights server

Neverwinter Nights: Enhanced Edition includes a dedicated server (nwserver-linux on Linux, nwserver.exe on Windows) that hosts a module chosen on the command line. Beamdog publishes no single guide: this one cross-checks the Beamdog forums and the NWNX:EE repository and flags unconfirmed points. Allow 20 minutes.

Last updated: 10/9/2026

Neverwinter Nights: Enhanced Edition includes a dedicated server (nwserver-linux on Linux, nwserver.exe on Windows) that hosts a module chosen on the command line. Beamdog publishes no single guide: this one cross-checks the Beamdog forums and the NWNX:EE repository and flags unconfirmed points. Allow 20 minutes.

Step-by-step installation

  1. Get the server files: the game folder (Steam/GOG) or Beamdog's dedicated server package (announced on their forums).

  2. Place your .mod module (and any haks/tlk) in the server's user directory.

  3. Generate the launch line with the "nwserver command line" tool.

  4. Start nwserver with -module, -port, -maxclients, -dmpassword and -publicserver.

  5. Test locally: connect the game client to 127.0.0.1 (Multiplayer > Direct connect).

  6. Open the server's UDP port (5121 by convention) in the firewall, router and at your host.

  7. Set up a service (systemd or scheduled task) and backups of the module and characters.

  8. For SQL/Redis/etc. plugins, add NWNX:EE (Linux or Docker).

  9. Add the server on game-rank.com/jeux/neverwinter-nights.

Requirements

  • OS: 64-bit Windows or Linux (nwserver-linux binary); macOS has nwserver-macos.
  • Minimum hardware is not officially documented; a simple module fits a small VPS (1 core, 1 GB) — unofficial estimate.
  • No CD key is needed to run the server, but players need the game to log in (Beamdog forums). A dedicated IPv4 with port forwarding is recommended.

Local install (Windows)

With the game installed, nwserver.exe is in its bin folder (platform subfolder). Start it with your options; the module must be in the user directory's modules folder (-userdirectory changes it).

cd /d "C:\Program Files (x86)\Steam\steamapps\common\Neverwinter Nights\bin\win32"
nwserver.exe -module MyModule -servername "My NWN server" -port 5121 -maxclients 32 -dmpassword ChangeMe! -publicserver 1

Install on a Linux VPS (Ubuntu/Debian)

Create a non-root user, copy the Linux server files (Beamdog package) there and run nwserver-linux. I could not confirm an official SteamCMD app for the dedicated server: use the server package Beamdog announces on its forums. For Docker, the beamdog/nwserver images are flagged outdated; a community alternative is urothis/nwserver.

sudo adduser --disabled-password --gecos "" nwn
sudo -iu nwn
# copiez les fichiers serveur Linux dans ~/nwserver / copy the Linux server files to ~/nwserver
cd ~/nwserver
chmod +x nwserver-linux
./nwserver-linux -module MyModule -servername "My NWN server" -port 5121 -maxclients 32 -dmpassword ChangeMe! -publicserver 1 -quiet

Ports to open

The port is set with -port. The Beamdog forums say UDP 5121 must be forwarded to host. On a home router, forward this port (NAT) to the local IP; at OVH, Hetzner, Scaleway also open it in the firewall / security group. Test from an outside network.

  • 5121/UDP — game (usual value; change with -port).

Linux firewall (ufw)

sudo ufw allow OpenSSH
sudo ufw allow 5121/udp
sudo ufw enable
sudo ufw status

Windows firewall (netsh)

netsh advfirewall firewall add rule name="NWN UDP 5121" dir=in action=allow protocol=UDP localport=5121

systemd service (Linux)

With the -quiet option nwserver runs in the background without a console, which suits systemd. File /etc/systemd/system/nwn.service:

[Unit]
Description=Neverwinter Nights server
After=network-online.target
Wants=network-online.target

[Service]
User=nwn
WorkingDirectory=/home/nwn/nwserver
ExecStart=/home/nwn/nwserver/nwserver-linux -module MyModule -servername "My NWN server" -port 5121 -maxclients 32 -dmpassword ChangeMe! -publicserver 1 -quiet
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Automatic start on Windows

Save the command in C:\nwn\start.cmd (cd to the bin folder, then nwserver.exe ...) then schedule it:

schtasks /create /tn "NWN Server" /tr "C:\nwn\start.cmd" /sc onstart /ru SYSTEM

Updates, backups and restarts

Update the server together with the game (server and client versions must match) and, with NWNX:EE, import the new version's NWScript.zip and recompile the module. Back up the module, haks/tlk and, with -servervault 1, the servervault folder. -reloadwhenempty 1 reloads the module when the server is empty; a cron job can also restart the service.

# Sauvegarde / backup (cron : 0 4 * * *)
tar czf ~/nwn-backup-$(date +%F).tar.gz -C ~ nwserver
# Redémarrage planifié / scheduled restart (cron root : 0 5 * * *)
systemctl restart nwn

List your server

With -publicserver 1 the server appears in the game's Multiplayer list and on the community browser NWMaster (nwmaster.beamdog.net), which shows module, players and address. Also add it on game-rank.com/jeux/neverwinter-nights.

Troubleshooting

  • Module does not load: wrong name in -module (without the .mod extension) or file missing from the modules folder.
  • Server missing from the list: add -publicserver 1 and open UDP 5121 (NAT/firewall).
  • Players refused because of a version mismatch: align server and client versions.
  • "Permission denied" on Linux: make nwserver-linux executable (chmod +x) and run it as the files' owner.
  • Error after a NWNX:EE update: re-import NWScript.zip and recompile; set NWNX_CORE_LOG_LEVEL=7 for more detail.

Frequently asked questions

Is there a server config file?
Common settings go through command-line options. A nwnplayer.ini file also exists on the game side (forums mention it for settings like name or DM password), but its keys are not officially documented: the tool sticks to the command line.
Which port should I use?
UDP 5121, the usual value cited on the Beamdog forums. Change it with -port if needed, opening the same number.
Can I use Docker?
Yes, especially with NWNX:EE (nwnxee/unified image). The old beamdog/nwserver images are flagged outdated; a community alternative is urothis/nwserver.
Do I need to own the game to host?
The forums say no CD key is required to run the server, but players need a valid copy to connect. Check Beamdog's current terms for the server package.

Tools for your Neverwinter Nights server

Neverwinter Nights
Neverwinter NightsOpen access
Generate the nwserver (Neverwinter Nights) launch script: module, port, slots, passwords, PvP, levels and public listing.
LaunchScriptOpen
Documentation
Neverwinter Nights
Neverwinter NightsSign-in required
Generate the NWNX:EE launch script for Neverwinter Nights: LD_PRELOAD on Linux or a Docker nwnxee/unified command, plugins and log level.
LaunchDockerNWNXOpen
Documentation