User:Arek75/Installing the Linux Dedicated Server/Hosting your first game

Ok, now to host your first game (for testing purposes).

The first thing you should do is make sure you're not currently logged in as nwn. The easiest way to do this is to completely log out of the system and log back in (and get a console if necessary). Do so now.

Now, you just need to run the 'start-nwserver' script you made earlier:

If all goes well, you should see a few messages. The last one should say "Server: Running". If so, you're doing good, so now load a module. Chapter 1 of the OC is a good one to test with, so enter the following:

The server will say Server: Loading module "Chapter1" followed by a bunch of dots, then Server: Module loaded.

Now, run NWN on your gaming machine and connect to the server. There are 2 possibilities here:
 * Your server is connected to the same local network as your gaming machine. In this case, just use 'Join LAN game' and select your server from the list (it should be the only one there).
 * Your server is hosted by someone else, in which case you need to Direct Connect to it using its IP address.

If you can't connect, make sure that your host has his firewall/router settings set correctly and is forwarding all the correct ports. If you got this far and you're on the same local network as your server, you should have no problems connecting - check your windows firewall settings, and check the firewall settings on the server box if you've messed with them.

Congratulations! You're hosting your first game. You can play for a few minutes if you want, but I'd recommend shutting down the server and taking a break for a while. To do so, first exit NWN on your gaming machine, then shut down the server by typing the following command at the console:

That'll get you back to the command prompt. Now just check one little thing before going on: If this returns anything besides blank lines, directory names, and totals, check that you set the suid/sgid bits on nwserver correctly and that nwserver belongs to the nwn user/group. Please re-read all the instructions for installing NWN and NWServer and make sure you followed them correctly.

Note: If you're hosted and couldn't get a special nwn user (and probably had to install to somewhere in your home directory), the above command is meaningless. If you were able to get NWServer to run and were able to log in, everything's OK.