Setup via LocalHost

This guide will help understand how to install a PlayAI Node on a local Computer or Single Node. There are two major part, first is setting prerequisites to run a node and second is setting up node by running few commands listed in steps. At the end of document there is a demo video of this whole process and what a successful node deployment look like on a machine.

Setting Environment

Install Git

Install Git on your system if you haven't already. Verify the installation by running git --version in your terminal. Expect an output showing the Git version. Link

Command: git --version 
Expceted Sample output: >> git version 2.39.5 (Apple Git-154)

Install docker

Download and install Docker from the official website. Check the installation with docker --version, expecting an output displaying the Docker version. Link

Command: docker --version
Expected Sample Output: >>Docker version 27.0.3, build 7d4bcd8

Install Docker Compose

If not already installed (usually included with Docker Desktop), install it separately. Verify with docker-compose --version.

Command: docker-compose --version
Expected Sample Output: >> Docker Compose version v2.28.1-desktop.1

If you don’t have it already, go to this link and install.


Running PlayAI Node

Now all the dependency part is sorted and we are moving towards the steps to run a PlayAI node. Below is step by steps guide to run a node, which include downloading repo from PlayAI official github page. Make sure to keep node specific values ready that you’ll need in step 4, refer to step 4 for these values

  1. Clone the PlayAI Node Client repository using

git clone <https://github.com/PlayAINetwork/PlayAI-Node-Client.git> 
  1. Navigate to the cloned directory using

cd PlayAI-Node-Client
  1. Create and Configure .env add your wallet address, signer key, main server address, and node token ID.

  2. Run below command to open file in write mode and paste and setup the below variables then press CTRL + X then Y and then Enter to save this file

nano .env 
NODE_WALLET_ADDRESS='xx'
NODE_SIGNER_KEY='xx'
NODE_TOKEN_IDS=[x,x]
  1. Pulling latest Node Client Containers, you’ll see some logs in the terminal, that confirms that you’re pulling latest container. This step is required to pull latest container, even if you are not setting it first time and you want to pull latest updates just run below command

docker-compose pull 
  1. Now we have container ready, start the node in detached mode using

docker-compose up -d 
  1. Check if the node is running using docker ps. Expect to see the node container listed

Command: docker ps 

Sample output from running this command

  1. Shutting down all services ( Do not use CTRL+C or Command+C to shut down nodes )

docker-compose down 
  1. To see live logs run below command ( optional ). This will show live logs of what’s happening with node, it will show some requests are coming and something is saving back to our database and all. Which confirm finally that your node is health and running and getting computations requests from our backends

docker-compose logs -f 
  1. For closing live logs press ctrl + C. Don’t use ctrl + c to shut down the node service, use docker-compose down only which will remove some of the unnecessary files from last and you’ll have fresh node live whenever you start node again.


Demo Video

Last updated