Skip to content
This repository has been archived by the owner on Sep 16, 2018. It is now read-only.

How to setup a local server

Singest edited this page Jun 26, 2018 · 14 revisions

This page shows how to setup a local testing server for various systems.

On Debian and Ubuntu

As this is relying on manasource technology, which is highly flexible, some things need to be wired.

The following commands can be run as a script to make a local testing server, which is useful to have for development.

# first install all requirements
sudo apt-get install --yes sqlite3 screen git cmake make gcc libxml2-dev liblua5.1-0-dev libphysfs-dev libsqlite3-dev libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-pango-dev libsdl-ttf2.0-dev libsdl1.2-dev libguichan-dev libphysfs-dev libenet2a libcurl4-openssl-dev libcurl3 zlib1g-dev libsigc++-2.0-dev

mkdir -p ~/sourceoftales
cd ~/sourceoftales

# get the actual server
git clone git:https://github.com/mana/manaserv.git
cd manaserv
cmake .
make
sudo make install
cd ..

# get the actual source of tales repository
git clone git:https://github.com/tales/sourceoftales.git
cd sourceoftales
# prepare the configuration for the servers.
cp manaserv.xml.example manaserv.xml
# create a database which holds all user accounts.
cat ../manaserv/src/sql/sqlite/createTables.sql | sqlite3 mana.db
cd ..

Your local server is almost ready to use. If you haven't already done so, make sure to look over the "Installation of client" wiki page to learn how to install the client.

Make sure to edit the net_clientDataUrl value and any other configuration you need to address in manaserv.xml before you start the server. To start your newly made game server, you can use this script:

# now start the game servers, leave out if testing on our server.
cd ~/sourceoftales/sourceoftales
# run the servers in the background, so they don't block the script here.
screen -d -m ../manaserv/src/manaserv-account
sleep 5
screen -d -m ../manaserv/src/manaserv-game
sleep 5
cd ..

If you'd like to start the server right after compiling, automatically, just add the start script to the end of the compile script.

The game servers keep running even after you exit the game client so that you can log onto them later. In case you want to stop them as well, use these commands:

killall manaserv-game
sleep 5
killall manaserv-account
Clone this wiki locally