PlayAI
  • Introduction
  • Into the PlayAI Ecosystem
  • PlayHub
    • Introduction
    • Agents and MCPs
  • Meet Aura
  • MCP Hub
  • Data Mining
  • Getting Started
  • PlayStudio
    • Introduction
  • Features
  • Getting Started
  • Data Mining and Marketplace
    • Introduction
    • Data Mining
    • Marketplace
  • Oasis Nodes
    • Introduction
    • Component of Oasis Nodes
    • PlayAI as EigenLayer AVS
    • Node Bootstrapping
      • Purchase Oasis Node with PlayAI's NodePortal
    • How to Run the Node
      • How to Run with NodeOps
      • Setup via LocalHost
      • Setup via EC2 Instance
    • Node Explorer
    • Node Rewards
  • Token
    • Token Utilities
Powered by GitBook
On this page
  • Create Security Group
  • Launch AWS Instance
  • Connect to EC2 Instance
  • Host Machine Setup
  • Run PlayAI Node
  1. Oasis Nodes
  2. How to Run the Node

Setup via EC2 Instance

PreviousSetup via LocalHostNextNode Explorer

Last updated 5 days ago

This guide will help understand how to install a PlayAI Node on EC2 instance. This guide is divided into 5 major steps, all parts are descriptive and have video and image content to help you user and make this process more clear.

Prerequisites: - AWS

Create Security Group

This is first step one, create security group with the following inbound outbound rules, which we’ll discuss details in steps

Steps ->

  1. Go to Security groups by any of the following way

    1. AWS Console → Services → EC2 → Security Groups ( Left panel )

    2. Link:

  2. Then follow the guide in images, which allow inbound and outbound traffic for your instance

    1. Inbound Traffic

      • SSH (Port 22): Needed for secure connection.

      • HTTP (Port 80): For web access.

      • HTTPS (Port 443): For secure web access.

    2. Outbound traffic

      • SSH (Port 22)


Launch AWS Instance

Steps ->

  1. Go to EC2 Dashboard:

    • In the top search bar, type EC2 and click on EC2 Dashboard.

  2. Launch an EC2 Instance:

    • Click on Launch Instance.

    • Name Your Instance: Enter a name like PlayAI-Server.

    • Select an Amazon Machine Image (AMI): Choose Ubuntu Server 24.04 LTS (64-bit x86).

    • Instance Type: Choose t3.medium or t2.medium or any other that have greater or equal 4 GB RAM, which is minimum resource requirements to run PlayAI Node

    • Key Pair: If you don’t have one, create a new key pair and download it. This will let you connect to the server securely. You can choose to ignore it if you are not accessing it from local machine. In EC2 you can connect to terminal without Key Pair. But you’ll definitely need it if you are accessing from your local machine or some other machine.

    • Security Group Settings: Select existing security group which you created in previous step

    • Storage: Set the storage size to 20GB (or more if you think you'll need it).

  1. Go to EC2 Dashboard:

    Once all settings are in place, click Launch Instance. It will take a minute or two to start.


Connect to EC2 Instance

This step will help you connect to ec2 instance, in other word, it gives you terminal to run all the commands for setting up PlayAI node

AWS provides a way to connect to your instance directly from your browser without needing to download any software.

Steps ->

  1. Go to Your Instance:

    • Once your instance is running (you'll see it in the Instances list), select it.

  2. Connect to the Instance:

    • Click Connect at the top of the page.

    • Select the EC2 Instance Connect option (this lets you connect via your browser). There are two option available, keep default if you don’t know which one to choose.

    • Click Connect — a new window will open with a terminal.

  3. You’ll see a terminal there, run below command to see everything is fine upto now

echo "Hi, I am connected to EC2" 

Host Machine Setup

In this step, we’ll work on installing required software for smoothly running PlayAI node. Which is installing docker, docker-compose, git. Follow step by step to avoid trouble

Steps ->

  1. Update the Server:

    • Run the following command to make sure everything is up to date, this will update some basic setting and add some linux channel and all, nothing specific to our setting

      sudo apt update
      sudo apt upgrade -y
  2. Install Docker:

    • This step would install docker, which is needed to run AI engines provided by PlayAI. Run below command to install

      sudo apt install docker.io -y
  3. Install Docker Compose:

    • Docker compose is a way to run multi container setup in a managed way, which help us define configurations and mount volumes and much more. Install Docker Compose with this command:

      sudo curl -SL <https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-linux-x86_64> -o /usr/local/bin/docker-compose
      sudo chmod +x /usr/local/bin/docker-compose
  4. Verify Docker and Docker Compose are Installed:

    • Check Docker version by running:

      docker --version
    • Check Docker Compose version by running:

      docker-compose --version

Run 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 5, refer to step 5 for these values.

Steps ->

  1. Start to work as root user to avoid sudo all the time, for that you just have to run sudo -i

sudo -i 
  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

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.

Here