devicenull Join Date: 2003-04-30 Member: 15967Posts: 1,538Members, NS2 Playtester, Squad Five Blue
edited February 2012 in Modding
For your serverThis tool will automatically keep a NS2 server update to date. It will query for an update every 5 minutes, and if one is found will kill the server and start HldsUpdateTool. It also provides an optional web UI, where you can view your server's log, execute rcon commands, and view player information.
* Automatic updates
* Automatic restart on crash
* Server logs archived
* Performance graphs (cpu, memory, tickrate, players)
* Server remote control (view server log, players, chat remotely. Send rcon commands and see the server's response)
1) Grab all the files from your dist/ directory, and upload them to your server (they should go in the same directory as your existing Server.exe binary).
2) In whatever script you use to start the server, replace 'Server.exe' with 'ns2update.exe'. (If you don't use a script, just start ns2update.exe instead of Server.exe)
3) (not required) Apply this registry tweak so memory read errors don't hang the server: http://www.zhacks.com/2010/04/10/disable-a...-be-read-popup/ . If you choose not to apply this, it's possible for your server to crash and not be automatically updated.
Once the tool is running, it will automatically start your server up, then check for updates every 5 minutes. It will check that the server is still running every 5 seconds, and restart it if it has crashed.
Every 5 minutes the cpu/memory/tickrate/players will be recorded and a graph generated. This graph will be saved to ns2server.png in the same directory as Server.exe. NOTE: tickrate will only be recorded if you are running NS2GmOvermind. The stock server does not have any way to retrieve this information.
The tool will check the server directory and it's parent directory for hldsupdatetool.exe. If you have it somewhere else, create a ns2update.cfg file in your server directory. Put the full path (include hldsupdatetool.exe) to the update tool on the first line.
This tool can optionally restart your server when it goes from full -> empty (Useful due to the resource leaks in NS2). To enable this, add "--restartwhenempty" to your command line. Note that if you are running the server on something other then the default IP/port, you must set the IP and port using the "-ip X.X.X.X -port 27016" command line arguments in order to make use of this feature.
If you wish to make use of the web interface, you need to enable web administration (see NS2's 'Dedicated Server Usage.txt' for info). NS2Update will create itself a user when it starts up (a new password will be chosen on each restart). Once you have enabled this, you need to add another user (for yourself!). Once you have added the user, you can log into the ns2update webui with your rcon username/password. Guest users will only be able to see the active player list.
The web interface will bind to your 'webadminDomain' IP, with the port being one higher then 'webadminPort'.
If you experience any issues, please open a bug on GitHub. Sending me forum PMs is less then ideal, as the forum PM interface is about 75% broken and not open to the public!
This is the public interface, anyone with the URL can view it:
Here, you can view your server's console (in real time), as well as execute rcon commands:
You can also view all the chat that's happening on the server, though responding is not yet possible (NS2 doesn't currently have a 'say' rcon command):
You can get the binary and source code at https://github.com/devicenull/NS2Update . See the Downloads button in the top right if you want a zip or tar.gz .
Rent NS2 Dedicated Servers at www.gameservers.com