Virtual Machine Setup
From ALFA
This document describes in rough detail the recommended checklist for setting up a new game server host VM in the standard configuration. This configuration is suitable for running nwn2server.exe as a limited user account.
Prerequisites
- DirectX End-User Runtime
- Microsoft .NET Framework 4
- Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update
- Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update
Process
- Install Windows Server
- Copy standard tools over
- Create SG "NWN2 Servers"
- Create SG "NWN2 Admins"
- Create user "NWN2Server"
- Add to "NWN2 Servers" SG
- Create C:\NWN2, xcopy NWN2 install over
- Grant "NWN2 Servers" create files, create folders to "This folder only"
- Grant "NWN2 Admins" modify to folder, subfolders, and files
- Import NWN2.reg
- Create C:\NWN2User
- Grant full control to "NWN2 Servers"
- Grant modify/execute/list/read/write to "NWN2 Admins"
- Runas /profile /user:NWN2Server cmd.exe
- cd /d "%userprofile%\Documents"
- mklink /j "Neverwinter Nights 2" C:\NWN2User
- putty -ssh alfa@sql.alandfaraway.org
- Confirm and accept central server public key for vault tunnel to work
- Create C:\NWNX4, xcopy NWNX4 installation over
- Grant modify/execute/list/read/write to "NWN2 Admins"
- Grant modify/execute/list/read/write to "NWN2 Servers" for:
- AuroraServerNWScript.log
- AuroraServerVault.log
- nwnx.txt
- nwnx_controller.txt
- StandardQueryLog.txt
- xp_mysql.txt
- xp_bugfix.txt
- xp_objectattributes.txt
- xp_srvadmin.txt
- xp_system.txt
- xp_time.txt
- Create C:\Users\Public\Desktop\Credentials.txt
- Copy standard links to C:\Users\Public\Desktop
- Copy standard links to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Tools
- Copy standard scripts to C:\Scripts
- Copy standard NWN2 tools to C:\Tools
- Copy NWNServerConsole to C:\NWN2\Console
- Fix PowerShell signing
- Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force
- Install Git
- Install FileZilla
- Install Win8 Performance Toolkit
- Install 7-zip
- Install gvim
- Install WinDbg for Windows 7 or Windows 8.1.
- Set
_NT_SYMBOL_PATH
toSRV*C:\Symbols*http://msdl.microsoft.com/download/symbols
NWNX4 Installation
- nwnx4_controller.exe -installservice
- Get SID for NWN2Server user with PowerShell:
-
([wmi]"win32_Group.Domain='$env:ComputerName',Name='NWN2 Admins'").sid
-
- Set SD on nwnx4-1 service to allow NWN2 Admins to start/stop:
-
sc sdset nwnx4-1 D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWP;;;<>)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
-
- Install SSH private key to C:\NWNX4\sshfs.ppk
- Add SSH public key to alfa@sql.alandfaraway.org:~/.ssh/authorized_keys
- Set configuration in C:\NWNX4\nwnx.ini
- Set configuration in C:\NWNX4\AuroraServerNWScript.ini
- Set configuration in C:\NWNX4\xp_mysql.ini
- Set configuration in C:\NWNX4\DatabaseConnector.ini
- Set configuration in C:\NWNX4\AuroraServerVault.ini