Actions

Moonbeam RPC endpoint: Difference between revisions

From Chainlink Community Wiki

No edit summary
No edit summary
 
Line 62: Line 62:


Now that we have the host directory properly configured for the Moonbeam container's volume, we can deploy the container.
Now that we have the host directory properly configured for the Moonbeam container's volume, we can deploy the container.
<pre style="white-space:pre-wrap; width:100%; border:1px solid lightgrey; background:black; color:white;">docker run --network="host" -v "/var/lib/moonbeam-data:/data" \
  --name moonbeam-rpc-node \
  -u $(id -u ${USER}):$(id -g ${USER}) \
  -d purestake/moonbeam:v0.21.0 \
  --base-path=/data \
  --chain moonbeam \
  --name="<username>" \
  --execution wasm \
  --wasm-execution compiled \
  --pruning archive \
  --state-cache-size 1 \
  --db-cache 6144 \
  -- \
  --execution wasm \
  --pruning 1000 \
  --name="<username>"</pre>

Latest revision as of 16:14, 11 April 2022

Moonbeam.png

Moonbeam RPC endpoint details

This is a general guide on deploying an Moonbeam RPC endpoint for your Chainlink Node(s).
Official Moonbeam Docs are available here

NOTE

This document assumes base operating system is Debian 10

Moonbeam RPC endpoints:

You Chainlink node has two connections methods. Websocket and HTTP.

As these can vary between networks, the default values for an Moonbeam node are:

Websocket ws://<your_ip_address>:8548

HTTPhttp://<your_ip_address>:8547

Install Docker-CE

Install dependencies first.

sudo apt update && sudo apt upgrade && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common Now, we'll need to get our aptitude sources updated to include the Docker-CE repository.

Now, we'll need to get our aptitude sources updated to include the Docker-CE repository.

These commands must be run as root.

sudo su

curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -

add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"Once we have added the repo and the necessary key, we want to exit the root user. exit

Once we have added the repo and the necessary key, we want to exit the root user. exit

NOTE

You should see your shell prompt displaying a $ if you're a non-root user. If you're in an elevated (root) TTY session, your shell prompt will display a #


Since we've modified our aptitude sources, we'll need to update them before we can install docker-ce

sudo apt update && sudo apt install docker-ce Now that we have Docker-CE installed, we'll need to add our user to the docker group.

Now that we have Docker-CE installed, we'll need to add our user to the docker group.

(The prevents us from having to run docker commands with elevated (root) permissions)

sudo usermod -aG docker $USER


Next, we'll get our Moonbeam node deployed and synced.

Deploy Moonbeam RPC Node

First, we'll need to create a new directory house the container volume.

sudo mkdir /var/lib/moonbeam-data sudo chown -R <username> /var/lib/moonbeam-data

Now that we have the host directory properly configured for the Moonbeam container's volume, we can deploy the container.

docker run --network="host" -v "/var/lib/moonbeam-data:/data" \
  --name moonbeam-rpc-node \
  -u $(id -u ${USER}):$(id -g ${USER}) \
  -d purestake/moonbeam:v0.21.0 \
  --base-path=/data \
  --chain moonbeam \
  --name="<username>" \
  --execution wasm \
  --wasm-execution compiled \
  --pruning archive \
  --state-cache-size 1 \
  --db-cache 6144 \
  -- \
  --execution wasm \
  --pruning 1000 \
  --name="<username>"