How to run your own Moonlapse server [Windows]

01 Nov 2021 - saltytaro

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 a Windows operating system. Do note this has only been tested with Windows 10.

Prerequisites

  1. Firstly you will need at least Python 3.6. You should follow the official Microsoft instructions to obtain this.
  2. Download pgAdmin 4, a PostgreSQL database management software tool. Visit (their download page for Windows)[https://www.pgadmin.org/download/pgadmin-4-windows] and select the most recent release.
  3. Install git. Follow the instructions over at the Git downloads page for Windows.
  4. Clone the MoonlapseMUD source from the current repository. Run the following in Powershell.

    git clone https://github.com/trithagoras/MoonlapseMUD
    
  5. Initialise the database cluster. Open pgAdmin 4 and create a new user named MoonlapseAdmin and set/remember the password for this new user.
  6. Create a new database called Moonlapse.
  7. Create the database connection string and place it in the MoonlapseMUD/server directory.

    MoonlapseMUD/server/connectionstrings.json

     {
        "user": "MoonlapseAdmin",
        "password": "myPassword",
        "host": "localhost",
        "port": "5432",
        "database": "Moonlapse"
     }
    
  8. Install dependencies. Open Powershell and run the following code, waiting for the dependencies to automatically install and for you to receive a database error.

     python MoonlapseMUD/server
    
  9. Initialise the database.

     python MoonlapseMUD/server/manage.py makemigrations server
     python MoonlapseMUD/server/manage.py migrate
     python MoonlapseMUD/server/manage.py flush
     python MoonlapseMUD/server/loaddata.py
    
  10. Run the server again!

     python MoonlapseMUD/server