AlcugsInstall/After the Setup

From Alcugs

Jump to: navigation, search

This is the fifth part of the Alcugs server installation instructions. It serves to inform you what steps can or should be taken after the servers are basically running in order to complete the setup.

Contents

The server architecture

It is always useful to know something about the Alcugs servers if you run in problems, so I suggest reading the architecture explanation.

Firewall

To open up your server for public access, you will of course need to open and forward ports 5000-6000 (UDP) in your firewall (you do have one, right?). If you exactly followed these instructions, the internal auth, vault and tracking servers will only listen on the loop-back networking device and as a result not be accessible from the outside. These servers have no authentication, so this is the only barrier preventing anyone from getting full access to them!

Keeping the server up-to-date

If you used the SVN checkout, you should check every once in a while if there was an update for the server. Such updates can fix issues, but they can also introduce new ones, so if you experience the latter, please instantly report the issue and I will try to fix it (the fix can then be applied on your machine the same ay as the other updates). If you have problems of any kind, please try getting the latest version before reporting them, as I might already have fixed them. You can also use the AlcugsBugsAndFeatureRequests page to report bugs.

So, to get the latest trunk version of the server, do the following:

Bourne Shell
cd ~/alcugs-trunk # or wherever you put the source files svn up # if this gives you just a revision number, nothing changed and your are done. Otherwise, go on. make

After that is done, you have to restart the servers to really apply the update, for example with (since you created symlinks, which act a bit like the shortcuts many know from Windows, to the server binaries, there's no need to copy them again):

Bourne Shell
~/bin/control-servers.sh restart


Automatically start it on boot

With your current setup, your Alcugs server will stop running when you reboot the system - there is nothing which automatically starts it. To make this happen, you need to do some things as root: First of all, create a file called /etc/init.d/alcugs with the following content (assuming /home/alcugs is the base path of your installation):

#!/bin/sh

case "$1" in
    start|stop|restart)
        su alcugs -p -c "cd /home/alcugs/; bin/control-servers.sh $1"
        ;;
    *)
        echo "Usage: $0 {start|stop|restart}"
esac

This will make sure the alcugs server runs with the correct user and does not have super user (aka root) privileges. Now you just have to make sure this file is launched on startup. The steps to achieve that are different for various distributions, the following works on Debian and Debian-based ones:

Bourne Shell
  update-rc.d alcugs defaults 92 08

Getting a status page and UruVision

To get a page which lists players who are online, change the settings for the status files in the [tracking] section accordingly

Alcugs config
track.html = 1 # Enable standard online players html output (default 0) track.html.path = "/var/www/status/status.html" # Set file for online players list track.htmldbg = 1 # Enable online players html output with debug information (default 0) track.htmldbg.path = "/var/www/status/statusdbg.html" # Set file for online players list with debug information track.xml = 1 # Enable online players XML output for UruVision (default 0) track.xml.path = "/var/www/status/status.xml" # Set file for XML players list  

You will of course have to make sure that the alcugs user can write to that directory, by doing as root

Bourne Shell
mkdir /var/www/status chown alcugs:alcugs /var/www/status

There is also tool called UruVision which was created by Cyan and released under an open-source license which can run on your own machine and display the Shard status in a graphical way - it's really nice to see players linking :D

You can find a version of UruVision that is adapted to the output of the Alcugs tracking server in the "tools" directory of your Alcugs checkout. In order to use it on Windows, you will also need Python. It should work with version 2.2 and higher, I personally use version 2.5.4. To start UruVision, create a new file in the directory you put UruVision to, called it "UruVision.bat" and enter

"C:\Program Files\Python25\python.exe" UruVision.py yourserver.org /directory/status.xml

You might have to adapt that to your system and your Shard: The path to the python executable will be different if you use another version of Python or have a non-English windows system. "yourshard.org" must be the IP or hostname of your Shard. To get the last argument, you have to know how to access the status.xml file using your browser. If the full URL is "http://yourshard.org/directory/status.xml" then the above example will be correct, if the status file is in another directory or has another name, you have to change it. Make sure you don't forget the space between the IP/hostname and the path!

Cleaning up

The amount of log files, especially the ones saved for all the game servers, can get quite huge after a while. The whole "var" directory does not contain any important data, so you can safely remove it after shutting the server down - removing the log directory of a running server can have unpredictable side-effects.

Personal tools