Remember that servers, like anything else on the Internet, use bandwidth. Running other Internet applications will decrease the efficiency of a dedicated server.
Temporary Servers:
OpenRPG has come a long way in the few years since its inception. With the new versions you can now create servers on-the-fly! No more black boxes or strange voodoo magic.
Simply click on the "Game Server" menu, and select "Start new server." Fill in the options and away you go! The server will appear instantly in the metaserver list. Of course, this will not provide you with all the same powers that the fully dedicated server does.
While doing this creates a server for the short term, if you want to have a long term dedicated server running, you'll want to run the OpenRPG Server in your Start Menu. You can also run this by executing mplay_server.py in your OpenRPG folder. Running a dedicated server allows you more control on your server environment, as well as the ability to design your server for specific people or games.
Running Dedicated Servers:
Well, there may be no money in creating a server with this program, but there are definately perks to running one. The server acts as a host for all OpenRPG games. Players must select a server in order to find games and/or players in the community.
By running the start_server.py or start_gui_server.py file in your OpenRPG folder, you are initializing a system level program. The first thing the program wants to do is specify your server settings. The first prompt will be to register your server with the OpenRPG metaserver. If you select yes, your server will be accessable to the public. If you select no, you will have to manually give out your server address in order for players to connect to your server. The program will also ask you for a server name as well as a lobby boot password. Set these attributes accordingly.
Once the server has finished its load up you will be presented with a list of various administrative options. Below we list these commands:
Command
Description
Announce
Add your server to the OpenRPG metaserver
Broadcast
Sends message to all clients on your server
Dump
Lists all players and lD number on your server
Dump Groups
Lists all players by room on your server
Get lobby boot password
Shows the lobby's boot password
Group (n)
Lists details about one group only
Help
Lists this menu (also can use ?)
Kick
Kicks a player from the server
Kill or Quit
Shuts down server entirely, dumping all players from the system
Log
Toggles loggin to the console off or on
Logfile [off|on|split]
Timestamped network traffic log
Log meta
Toggles logging of meta server messages on or off
Set lobby boot password
Sets the lobby's boot password
Remove room
Removes a room from the server
Register
Registers the server as a name so players can see it in their game browser. Also used to change the servers name
Roompasswords
Allow/Disallow room passwords (toggle)
Search
Will prompt for a patern and will search the user data and display the result
Unregister
Removes the server from the public list
Uptime
Reports how long the server has been running
It is important to note that the server will be running code with every client action that takes place on your server. This means that while you are typing things may flash across the screen. Do not worry. The terminal is designed to take the outputed code and the input from your keyboard differently.
In order to access your local server you may have to manually enter "localhost:6774" as your server address in the Server Browser. Entering your system routing IP will also work: "127.0.0.1:6774". Please remember that firewalls and routers must also be configured properly in order to let OpenRPG run properly. In all cases OpenRPG needs port 6774 and 80 in order to work.
Setting up a Dedicated Server on Linux:
Linux has always been a popular option to those who are inclined to run dedicated servers for games. OpenRPG is no exception, many of the dedicated servers for OpenRPG are run from low cost linux servers. To run OpenRPG on a linux machine you need only to have an up to date Python installed; wxPython is not required to run a dedicated server unless your using the GUI based server (which most people don't). Starting the dedicated server on linux is simple, just cd to your OpenRPG installation directory and type python2 start_server.py
Command Line Options
Like most unix commands OpenRPG's server accepts several command line options.
-n
Server name
-l
Lobby boot password
-p
Request metaserver registration
-h, --help
Help (duh)
If -p is given, the boot password and server name MUST be provided. If no options are given, user will be prompted for information.
Example: /usr/bin/python2 start_server.py -n 'My Server Name' -l 'MylobbyPassword' -p
Using a Startup Script
Most server administrators will quickly tire of having the server always asking for the server name, password and if they want to register the server with the meta or not. Never fear, startup script and the command line options will ease your suffering. Simply create a script (text file) like this...
cd ~/openrpg1 /usr/bin/python2 start_server.py -n 'My Server Name' -l 'MylobbyPassword' -p
Remember that your distro may locate the python2 executable in a different directory and your openrpg1 directory will likely not be in your own home directory either so your script should be adjusted for your own system.
Name the script file something that makes sense to you ( perhaps calling it go or server.sh ) and then make the file executable by running the chmod command like so...
chmod u+x [filename] (if your distro only supports the older numeric operators chmod 700 [filename])
You can now start your server by simply running the shell script directly and your server will start without any prompting at all.
Keeping the server running
Another problem that operators of dedicated OpenRPG servers face is that logging out of their session will terminate a the OpenRPG server too even if the server has been forced to the background (as when using & after the command in the bash shell). The vernerable screen command offers a simple yet effective solution to the problem.
Start your OpenRPG server under the screen command using a shell script as given in the previous section...
screen server.sh
Once your server is running you can detach from your screen session by pressing ctrl-a then the 'd' key. When you log out of your system any detached screen sessions will stay running. This command has another effect with respect to the OpenRPG server as well. It allows a system administrator to log in to their server remotely (via telnet or a secure shell ) and reattach the screen session allowing them to work directly with the running servers console from a remote location. For more information on using the screen command type screen -h at the command line.
Remote Server Administration
OpenRPG servers (version 1.6.1 and later) have built in remote administration facitilities. To use these remote administration options connect to your own server using an OpenRPG 1.6.1 or later client then type /admin set [password] into the chat window where [password] is the lobby password for your server. This will set the servers password internally in your client until you shutdown your OpenRPG client, disconnect from the server, or reset the password using the '/admin set' command. Once your server password has been set you can issue commands directly to the server from the chat window of your client. Type /admin help to see a list of supported commands and their usage on the server.
Previous: Running Games |
Next: Upgrading |
Table of Contents: OpenRPG User Guide |
OpenRPG WIKI - separate login required