Fetching contributors…
Cannot retrieve contributors at this time
87 lines (55 sloc) 2.85 KB
Setting up a Mana server
Before trying to compile, make sure all the dependencies are installed. For
each dependency the Ubuntu package name is listed as well as the website.
* libsigc++ 2.0 (libsigc++-2.0-dev) -
* libxml2 (libxml2-dev) -
* Lua (liblua5.1-0-dev) -
* PhysFS (libphysfs-dev) -
* SQLite 3 (libsqlite3-dev) -
* zlib (zlib1g-dev) -
Optional dependencies:
* MySQL (libmysqlclient-dev) -
(replaces the SQLite 3 depency)
1) cmake .
2) make
The compilation should produce two binaries:
* manaserv-account - The account + chat server
* manaserv-game - The game server
The client and the server share a big part of the data. See the example/
subfolder for an example world data.
The server loads its configuration from manaserv.xml, which it tries to find in
the directory where you're running the server from. An example file is located
at docs/manaserv.xml.example.
Default option values:
accountServerAddress localhost
accountServerPort 9601
gameServerAddress localhost
gameServerPort 9604
worldDataPath example
1. Run manaserv-account on one single computer. It will open three consecutive
UDP ports, starting from the one given by the configuration option
"accountServerPort". This first port is the one you should advertise to your
users. The configuration option "accountServerAddress" should contain the
public address the server runs on, as it will be sent to the users as the
address of the chat server, which happens to be the account server for now.
2. Run manaserv-game on multiple computers. Each game server will open one UDP
port given by the configuration option "gameServerPort". It will also connect
to the account server given by the configuration options "accountServerAddress"
and "accountServerPort". The configuration option "gameServerAddress" should
contain the public address of the computer the server runs on, as it will be
sent to the users. The file data/maps.xml contains the maps the server will
load and register on the account server; split it across your multiple game
servers, in order to balance the load.
Access to port "accountServerPort + 1" of the account server can be restricted
to connections from game servers only. Users do not need to access it.
To initally setup the database run the following command:
cat src/sql/sqlite/createTables.sql | sqlite3 mana.db
This will generate a database called mana.db according to the needs of the server.
For making a player admin do:
sqlite3 mana.db "UPDATE mana_accounts SET level=255 WHERE username='MyAccount';"