Posted on January 12, 2020
How to run your own Moonlapse server
Interested in playing by your own rules? You can download the code to run your very own MoonlapseMUD server.
To follow along with this tutorial, you will need a machine running an operating system with access to Avanced Package Tool (or APT).
- Firstly you will need Python 3.6 which should be installed by default on most Debian-based systems.
- Install PIP, the Package Installer for Python, which is what we will use to obtain the rest of our prerequisite Python libraries
sudo apt install python3-pip
- Install the PostgreSQL, the database server the game will need to read from and write to.
sudo apt install postgresql
- Next, the drivers required to let Python and PostgreSQL talk to each other.
sudo apt install python-psycopg2
sudo apt install libpq-dev
sudo pip3 install psycopg2
- Install git and clone the MoonlapseMUD source from the current repository
sudo apt install git
git clone https://github.com/trithagoras/MoonlapseMUD
- Set a password for the operating system user
postgres, which is created when you install postgresql by default. This will be used to create your database.
sudo -u postgres psql postgresYou’ll see:
Enter new password:
Enter it again:
- From your terminal, create a new user to run the Moonlapse database and create the new database itself.
su - postgres
createuser --interactive --pwprompt
Enter name of role to add: MoonlapseAdmin
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) y
- When you’re running
postgresuser, create the database required for the game. Then run the script you downloaded earlier to create the structure for the game database.
- Create the database connection string and place it in the
- Run the server