-
Notifications
You must be signed in to change notification settings - Fork 24
Running the Server
This is assuming Windows 10.
The scripts here assume docker-compose standalone. For Windows, this seemingly can be installed with the installer, but for Linux, see here.
Simply running sudo apt-get install docker-compose
apparently installs a version that is old and lacks the necessary functionality for these compose files.
There is support for both a development server (does not advertise on master server, features a lot of debugging text) and a live production server.
If trying to host a server with the intention of connecting to it over the internet, experience suggests that restarting your PC after installing Docker and WSL may be a very good idea. Without doing this, multiple people have found their server is unable to connect to the master server for no discernible reason.
If you want to add your own Discord webhook, and/or access developer functionality, edit these 2das and copy them to override
for dev server functionality or server/env
for production server functionality.
The CDKeys filled in should be your public CDKey, not the entire thing.
env_dm.2da
is deprecated and no longer functions.
Assigning yourself (or someone else) developer status lifts restrictions on the more dangerous actions in DM mode. If it is configured correctly, shortly after entering the server you should get a message about your public cdkey and a "development tool" added to your inventory which offers a few debugging functions.
The entirety of the server folder and the override have gitignore rules to make sure these secrets are never committed. Obviously, if you plan on committing this to an online repo, make double sure that these secrets aren't exposed.
Run win_run_server_dev.bat
to start the development server.
The file changes mentioned below for the production server are not required, as the development server equivalents are verson controlled. The DM password is tfndev
, and the default port is 5134.
As this does not get added to master server list, you need to connect to it with direct connect:
127.0.0.1:5134
Create a text file in server/config
and call it nwserver.env
. Add these three lines below:
NWN_PORT=<PORT OF CHOICE>
NWN_PUBLICSERVER=1
NWN_SERVERNAME=<NAME OF SERVER>
Next, create a text file in the server
folder and call it docker-compose.yml
. You can use this file as a template.
To set the DM password, add under environment:
NWN_DMPASSWORD=yourpasswordhere
Run win_run_server.bat
to start the production server. This should appear on the master server's list and be joinable that way.
These are not needed to run the server, but offer some profiling functionality which can be interesting and useful.
Make a copy of /config/grafana-template.env
, and save it as just grafana.env
. Edit the contents of this with a password to log into Grafana.
Make a copy of /config/influxdb-template.env
, and save it as just influxdb.env
.
Make a copy of /grafana-provisioning/datasources/nwn.yml.template
, and remove the .template
on the end of the file name. Edit the contents of this with InfluxDB passwords. Edit this file to contain the INFLUXDB_USER and INFLUXDB_USER_PASSWORD set in influxdb.env
.
If all goes well, connecting to Grafana can be done by connecting to https://<your server's IP address>:3000
, and entering the password set in grafana.env
.
The server can take a little while to start. Trying to connect to it before it is ready (2 minutes is likely sufficient) will either ask for a password or just time out.
If you run into any issues, please hop into Discord and I will help.