Configuration file server.ini: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Hendrik Brummermann
layout
imported>Hendrik Brummermann
account_creation_status
 
(87 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Navigation for Marauroa Top|Using}}
The server is configured using a configuration file called server.ini. It is possible to use a different file using the -c command line parameter. In most cases the game will provide a GenerateINI program that you should execute to generate the server.ini file.
{{Navigation for Marauroa Users}}

The server is configured using a configuration file called server.ini. It is possible to use a different file using the -c command line parameter. In most cases the game will provide a '''GenerateINI''' program that you should execute to generate the server.ini file. Nevertheless it may be interesting to know which parameter exist and how they can be set.

If you are writing your own game, you should have a look at the provided GenerateINI programs, too.


== Database Configuration ==
== Database Configuration ==

Marauroa needs access to a database. MySQL and H2 are actively supported and tested. Other database may work too, perhaps with a few tweaks.

H2 is cool because it works out of the box without having to setup a database server: You just need to specify a filename which will be created automatically. In this example it is called marauroa-h2db and the "~" means that it is created in your home folder.


# example database connection to H2
# example database connection to H2
'''database_adapter'''=marauroa.server.db.adapter.H2DatabaseAdapter
'''database_adapter'''=marauroa.server.db.adapter.H2DatabaseAdapter
'''jdbc_url'''=jdbc:h2:~/''stendhal/database/h2db'';AUTO_RECONNECT=TRUE;DB_CLOSE_ON_EXIT=FALSE;AUTO_SERVER=TRUE
'''jdbc_url'''=jdbc:h2:~/''marauroa-h2db'';AUTO_RECONNECT=TRUE;DB_CLOSE_ON_EXIT=FALSE;AUTO_SERVER=TRUE
'''jdbc_class'''=org.h2.Driver
'''jdbc_class'''=org.h2.Driver

MySQL is a classical database server. As such it has to be setup separately. After creating a database and a user you can configure it like this:


# example database connection for MySQL
# example database connection for MySQL
'''jdbc_url'''=jdbc:mysql://''localhost''/''marboard''
'''jdbc_url'''=jdbc:mysql://''localhost''/''marauroa''
'''jdbc_class'''=com.mysql.jdbc.Driver
'''jdbc_class'''=com.mysql.jdbc.Driver
'''jdbc_user'''=''username''
'''jdbc_user'''=''username''
Line 15: Line 26:


== Game Configuration ==
== Game Configuration ==

The next section is game specific. You usually don't have to edit it. It allows the games to define classes that customize the the framework. This is explained in detail in the tutorial.


# game specific setting
# game specific setting
Line 21: Line 34:
'''world'''=games.stendhal.server.core.engine.StendhalRPWorld
'''world'''=games.stendhal.server.core.engine.StendhalRPWorld
'''ruleprocessor'''=games.stendhal.server.core.engine.StendhalRPRuleProcessor
'''ruleprocessor'''=games.stendhal.server.core.engine.StendhalRPRuleProcessor
'''python_script'''=


== Server ==
== Server ==

In the server section you can configure the tcp port and turn time. Normally the games provide recommendations for both settings. You can enable logging of server statistics by providing a file name for the statistics_filename parameter. And in case you need to debug the server, you can provide your own log4j configuration file.

'''tcp_port'''=32160
'''turn_length'''=300
'''statistics_filename'''=server_stats.xml
'''log4j_url'''=marauroa/server/log4j.properties

Version and contact information:


'''server_typeGame'''=stendhal
'''server_typeGame'''=stendhal
'''server_service'''=stendhal
'''server_name'''=Stendhal server
'''server_name'''=Stendhal server
'''server_version'''=0.81
'''server_version'''=0.81
'''server_contact'''=<nowiki>https://sourceforge.net/tracker/?atid=514826&group_id=66537&func=browse</nowiki>
'''server_contact'''=<nowiki>https://sourceforge.net/tracker/?atid=514826&group_id=66537&func=browse</nowiki>



== Limits ==
== Limits ==


You can define some limits to prevent flooding by huge amounts of data, lots of message or lots of players. This is particularly useful if your server is behind a small Internet connection.
'''allowed_bytes_per_second'''=1000000
'''allowed_messages_per_second'''=10000


'''allowed_bytes_per_second'''=1024
== Other ==
'''allowed_messages_per_second'''=20
'''max_number_of_players'''=128


There is a second set of settings very similar to the above. But those ones are not about resource usage but more about preventing trouble:
# TCP port stendhald will use.

'''tcp_port'''=32160
'''account_creation_counting_time'''=3600
'''turn_length'''=300
'''account_creation_limit'''=5
'''statistics_filename'''=./server_stats.xml
'''parallel_connection_limit'''=10
'''ip_whitelist'''=127.0.0.1

Other limits:
'''limit_characters_per_account'''=2147483647

== Account and character creation ==

Since Marauroa 3.8.4 it is possible to disable account and character creation using
'''allow_account_creation'''=false
'''allow_character_creation'''=false

This is useful if account creation is done using other means. For example filling the account, characters and rpobjects table from an other application. It is used on stendhalgame.org for the test server because the test database shares the accounts with the main database.

Since Marauroa 3.9.5 it is possible to define the initial status of new accounts.
'''account_creation_status'''=active

== RSA ==

RSA is the encryption algorithm used to protected the client server communication. Note: You need to generate your own pair of primes using GenerateINI. Do not use the following examples.


'''n'''=2408376769632966826891253753617412746862686794740723175774423430043927850498085639220684795629747326949838501777926669337171495421818563824539329224927899179237
'''n'''=2408376769632966826891253753617412746862686794740723175774423430043927850498085639220684795629747326949838501777926669337171495421818563824539329224927899179237
Line 47: Line 91:




[[Marauroa]]
[[Category:Marauroa]]
{{#breadcrumbs: [[Marauroa]] | [[Navigation for Marauroa Users|Using]] | [[Configuration file server.ini|server.ini]] }}