Guide: Gamemaster (MAIN NET) - Hemis-Blockchain/Hemis GitHub Wiki

Introduction

This is a guide on how to install a Gamemaster on Hemis Main Net. If you're looking to install a Gamemaster on testnet please refer to the testnet guide. This guide will cover two ways on how to set up a Main Net Gamemaster. One using your local machine and one using your local machine and a remote VPS. Using a VPS is generally considered best since for a Gamemaster to function properly it needs to be online 24/7.

Method 1: VPS

You will need a clean VPS with 2GB ram running Ubuntu. Make sure your local Hemis wallet contains at least 1000 HMS (1000 plus change for network fees). You don't need coins in the VPS wallet.

Step 1: on your local machine

Make sure you have the latest Hemis Core wallet installed. You can find it here:

https://github.com/Hemis-Blockchain/Hemis/releases/latest

Start the wallet and open the tab GAMEMASTERS and click Create Gamemaster Controller. This will open a pop up window. Here you will give your Gamemaster a name (anything you like). Next you will enter the IP address of your VPS. The port is already filled in. Clicking next will close the pop up and send a transaction containing the collateral to your own wallet. This transaction will take 15 confirmations but you can continue the guide in the meantime.

You will see your newly created Gamemaster in the Gamemasters list. Now click the three dots next to your Gamemaster and select Info. This displays a screen with various information about your Gamemaster. At the bottom you will see Export data to run the Gamemaster on a remote server. There is a copy icon next to it. Click that and click OK on the next screen. We will need this data on the VPS.

Step 2: on your VPS

First of all you will login to your VPS and paste in the following command:

wget https://raw.githubusercontent.com/Hemis-Blockchain/Hemis/main/vps-install.sh && bash vps-install.sh

This will run the Hemis VPS install script. Wait for it to finish.

Now we will need to add the data we just copied from the local wallet to the conf file on the VPS. To do this we'll first open the conf in a text editor. Enter the following command:

nano ~/.Hemis/Hemis.conf

You will see that there is some information already there. Navigate to the bottom of the file with your arrow keys and on a new line paste in the data we just copied from the local wallet. It should now look like this:

daemon=1
rpcuser=
rpcpassword=
gamemaster=1
externalip=159.223.30.23
gamemasteraddr=159.223.30.23:49165
gamemasterprivkey=93Rpxx2AP2TApxcDmPfkeiosmG9dtvdfKMMJ1ziZbzSQ5Eu7kPp

Press CTRL+x to close the file and press y then enter when asked to save changes.

We'll now make sure the firewall allows connections by typing in this command:

sudo ufw allow 49165

Finally, we'll start Hemis with the following command:

Hemisd

You'll see a message stating "Hemis server is starting". We'll need to wait for Hemis to fully synchronise before we continue. This will take 5 or 10 minutes usually. You can check whether Hemis is synchronised by typing:

Hemis-cli getinfo

This will return a lot of information. The number behind "blocks:" should be the same as the block height on the Hemis explorer:

https://explorer.hemis.tech/

Once this is the case we're finished on the VPS and we'll go back to the local wallet.

Step 3: on your local machine

Your remote VPS is all set up and ready so all we have left to do is to start the Gamemaster. Go to the GAMEMASTERS tab. If your collateral transaction does not yet have 15 confirmations you'll need to wait a bit. If it does have enough confirmations you can click the three dots next to your Gamemaster and click Start. You will see its status change to PRE_ENABLED. The network will take some time to confirm that your Gamemaster is online. This can take from 15 minutes up to a couple of hours so check back later. Once its active the status will change to ENABLED.

If you want to make sure it all worked out. You can go to your VPS and issue the following command:

Hemis-cli getgamemasterstatus

It should return something like this:

{
  "txhash": "9fd1f6fd44ed16450bec26910e896aa6e3c62a5c3147b505adcd92d7fc495d1f",
  "outputidx": 0,
  "netaddr": "159.223.224.195:49165",
  "addr": "yJC3RC8YR4vUReFpBPWEBUaRd8iBSYtuaL",
  "status": 4,
  "message": "Gamemaster successfully started"
}

Method 2: Local machine

Requirements

  • 1000+ HMS: You need to have 1000 HMS in your wallet to create a Gamemaster using the GUI, plus some change for network fees.
  • Hemis QT Wallet: Make sure you have the latest version of the Hemis Core wallet installed on your local machine.

Step 1: Download and Install Hemis Core Wallet

  1. Download the latest Hemis Core wallet here:

https://github.com/Hemis-Blockchain/Hemis/releases/latest

  1. Install and sync the wallet by opening it and letting it fully synchronize with the Hemis blockchain. Be sure to open the Hemis Core Main Net wallet with the white icon.

Step 2: Create the Gamemaster

  1. Switch to the Gamemasters tab in the wallet software:

    • Click on "Create Gamemaster Controller" on that tab.
    • Click "Next".
  2. Set Gamemaster Name:

    • In the dialog that appears, type a unique name for your Gamemaster and press "Next".
  3. Set Gamemaster IP and Port:

    • In the dialog boxes that appear, enter your IP address and keep port 49165 set as the port.
    • If you do not know your IP address, use a service like Whatismyip.com to find it.
    • Click "Next". If you entered the Gamemaster IP and port correctly, and your wallet contains at least 1000 HMS plus the transaction fee, the wallet will create the collateral transaction and update the Gamemaster.conf file automatically.
  4. Export and apply the Gamemaster configuration file:

    • You should now see your new Gamemaster in the list of Gamemasters in your wallet.
    • Click the three dots to the right of the new Gamemaster and click Info.
    • At the bottom of the Gamemaster Information page that displays, click the Copy icon to the right of Export data to run the Gamemaster on a remote server.
    • Open Notepad or your favorite text editor.
    • Paste the copied text into a new, blank file, then save it as Hemis.conf (note the capital H) in the Hemis data directory (usually found at %APPDATA%\Hemis on Windows).
    • Once you have saved the Hemis.conf file, you need to exit your Hemis wallet and restart it before the GM can be initialized.
    • You should not need to make any changes to the gamemaster.conf file which is saved by default in the %APPDATA%\Hemis\ folder on Windows.

Step 3: Open and Forward Port on Firewall

  1. Open port 49165 on the firewall:
    • For Ubuntu, use:
      sudo ufw allow 49165
      
    • For other systems, consult your firewall documentation for the equivalent command.
  2. Forward port 49165 to your local host:
    • Access your router settings by entering the router's IP address into your web browser. This is typically something like 192.168.1.1 or 192.168.0.1.
    • Log in with your username and password.
    • Locate the port forwarding section. This might be under "Advanced," "Security," or "NAT" settings.
    • Create a new port forwarding rule:
      • Service Name: Hemis Gamemaster
      • Port Range: 49165
      • Local IP: The IP address of your computer running the Hemis-QT. You can find this local IP address in your router settings or in a Windows command line with command ipconfig
      • Protocol: TCP/UDP or just TCP.
    • Save the changes and restart your router if necessary.
    • Verify that port 49165 is OPEN on a service like Portchecker.co.

Step 4: Start the Gamemaster

  1. Start the Gamemaster from the local QT wallet:
    • Go to the "Gamemasters" tab.
    • Wait until at least 15 confirmations have occurred since you sent the collateral transaction.
    • Click the three dots to the right of the new Gamemaster and click Start.
    • If everything went correctly, your Gamemaster's status should change to PRE_ENABLED. It will take from 15 minutes up to a couple of hours for the network to confirm that your Gamemaster is online. When that happens the status will change to ENABLED.

Your gamemaster should now be running and contributing to the Hemis Network. For more detailed troubleshooting and advanced configurations, visit us on Discord.

⚠️ **GitHub.com Fallback** ⚠️