Configuration
What each setting in settings.cfg does, which port your game uses, and how to open a server to the outside world.
The File
settings.cfg sits at the root of the archive. It is grouped into sections in square brackets,
one setting per line, name and value separated by whitespace. Anything after // is a comment.
[gameserver]
SERVICE_IP 0.0.0.0
SERVICE_PORT 27800
MAX_SESSIONS 500
[database]
DATABASE_PROVIDER sqlite
DATABASE_PATH ./db
The server reads it once at start. Change something, restart.
The Settings You Will Actually Touch
SERVICE_IP
Which network address to accept connections on.
0.0.0.0(the default) means every address on the machine, which is what you want for a server other people connect to.127.0.0.1means only this machine. Useful while you are testing, because nothing outside can reach it even if your firewall is open.
Do not put your public IP here unless you know why you are doing it. 0.0.0.0 already covers it,
and a hardcoded address breaks the moment your ISP changes it.
SERVICE_PORT
The port players connect to. It has a per-game default that matches what the original client expects, and you should leave it alone unless you are running more than one game on one machine.
| Game | Port | Transport |
|---|---|---|
| Gate to Heavens | 36000 login, 36001 game | UDP |
| Gate to Heavens Classic | 26000 login, 26001 game | UDP |
| RF Online (Episode 1) | 27780 | TCP |
| RF Online: Red Army | 27790 | TCP |
| RF Online: Secret of Holystone | 27795 | TCP |
| RF Online: Golden Age | 27800 | TCP |
Changing it means telling your players, and for RF it means editing the launcher’s own
launcher.ini so it points at the right place.
MAX_SESSIONS
How many players may be connected at once. 0 means unlimited. The default of 500 is far above
what a home connection will do anyway; it exists so a runaway loop cannot exhaust the machine.
The Database Section
Covered in full on the database page. The short version: leave it alone and you get a file-based database that needs nothing installed.
Opening the Server to Other People
Three things have to be true, and they fail in this order.
- The server is listening.
SERVICE_IPis0.0.0.0, and the log says it is listening on your port. - The machine’s firewall allows it. On Windows this is an inbound rule for the port, for the right protocol. Getting TCP and UDP the wrong way round is the single most common mistake, and the table above says which each game uses.
- Your router forwards it. Port forwarding to the machine’s local address, same port, same protocol.
Test from outside your own network, not from the same machine. A server that works locally and fails from outside has passed step one and failed two or three, and testing locally cannot tell you which.
Running More Than One Game on One Machine
Every game has its own port, its own database and its own directory, so they coexist without any
special configuration. Extract each archive somewhere separate and start each one. The only thing
to watch is that you do not point two of them at the same DATABASE_PATH.