RAIRprotocol
  • šŸ’ŽWelcome to RAIR
  • šŸ’“Whitepaper (draft)
    • Start
      • History
      • Licensing
      • Codebase
      • Onboarding
      • Mechanics
        • Burn Model
        • Earn Model
      • Governance (DAORM)
  • ā†”ļøIntegrations
    • Core Technologies
      • Guides
        • Alchemy
        • GCP Cloud Storage
        • Web3Auth
    • Blockchains
  • šŸ‘©ā€šŸ’»CODEBASE
    • RAIRsolidity
      • Soneium (Minato)
      • Core DAO
      • All Contract Addresses
      • Transfer functions
    • RAIRdapp
      • RAIRfrontend
        • Proxy Settings for Default Frontend
        • Frontend Variables Library
      • RAIRnode
        • Permissions and Access Controls
        • Backend Variables Library
      • RAIRsync
        • Integrating New EVMs
      • RAIRstream
      • RAIRinfra
    • RAIR API
      • Endpoints
        • Auth
          • Get challenge
          • Login
          • Logout
          • Me
          • Unlock
          • Stream
            • Out
        • Analytics
          • Csv
        • Contracts
          • FactoryList
          • Full
          • Import
          • My
          • Network
            • Products
              • Offers
        • Credits
          • Withdraw
        • Favorites
        • Files
          • ById
          • ByCategory
          • Categories
          • ForToken
          • Unlocks
          • List
          • Remove
          • Update
        • Nft
          • Network
            • Attributes
            • Files
            • Locks
            • Offers
            • Token
              • Pinning
          • PinningMultiple
          • Csv
            • Sample
        • Offers
          • /
        • Products
          • /
          • User
        • Resales
          • Create
          • Delete
          • Open
          • Purchase
          • Update
        • Search
          • All
        • Settings
          • Featured
          • Theme
          • AppLogo
        • Tokens
          • /
          • TokenNumbers
        • Transaction
        • Upload
          • File
          • Validate
        • Users
          • /
          • Export
          • List
          • Yoti verify
      • Specification
    • A Note on Documentation
  • āš™ļøInstallation and Testing
    • Getting Started
      • Welcome to New Web3 Devs!
      • RAIRlite (Single VM)
        • Windows WSL Installation
        • MVP Test Plan
        • https configuration
      • RAIRcloud (Cloud Enabled)
        • Cloud Test Plan
  • šŸ›ŸEnd User Guides
    • User Functionality
      • How to login
      • Buy your first NFT
      • Put items up for sale
      • Watch Content
    • Admin Functionality
      • Deploying NFT contracts
      • Managing Metadata
      • Managing Media
      • Managing Marketplace
      • Managing Users
      • Importing External Contracts
Powered by GitBook
On this page
  • Full Video Tutorial
  • Getting your environment ready for RAIRprotocol
  • Deploying RAIRprotocol
  • Updating RAIRprotocol
  • Next Steps

Was this helpful?

  1. Installation and Testing

Getting Started

Follow these simple steps and you'll be up and running in no time

PreviousA Note on DocumentationNextWelcome to New Web3 Devs!

Last updated 9 months ago

Was this helpful?

Want to run RAIRprotocol in less than 20 minutes? Make sure you have

-Ubuntu 24.04, 8gb ram, 20gb storage on your target machine

-Root access with your username and password to run sudo

Full Video Tutorial

Getting your environment ready for RAIRprotocol

  1. On any Ubuntu 24.04 machine first install Docker Dependencies

-First update your machine

sudo apt update

-Then add dependencies

sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release

-Then add keys

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

-Update one more time

sudo apt-get update
  1. Install Docker Itself

Just one line to Install Docker!

sudo apt-get install docker-ce docker-ce-cli containerd.io
  1. Install Docker Compose (latest version)

-Now we need to install Compose to run our app with a single command

sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

-then make Docker Compose executable

sudo chmod +x /usr/local/bin/docker-compose

  1. Git Clone our Repo!

-If you need Git run this first

sudo apt install git-all

-Then clone our whole repo with one command! Note this is ~500mb.

git clone https://github.com/rairprotocol/rair-dapp.git

Deploying RAIRprotocol

You made it! Now that Docker and Compose are installed on our Ubuntu machine.. running RAIRprotocol is a snap!

  1. Copy env and run default compose file

-Navigate to rair-dapp directory. Should be in the main folder

cd rair-dapp

-Then copy the sample environment file .env.sample to .env

cp .env.sample .env

-And one more time for the frontend environment variables

cp rair-front/.env.sample rair-front/.env

Starting the system

Make sure you have copied your env to both rair-dapp and rair-front first before running! If you try to run the system before copying the env your database will be corrupted. Just in case this happens you can run "sudo rm -rf dev" to delete the database, then try again.

sudo docker-compose -f docker-compose-web.yml up -d

Making sure system is up

sudo docker ps -a

Output of above command should list all the services in running status. For example:

CONTAINER ID   IMAGE                   COMMAND                  CREATED          STATUS         PORTS                                                                                  NAMES
8e94675ec590   rair-dapp_rair-sync     "docker-entrypoint.s…"   8 seconds ago    Up 7 seconds   0.0.0.0:5001->5001/tcp, :::5001->5001/tcp                                              rair-sync
3cc32d0e0917   rair-dapp_rair-front    "/docker-entrypoint.…"   8 seconds ago    Up 7 seconds   0.0.0.0:8088->80/tcp, :::8088->80/tcp                                                  rair-front
cf24312bb570   rair-dapp_rair-node     "docker-entrypoint.s…"   9 seconds ago    Up 8 seconds   0.0.0.0:3000->3000/tcp, :::3000->3000/tcp, 0.0.0.0:5000->5000/tcp, :::5000->5000/tcp   rair-node
dbb19e620b4f   mongo                   "docker-entrypoint.s…"   10 seconds ago   Up 9 seconds   0.0.0.0:27017->27017/tcp, :::27017->27017/tcp                                          mongo
8c9114b97dba   rair-dapp_rair-stream   "docker-entrypoint.s…"   10 seconds ago   Up 9 seconds   0.0.0.0:5002->5002/tcp, :::5002->5002/tcp                                              rair-stream
3f2106ec0103   redis                   "docker-entrypoint.s…"   10 seconds ago   Up 9 seconds   0.0.0.0:6379->6379/tcp, :::6379->6379/tcp 

Stopping the system

This command stops all running Docker images. Do this before closing your terminal to make sure everything is properly shut down.

sudo docker-compose -f docker-compose-web.yml down

Check logs

Run below command to check logs of any service.

sudo docker logs -n 100 <CONTAINER ID>

Container ID can be obtained from output of sudo docker ps -a command

Remove installation

Try below command if you want to remove existing installation (docker images, docker containers, database etc.)

sudo ./rair-infra/commands/local-env-purge.sh

Updating RAIRprotocol

To pull the latest images to get the latest code use these commands

Git pull to pull the latest code

git pull

Check existing images

sudo docker images -a

Delete images (paste in your image ids)

Looks like this "sudo docker rmi e776960ffc67 18eb7403282e 60e0ddd7a2ae d8f1b061718c"

sudo docker rmi <IMAGE ID>

Delete containers

sudo docker system prune

Run the up command! You're all up to date!

sudo docker-compose -f docker-compose.local-new.yml up -d

Next Steps

Now that you have Docker installed, it's basically one command to run the docker compose YAML file after replacing a few API key variables in the sample.env

RAIRprotocol is easy to deploy with Docker and Docker Compose. See our WSL guide to run Ubuntu on your Windows machine.

Please follow our Github at star our repo and fork! See full deployment guides below.

āš™ļø
here
https://github.com/rairprotocol

RAIRlite

Simplest way to run RAIRprotocol. A basic deployment that runs on localhost or a single cloud VM.

  • Fully functional NFT marketplace

  • Configurable frontend UI/UX

  • Metamask based

RAIRcloud

A fully-featured, secure, and scalable version for deployment to a Kubernetes-enabled cloud environment.

  • Filebase IPFS storage

  • Web3Auth powered Smart Accounts

  • GCP support

  • MongoDB Atlas Support

  • Hashicorp Vault support

  • Gasless resales

  • Alchemy-Powered Syncing Engine

  • and more!

Will look like this (note the image ID hash)