summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/webserver/README
blob: 9cf41d3a02a2ce63708bd68a4a25695bba9e8296 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Webtiles server
===============
This is the Webtiles server and client.

1. Prerequisites
----------------
To run the server, you need Python (at least version 2.6) and the
Tornado library [1] for Python in at least version 2.0. Python versions
earlier than 2.7 also require the ordereddict library [2]. Webtiles
also currently only runs on Linux (it may run on other Unices, but that
has not been tested). If you install Tornado by hand, make sure Python
can find it (you may need to set PYTHONPATH before running the server).

You'll need to compile Crawl passing WEBTILES=y to make to get a
suitable binary. For publicly accessible servers, you should also use
USE_DGAMELAUNCH=y; this disables some things like Wizmode, and enables
the milestone and player location display in the lobby.


[1] http://www.tornadoweb.org/
[2] http://pypi.python.org/pypi/ordereddict/


2. Running the server for testing purposes
------------------------------------------
Compile Crawl with WEBTILES=y, make sure you've got Python and
Tornado, then run "python webserver/server.py" from the source
directory. Then open localhost:8080 with a browser, and you should see
the lobby.

3. Running a real server
------------------------
The server can be configured by modifying the file config.py. Most of
the options are commented or should be self-evident. You should
probably set uid and gid to a non-privileged user; you will also want
to enable logging to a file by removing the # before the relevant line
in the logging_config.

You will also need a script that initializes user-specific data, like
copying a default rc file if the user doesn't yet have one --
currently this is not done by the server. You can have the script be
run on every login by setting init_player_program. There is an example
script in util/webtiles-init-player.sh, but you will probably want to
customize it.