Install Guide for Evennia Codebase

This guide provides instructions for installing the Evennia codebase for first time use with our Third Generation hosting packages. While Evennia is supported amongst any of our game packages, please note that Evennia's resource requirements are greater than traditional codebases and require a minimum of 100 MB of system memory for operation. The codebase's system memory requirement will also quickly increase as your database and player base expand and may require additional resources to accommodate future growth.

As of this guide's writing, Evennia requires Python 3.10+ and provides an installer for all required Python libs using pyenv (Python Version Management). Using the install guide below, you will set up a software version manager for the compatible version of Python and SQLite along with extending the Software Collection environment for GCC 4.9 and the Python virtual environment configurations that support the Evennia software environment independently. The correct setup for game ports utilizing your account's registered port assignment found in your Account Welcome Email is also important as demonstrated below to ensure that others hosted on the same server platform may setup co-existing installs without conflict.


Resources

Evennia Game Documentation: https://github.com/evennia/evennia/wiki
Evennia Install Documentation: https://github.com/evennia/evennia/wiki/Getting-Started
Evennia Support Issues: https://github.com/evennia/evennia/issues/ 
ASDF Version Manager: https://github.com/asdf-vm/asdf 


Install

First, login to your shell account through SSH and download the ASDF runtime version manager.

git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.1


Configure the version manager to launch automatically each time you login to your account.

echo -e '\n### ASDF Version Manager and Evennia Environment Variables' >> ~/.bash_profile
echo -e '. $HOME/.asdf/asdf.sh' >> ~/.bash_profile
echo -e '. $HOME/.asdf/completions/asdf.bash' >> ~/.bash_profile
echo -e 'export TMPDIR=$HOME/tmp' >> ~/.bash_profile


Initialize the runtime version manager for its first time use.

source ~/.bash_profile


Update the runtime version manager to the latest version.

asdf update


Determine which CentOS Software Collection you want to use and enable the environment.
The devtoolset-3 package provides GCC 4.9.

scl --list
scl enable devtoolset-3 bash
gcc --version


List all the ASDF plugins available and add the required Python and SQLite plugins.

asdf plugin-list-all
asdf plugin-add python
asdf plugin-add sqlite
asdf plugin list


Install a supported version of SQLite for Evennia's Django dependency.

asdf list-all sqlite
asdf install sqlite 3.40.1


Setup additional environment variables based on the version of SQLite you selected and reload bash.

echo -e 'export C_INCLUDE_PATH=$HOME/.asdf/installs/sqlite/3.40.1/include:$C_INCLUDE_PATH' >> ~/.bash_profile
echo -e 'export CPLUS_INCLUDE_PATH=$HOME/.asdf/installs/sqlite/3.40.1/include:$CPLUS_INCLUDE_PATH' >> ~/.bash_profile
echo -e 'export LD_LIBRARY_PATH=$HOME/.asdf/installs/sqlite/3.40.1/lib:$LD_LIBRARY_PATH' >> ~/.bash_profile
echo -e 'export LD_RUN_PATH=$HOME/.asdf/installs/sqlite/3.40.1/lib:$LD_RUN_PATH' >> ~/.bash_profile
source ~/.bash_profile


Next, install the supported version of Python for Evennia.
Python 3.10+ requires OpenSSL 1.1.1+ which has to be passed in argument for compiling.

asdf list-all python

CPPFLAGS=-I/usr/include/openssl11 \
LDFLAGS=-L/usr/lib64/openssl11 \
asdf install python 3.11.0


Define the software versions that you want to use.

asdf global sqlite 3.40.1
asdf global python 3.11.0
asdf list python --version
sqlite3 --version


Setup a pyenv and make this environment the default at next login along with GCC 4.9.

python -m venv pyenv_evennia
source pyenv_evennia/bin/activate
echo "source /opt/rh/devtoolset-3/enable" >> ~/.bash_profile
echo "source ~/pyenv_evennia/bin/activate" >> ~/.bash_profile


In this step, you'll download Evennia, upgrade pip tools and finally install Evennia.

git clone https://github.com/evennia/evennia.git
pip install --upgrade pip setuptools wheel
pip install -e evennia


Final step, initialize the Evennia Database and create default configuration files.

evennia --init mygame


Configuration

Edit your game's settings file and adjust the port numbers for your account's registered port range.
Your registered port range can be found in your account's welcome email.

nano ~/mygame/server/conf/settings.py


Add the following lines to the bottom of the configuration file, adjust for your port range.

######################################################################
# Custom Settings
######################################################################
SERVERNAME = "Your Game Name Here"
TELNET_PORTS = [2000]
WEBSERVER_PORTS = [(2020, 2011)]
WEBSOCKET_CLIENT_PORT = 2010
AMP_PORT = 2012


Optional Configuration: SSL and SSH

Resources: Evennia Documentation - https://www.evennia.com/docs/latest/Setup/Online-Setup.html 
Refer to the Evennia Documentation if you encounter any issues with SSL.

Note: As of Evennia 0.9.5, enabling SSH causes a 500 Error on the web port home page.

Install OpenSSL libraries and dependencies for Python.

pip install pyopenssl crypto cryptography pycryptodome service_identity pyasn1 bcrypt
nano ~/mygame/server/conf/settings.py


Add the following lines to the bottom of the file, adjust for your port range.

######################################################################
# Custom SSH/SSL Settings
######################################################################
SSH_ENABLED = True
SSH_PORTS = [2001]
SSL_ENABLED = True
SSL_PORTS = [2021]


Option 1 - Generate a self-signed key and certificate

openssl req -newkey rsa:2048 -x509 -nodes -keyout ~/mygame/server/ssl.key -out ~/mygame/server/ssl.cert -days 7300


Option 2 - Use your existing SSL Certificate from your account.

cp ~/ssl/keys/<your_active_key_here> ~/mygame/server/ssl.key
cp ~/ssl/certs/<your_active_cert_here> ~/mygame/server/ssl.cert


Final Setup and Evennia Startup

cd ~/mygame
evennia migrate
evennia start
evennia status


When prompted, set up your Superuser account and password.
Once you have set up your account, your game's database should initialize and start successfully.

Your game should now be accessible through the telnet and HTTP web ports registered by your game's configuration.


Example: telnet yourdomainname.com 2000 
Example: http://yourdomainname.com:2020 

  • 7 istifadəçi bunu faydalı hesab edir
Bu cavab sizə kömək etdi?

Uyğun məqalələr

How to terminate a running process

This article describes how to terminate a running or non-responsive process under your shell...

Where can I find a codebase for my MUD or MUSH?

There are several freely distributed and open-source projects available that provide stable...

How to configure the Screen application

How to configure and run the application Screen in your shell account.Note: This environment...

Install Guide for PennMUSH Codebase

Description   This guide provides instructions for installing and configuring the latest...

Install Guide for TinyMUX Codebase

Description   This guide provides instructions for installing and configuring the latest...