Node Deployment

The deployment guide for RSS3 Nodes.

Introduction

This guide provides instructions for deploying the RSS3 Node using containerized solutions including Docker and Kubernetes. It is assumed that the user has a basic understanding of terminal commands and containerization concepts.

The guide is opinionated towards a containerized deployment solution, the source code is available on GitHub if one prefers an alternative deployment method.

Prerequisites

  • Basic command line proficiency
  • Have Docker installed

Hardware Requirements

  • Alpha Mainnet: practically any hardware (yes, Raspberry Pis included) can run an Alpha RSS3 Node, as it does not commission any indexers at this phase.
  • Beta Mainnet: depending on the indexing coverage, the hardware requirements may vary. We recommend a minimal configuration of 8 Core, 16 GB RAM, 500 GB SSD to operate an entry-level RSS3 Node.
  • Production Mainnet: we highly recommend a minimal configuration of 16 Core, 64 GB RAM, 500 GB SSD * 3 to operate an advanced RSS3 Node to boost your work rate.

Local LLMs

Running local LLMs requires additional resources (GPUs). We will release relevant documentation and a deployment guide soon.

Node Configuration File

A configuration file containing variables used by the RSS3 Node (alpha Nodes are exempted) is required for deployment.

🚧

Note that the config file may change as Mainnet progresses.

An example of a complete config file:

environment: production

discovery:
  maintainer:
    evm_address: // the wallet address used by you during your registration on the RSS3 Explorer
    signature: // the signature obtained on the RSS3 Explorer, it will be used to verify your ownership of this Node
  server:
    endpoint: // the enpoint that is accessible by RSS3 Global Indexers
    global_indexer_endpoint: https://gi.rss3.io // or use https://gi.rss3.dev for VSL Testnet

// below are configs planned for the Beta stage, you do not need them for deploying during the Alpha.
database:
  driver: cockroachdb
  partition: true
  uri: postgres://root@localhost:26257/defaultdb

stream:
  enable: false
  driver: kafka
  topic: rss3.node.feeds
  uri: localhost:9092

observability:
  opentelemetry:
    metrics:
      enable: false
      endpoint: 0.0.0.0:9090
    traces:
      enable: false
      insecure: true
      endpoint: localhost:4318

component:
  rss:
    - network: rss
      endpoint: https://rsshub.rss3.io/
      parameters:
        authentication:
          username:
          password:
          access_key:
          access_code:

  decentralized:
    - network: ethereum
      worker: rss3
      endpoint: https://rpc.abc.com/eth
      parameters:
        block_number_start:
        block_number_target:
    - network: polygon
      worker: lens
      endpoint: https://rpc.abc.com/polygon
      ipfs_gateways:
      parameters:
        block_number_start:
    - network: ethereum
      worker: opensea
      endpoint: https://rpc.abc.com/eth
      parameters:
        block_number_start:
    - network: ethereum
      worker: uniswap
      endpoint: https://rpc.abc.com/eth
      parameters:
        block_number_start:
    - network: farcaster
      worker: farcaster
      endpoint: https://nemes.farcaster.xyz:2281
    - network: arweave
      worker: momoka
      endpoint: https://rpc.abc.com/polygon
      parameters:
        block_height_start:
        rpc_thread_blocks:
    - network: ethereum
      endpoint: https://rpc.abc.com/eth
      worker: aave
      parameters:
        block_number_start:
    - network: base
      endpoint: https://rpc.abc.com/base
      worker: aave
      parameters:
        block_number_start:
    - network: optimism
      endpoint: https://rpc.abc.com/optimism
      worker: aave
      parameters:
        block_number_start:

Deployment

As we introduce the RSS3 Node, it's important to note that while the Node itself is production-ready, the deployment methods we outline here may not be universally applicable in all environments. Adaptation of these methods may be necessary to fit the specific requirements of your own setup.

Environment Variables

During the deployment process, you need to configure some environment variables.

  • NODE_DISCOVERY_MAINTAINER_EVM_ADDRESS: The wallet address you use to register your node.
  • NODE_DISCOVERY_MAINTAINER_SIGNATURE: A signature for a specific string used to verify the ownership of your wallet address, which can be obtained using the SIGNATURE button on RSS3 Explorer.
  • NODE_DISCOVERY_SERVER_ENDPOINT: The URL of your node that can be publicly accessed after your node is deployed, such as http://your_ip:your_port or https://your_domain

Via Docker

This is the simplest and quickest method to start an RSS3 Node, however, you should not use this method for production. For larger deployments, consider using Docker Compose or Kubernetes for better manageability and scalability.

docker run -d --name node-broadcaster \
 -e NODE_DISCOVERY_MAINTAINER_EVM_ADDRESS='[evm_address]' \
 -e NODE_DISCOVERY_MAINTAINER_SIGNATURE='[signature_address]' \
 -e NODE_DISCOVERY_SERVER_ENDPOINT='[public_endpoint]' \
 -e NODE_DISCOVERY_SERVER_GLOBAL_INDEXER_ENDPOINT='https://gi.rss3.io' \
 -p [desired-port]:80 \
 rss3/node:alpha --module=broadcaster

-v /path/to/config/file:/etc/rss3/node/config.development.yaml: Mounts the configuration file from the host system (/path/to/config/file) into the container (/etc/rss3/node/config.development.yaml). Ensure that you replace these paths with the actual paths to the configuration file on your host and the desired path inside the container.

Via Docker Compose

Create a docker-compose.yml file with the following content:

version: "3"
services:
  rss3node:
    image: rss3/node:alpha
    ports:
      - "[desired-port]:80"
    # not required for Alpha Nodes
    #volumes:
    #  - /path/to/config/file:/etc/rss3/node/config.yaml
    environment:
      NODE_DISCOVERY_MAINTAINER_EVM_ADDRESS: "[evm_address]"
      NODE_DISCOVERY_MAINTAINER_SIGNATURE: "[signature_address]"
      NODE_DISCOVERY_SERVER_ENDPOINT: "[public_endpoint]"
      NODE_DISCOVERY_SERVER_GLOBAL_INDEXER_ENDPOINT: "https://gi.rss3.io"
    command: ["./node","--module=broadcaster"]

Start the container:

docker-compose up -d

Via Kubernetes

Prerequisites

  • Have kind installed
  • Have Helm installed

Create a Kubernetes cluster via kind

Create our Kubernetes cluster with the following command

kind create cluster --name node

Depoly via using RSS3's Helm Chart

Since Helm uses a chart file for deployment. We can easily deploy an RSS3 Node by using the chart files provided

helm repo add rss3 https://rss3-network.github.io/helm-charts
helm repo update

Conclusion

This guide provides basic instructions for deploying an RSS3 Node in containerized environments. For more advanced configurations, refer to the respective Docker or Kubernetes documentation.

This guide adopts an opinionated stance in favor of containerized deployment. We advocate for this approach due to its benefits in ensuring consistency and scalability, promoting ease of portability across various environments. However, we appreciate the diverse preferences and needs within our community, for those who wish to compile and run the application locally, the source code is available on GitHub.