Setting up an UFO2000 server

From UFOpaedia
Revision as of 08:27, 30 May 2015 by 7Saturn (talk | contribs) (Created page with "==Running the server== ===How to get the binary and what it brings with it=== The UFO2000-server is already included in precompiled windows binaries (<code>ufo2000-srv.exe</co...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Running the server

How to get the binary and what it brings with it

The UFO2000-server is already included in precompiled windows binaries (ufo2000-srv.exe). So for windows-users, there is little to do, to get it. For Linux you will need to compile it yourself.

Starting and stopping

You can either start it manually (stopping with CTRL+C) or let it be done by an init-script. For the moment, it is not recommended, to use the demonized-mode, as there have been reports of problems with that. On piece of advice at this point: If you choose to run the server on a regular basis, e. g. on a root-server, you really should not run the server as root. Better use an init-script, running it as a limited user. That way, it's far less dangerous, running the ufo2000-server. There are no known security issues, but the problem usually are the not known one. If somebody may find any, the service run as root is a big security risk. So keep that in mind, when running ufo2000 servers, or any other gaming server for that matter.

If you want the server to be a backup-server, don't forget to add it to this list!

Ports and routers

When running, the server automatically opens up a tiny web server, showing the current players on the server. You can reach it via http://<server-adress>:2000. The Port 2000 (TCP) is also the port, where the server listens for connections of the game. If you run it behind a NAT (e. g. used by most home routers), you will also need to forward that port to the computer, running the service.

Configuration

The file ufo2000-srv.conf contains a few options for configuration:

daemonize               = 0
tcp_port                = 2000
players_count_limit     = 32
connections_count_limit = 64
login_time_limit        = 10000
username_size_limit     = 25
packet_size_limit       = 65536

Most of it should be rather self explaining. As said before, for the moment better not use the deamonize-option.

Stats and passwords

For all games, there is a function for recording of results. These results are saved in the file ufo2000.db. All users connecting to the server, will have the opportunity to choose a password, when connecting the first time with a certain user name. This password will remain! It's saved as a MD5-hash, and can only be changed by manipulating the database-table ufo2000_users. You can either delete a user completely, or let him give you a new password-hash. The user has no way of changing it himself and you won't have any means of recovering a lost password, as there are only hashes in the table.

Logs

The file ufo2000-srv.log contains server logs. If you experience problems, first look there, to further isolate the problem.