Skip to content

Running the Server

b5635 edited this page Jun 8, 2021 · 37 revisions

This is assuming Windows 10.

Pre-requisites

Docker

Before Running the Server

Make sure you that you have executed 'install.bat' to build the module before continuing.

Seeding the Treasures and Spawns

You must execute run_server_dev_seed.bat to create the needed database tables. The server will shut down if it does not detect if the databases are complete. Note: it takes about 5-10 minutes to finish it, so wait until the docker says the server has "exited" before closing it.

Running the Development Server

Run run_server_dev.bat to start the server.

Make sure you have executed run_server_dev_seed.bat at least once it or it will shut down.

Running the Production Server

Make sure you have executed run_server_dev_seed.bat at least once before running the following .bat file.

Before running the production server, you will need to execute update_server.bat at least once to copy over the files needed. Do this after any time you have updated the module and wish to see it's changes.

Also, create a text file in server/config and call it nwserver.env. Add these three lines below:

NWN_PORT=5121

NWN_PUBLICSERVER=1

NWN_SERVERNAME=<NAME OF SERVER>

Next, create a text file in server and call it docker-compose.yml. Add the following lines (pulled from the dev yml files):

version: "3.7"

services: tfn-server: hostname: tfn_server container_name: tfn_server image: nwnxee/unified:519ec3c env_file:
- ${PWD-.}/config/common.env - ${PWD-.}/config/nwserver.env restart: unless-stopped stdin_open: true tty: true volumes: - ${PWD-.}/logs:/nwn/run/logs.0 - ${PWD-.}/:/nwn/home - ${PWD-.}/logs:/nwn/data/bin/linux-x86/logs.0 ports: - "5121:5121/udp"

Finally, execute run_server.bat to start the docker instance for the server.

If you run into any issues, please hop into Discord and I will help.