diff --git a/content/docs/node/run/meta.json b/content/docs/node/run/meta.json index bbdeacb..ce3dfa7 100644 --- a/content/docs/node/run/meta.json +++ b/content/docs/node/run/meta.json @@ -1,3 +1,3 @@ { - "pages": ["validator","rpc","localdata-rpc","archive"] -} \ No newline at end of file + "pages": ["validator","rpc","localdata-rpc","archive"] + } \ No newline at end of file diff --git a/content/docs/node/run/validator.mdx b/content/docs/node/run/validator.mdx index 25f5474..adc67e7 100644 --- a/content/docs/node/run/validator.mdx +++ b/content/docs/node/run/validator.mdx @@ -4,593 +4,36 @@ description: Steps to run a Shardeum Validator --- - - - - - - - - - -## Benefits of operating a Shardeum validator -Earn SHM for securing the network. Contribute to the security, scalability and decentralization of Shardeum. +## Choosing an approach +Shardeum's dynamic state sharding enables horizontal scalability, making node operation accessible to everyone. With minimal hardware and a user-friendly interface, regular users can run validator nodes, contributing to network decentralization and security while earning rewards. -## Minimum Hardware Requirements -- 250 GB SSD storage -- Quad core CPU less than 10 years old if self hosting -- Dual core CPU works if hosted with newer Xeons / EPYC -- 16 GB of ram, 4+ GB of virtual memory recommended -- Hosting: 8 GB RAM + 8 GB Virtual Memory - -Access the terminal interface for Shell CLI commands: - -import { Tab, Tabs } from 'fumadocs-ui/components/tabs'; import { Callout } from 'fumadocs-ui/components/callout'; -import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'; - - - - -```ts tab="Linux" -(Press at the same time) -Ctrl + Alt + T -``` - -```ts tab="MacOS" -(Press at the same time) -Command + Space bar -(Type) -Terminal -``` - - - -### Install package managers -We will use curl in this tutorial to download files: - - - -```ts tab="Linux" -sudo apt-get install curl -``` - -```ts tab="MacOS" -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -//Adding homebrew to your PATH -echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' -eval "$(/opt/homebrew/bin/brew shellenv)" -``` - - -### Update package managers - -```ts tab="Linux" -sudo apt update -``` - -```ts tab="MacOS" -brew update -``` - - -### Install docker and docker.io - -```ts tab="Linux" -sudo apt install docker.io -``` - -```ts tab="MacOS" -brew install docker -``` - - -Check that docker is working with (should return version 20.10.12 or higher): - -``` -docker --version -``` - -### Install docker-compose - - -```ts tab="Linux" -sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose -``` - -```ts tab="MacOS" -brew install docker-compose -``` - - -Setup permissions for docker-compose: - -``` -sudo chmod +x /usr/local/bin/docker-compose -``` - -Check that docker-compose is working with (should return version 1.29.2 or higher): -``` -docker-compose --version -``` - - -## Download and Install Validator - -Run the following command: - -``` -curl -O https://raw.githubusercontent.com/shardeum/validator-dashboard/main/installer.sh && chmod +x installer.sh && ./installer.sh -``` - -The terminal will ask questions about your setup settings. - -Give permission to collect validator data for bug reporting: - -```shell -By running this installer, you agree to allow the Shardeum team to collect this data. (y/n)?: -``` - -Enter y to setup the web based dashboard: - -```shell -Do you want to run the web based Dashboard? (y/n): -``` - -Set a password for dashboard access: - -```shell -Set the password to access the Dashboard: -``` - -Add a custom session port for the web based dashboard or hit enter for port 8080: - -```shell -Enter the port (1025-65536) to access the web based Dashboard (default 8080): -``` - -Add a custom external IP address or use an automatically detected IP address: - -```shell -If you wish to set an explicit external IP, enter an IPv4 address (default=auto): -``` - -Add a custom internal IP address or use an automatically detected IP address: - -```shell -If you wish to set an explicit internal IP, enter an IPv4 address (default=auto): -``` - -Set the first p2p port (default 9001): - -```shell -To run a validator on the Sphinx Atomium network, you will need to open two ports in your firewall. -This allows p2p communication between nodes. -Enter the first port (1025-65536) for p2p communication (default 9001): -``` - -Set the second p2p port (default 10001): - -```shell -Enter the second port (1025-65536) for p2p communication (default 10001): -``` - -Add a custom path or install to root: - -```shell -What base directory should the node use (defaults to ~/.shardeum): -``` - -Wait for the installation process to complete. - - - - - -If you are behind a router and you are using ports 9001 and 10001 for p2p communication, -make sure ports 9001 and 10001, are forwarded (be careful doing this since it will modify your firewall). - -Router port forwarding example with AT&T: - -https://www.att.com/support/article/u-verse-high-speed-internet/KM1010280/ - -More info on router port forwarding: - -https://www.noip.com/support/knowledgebase/general-port-forwarding-guide/ - - - - - - - - - - - -If you see docker permission error: - -```shell -Got permission denied while trying to connect to the Docker daemon socket at -unix:///var/run/docker.sock: -Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/shardeum-dashboard/json": -dial unix /var/run/docker.sock: -connect: -permission denied -``` - -run: - - -```ts tab="Shell" -sudo usermod -a -G docker $USER && newgrp docker -``` - - -if that does not work, also try: - - -```ts tab="Shell" - -sudo service docker start -``` - -then try to start the shell script again. - - - - - - - -## Open validator GUI - -Go to your web browser and go to: - - -```shell tab="Shell" -https://localhost:8080/ -``` - -```shell tab="Server" -https://:8080/ -``` - - - - -You might see a warning page when trying to access this address in your web browser. Ignore this warning and continue to the validator dashboard. Another way to work around this warning: - - - - -Enter the password you set during the installation process. - -![loginPage.png](/img/node/run/validator/loginPage.png) - -You should now see the “Overview” page for the Shardeum Validator Dashboard in your web browser: - -![overviewBetanet.png](/img/node/run/validator/overviewBetanet.png) - - -## Start validator - -Click the “Start Node” button in the top right white box: - -if that does not work, you can also try running the following command on cli: - - -```ts tab="Shell" -operator-cli start -``` - - -Set password for logging into the GUI - - -```ts tab="Shell" -operator-cli gui set password 123456 #log into the GUI with 123456 as your password -``` - - -## Monitor validator - -Go to “Performance” to see your node’s hardware performance here: - -![performanceBetanet.png](/img/node/run/validator/performanceBetanet.png) - -For more details about your node status run the following inside the CLI: - - -```ts tab="Shell" -operator-cli status -``` - - - -## Connect Wallet to Shardeum Testnet - -Connect to Shardeum Validator with your wallet by configuring the network with the network details [here](/docs/network/endpoints). - -## Get SHM from ITN Faucet -Claim testnet tokens from [Shardeum Discord SHM Faucet](/docs/faucet/claim). -## Stake SHM to validator +To run a Shardeum validator, first choose the approach that best suits your experience level and requirements. -### GUI - -After you start the validator, you will be asked to connect your wallet: - -![connectWalletBetanet.png](/img/node/run/validator/connectWalletBetanet.png) - -After you connect your wallet, click on the "Add Stake" button, you will see the following: - -![connectedWalletAddStake.png](/img/node/run/validator/connectedWalletAddStake.png) - -``` --Stake Wallet Address [wallet connected] --Nominee Public Key [filled in automatically while validator is running] --Stake amount (SHM) [empty and is in units ether not wei] -``` - -This example has filled in 10 SHM tokens to stake. - - - - -Stake the specified minimum amount to start earning rewards.(For testnet, its 10 SHM) - - - - -Once all fields are filled, click the “Stake” button. - -Your wallet will ask you to sign the transaction stake your SHM. - -Once the transaction is signed and complete, you have staked your SHM tokens successfully. - - -If your node status is on Standby and you have 10 SHM or more staked, your validator node is setup correctly. - -The network will automatically add your validator to be active in the network. - -The time to be added as an active validator will vary based on network load and validators in the network. - - - - - - -Go into the operator dashboard docker (may be different if you customized install location: - -```ts tab="Shell" -cd ~/.shardeum -./shell.sh -``` - - -Get your node's external IP: - - -```ts tab="Shell" -curl https://ipinfo.io/ip -``` - - -The returned IP in the format of nnn.nnn.nnn.nnn is your EXTERNAL_IP. - -Set the number above in place of EXTERNAL_IP: - - -```ts tab="Shell" -export APP_IP="EXTERNAL_IP" -``` - - - - - - -### CLI - -You can also stake and unstake from the Validator CLI if you are not able to access a web browser for the Validator GUI. - -Open validator CLI: - -Make sure you are in the root directory by running: - - -```ts tab="Shell" -cd .shardeum -``` - - -Start the CLI by running the following shell script: - - -```ts tab="Shell" -./shell.sh -``` - - - - -First, set your private key in your Validator CLI: - - - -Be very careful with your private keys. We recommend you use a private key which has testnet tokens only to be safe. - -Please note, this is not the recommended method for staking with the Shardeum validator. Mishandling of private key may result in loss of assets. Shardeum discards private key after the transaction is signed. Take precaution when extracting your private key. - - - -```ts tab="Shell" -export PRIV_KEY= -``` - - -Make sure your private key is stored in your Validator CLI by running: - - -```ts tab="Shell" -echo $PRIV_KEY -``` - - -Add stake with: - - -```ts tab="Shell" -operator-cli stake 10 -``` - - -Check your stake amount with: - - - -```ts tab="Shell" -operator-cli stake_info -``` - - -Remove stake with: - - - -```ts tab="Shell" -operator-cli unstake -``` - - -## Validator - -### Version + + + + + -It is necessary to keep your validator updated by checking the minimum version required and your current version periodically. +Regardless of the approach you choose, operating a node on Shardeum remains cost-effective. As the network expands and traffic increases, Shardeum's dynamic state sharding technology ensures that node operation costs stay low. -Run: - - -```ts tab="Shell" -curl localhost:9001/nodeinfo -``` -```ts tab="Server" -curl :9001/nodeinfo -``` - - -## Update - -- Stop your validator before updating (you don't need to unstake though) -- In your terminal, first exit from the container using - - -```ts tab="Shell" -exit -cd .. -``` - - - - -- Run the following curl script - - -```ts tab="Shell" -curl -O https://raw.githubusercontent.com/shardeum/validator-dashboard/main/installer.sh && chmod +x installer.sh && ./installer.sh -``` - - - -You might manually have to start the GUI afterwards with: - - -```ts tab="Shell" -operator-cli gui start -``` - - - -- Check your currect version from either CLI or GUI and make sure it is the latest version. - - -## CLI And GUI - -### Version - -Run: - -```ts tab="Shell" -operator-cli version -``` - - - - - - -### Update - -Run: - - -```ts tab="Shell" -operator-cli update -``` - - -### Commands - -To see all CLI commands, run: - - - -```ts tab="Shell" -operator-cli help -``` - - -## Uninstall Validator - -Useful if your validator is outdated and you want to clean your last installation. - -You can delete the validator folder while in your root directory with: - - - -```ts tab="Shell" -rm -rf .shardeum -``` - diff --git a/content/docs/node/run/validator/cloud-service-providers/aws.mdx b/content/docs/node/run/validator/cloud-service-providers/aws.mdx new file mode 100644 index 0000000..8bda464 --- /dev/null +++ b/content/docs/node/run/validator/cloud-service-providers/aws.mdx @@ -0,0 +1,63 @@ +--- +title: AWS Setup Guide +description: Steps to run a Shardeum Validator on Amazon Web Services (AWS) +--- + +This guide provides detailed instructions for setting up a Shardeum Validator using Amazon Web Services (AWS) EC2 instances. + +## Prerequisites + +- An active AWS account with billing enabled +- Basic familiarity with AWS EC2 service and AWS Console navigation +- Understanding of SSH connections and key pair management +- A terminal application for SSH access +- The minimum hardware requirements for running a validator + +## Instance Setup + +### 1. Launch EC2 Instance + +1. Log in to the AWS Management Console at https://console.aws.amazon.com +2. Navigate to EC2 Dashboard: + - Click on "Services" in the top navigation bar + - Select "EC2" under Compute services + - Ensure you're in your preferred region (top-right corner) +3. Click the orange "Launch Instance" button +4. Configure your instance: + - Name your instance (e.g., "shardeum-validator") + - Under "Application and OS Images": + - Select "Ubuntu" as the AMI + - Choose "Ubuntu Server 22.04 LTS (HVM)" + - Under "Instance Type": + - Select an instance that [meets minimum requirements](/docs/node/run/validator/self-host#minimum-hardware-requirements) + - Recommended: t3.xlarge (4 vCPU, 16 GB RAM) + - For production: Consider t3.2xlarge for better performance + - Create or select a key pair: + - Click "Create new key pair" if you don't have one + - Name your key pair + - Select RSA and .pem format + - Download and securely store your key pair file +5. Configure storage: + - Click "Configure Storage" + - Set root volume to at least 250 GB gp3 SSD + +### 2. Configure Security Group + +Create a new security group with the following rules: +- SSH (Port 22): Your IP +- Custom TCP (Port 8080): Anywhere (Dashboard) +- Custom TCP (Port 9001): Anywhere (P2P) +- Custom TCP (Port 10001): Anywhere (P2P) + +### 3. Connect to Your Instance + +Use SSH to connect to your instance: + +```bash +chmod 400 your-key-pair.pem +ssh -i your-key-pair.pem ubuntu@your-instance-public-dns +``` + +### 4. Installing Shardeum + +Once your AWS instance is ready, follow our [Base Guide for Running a Shardeum Validator Node](/docs/node/run/validator/self-host#install-the-shardeum-validator) for detailed installation instructions, including the steps to open the validator dashboard, stake SHM, start the validator, and more. diff --git a/content/docs/node/run/validator/cloud-service-providers/contabo.mdx b/content/docs/node/run/validator/cloud-service-providers/contabo.mdx new file mode 100644 index 0000000..d5befcc --- /dev/null +++ b/content/docs/node/run/validator/cloud-service-providers/contabo.mdx @@ -0,0 +1,48 @@ +--- +title: Contabo Setup Guide +description: Steps to run a Shardeum Validator on Contabo VPS +--- + +This guide provides detailed instructions for setting up a Shardeum Validator using Contabo VPS. + +## Prerequisites + +- A Contabo account +- Basic understanding of VPS management +- SSH client installed on your local machine + +## VPS Setup + +### 1. Order VPS + +1. Go to Contabo's VPS page +2. Select a plan that meets the [minimum requirements](/docs/node/run/validator/self-host#minimum-hardware-requirements) +3. Choose: + - Location: Nearest to you + - Operating System: Ubuntu 22.04 LTS + +### 2. Complete Purchase +- Select a payment method of your choice and complete the purchase. +- Once the order is complete, you will receive an email to complete a KYC process. +- After the KYC process is complete, you will receive an email with the details of your new VPS. + +### 3. Configure Network + +Follow the instructions in the email to access your Contabo panel and configure firewall: + +Inbound Rules: +- SSH (Port 22): Your IP +- Custom TCP (Port 8080): Anywhere (Dashboard) +- Custom TCP (Port 9001): Anywhere (P2P) +- Custom TCP (Port 10001): Anywhere (P2P) + +### 3. Connect to Your VPS + +Use SSH to connect to your VPS: +```bash +ssh root@your_server_ip +``` + +### 4. Install Shardeum + +Once your VPS is ready, follow our [Base Guide for Running a Shardeum Validator Node](/docs/node/run/validator/self-host#install-the-shardeum-validator) for detailed installation instructions, including the steps to open the validator dashboard, stake SHM, start the validator, and more. diff --git a/content/docs/node/run/validator/cloud-service-providers/digital-ocean.mdx b/content/docs/node/run/validator/cloud-service-providers/digital-ocean.mdx new file mode 100644 index 0000000..cae7f0e --- /dev/null +++ b/content/docs/node/run/validator/cloud-service-providers/digital-ocean.mdx @@ -0,0 +1,47 @@ +--- +title: DigitalOcean Setup Guide +description: Steps to run a Shardeum Validator on DigitalOcean +--- + +This guide provides detailed instructions for setting up a Shardeum Validator using DigitalOcean Droplets. + +## Prerequisites + +- A DigitalOcean account +- SSH key added to your DigitalOcean account +- Basic understanding of DigitalOcean Droplets + +## Droplet Setup + +### 1. Create Droplet + +1. Click "Create > Droplets" in the DigitalOcean dashboard +2. Select the region closest to you +3. Select the plan that meets the [minimum requirements](/docs/node/run/validator/self-host#minimum-hardware-requirements) +4. Complete the purchase + +### 2. Configure Firewall +After completing the purchase, set up the firewall to allow the inbound traffic: + +1. Navigate to Networking > Firewalls +2. Create new firewall: + + ``` + Name: shardeum-validator + Inbound Rules: + - SSH (22): Your IP + - Custom (8080): Your IP + - Custom (9001): All IPv4 + - Custom (10001): All IPv4 + ``` + +### 3. Access Droplet + +Connect via SSH: +```bash +ssh root@your-droplet-ip +``` + +### 4. Install Shardeum + +Once your Droplet is ready, follow our [Base Guide for Running a Shardeum Validator Node](/docs/node/run/validator/self-host#install-the-shardeum-validator) for detailed installation instructions, including the steps to open the validator dashboard, stake SHM, start the validator, and more. diff --git a/content/docs/node/run/validator/cloud-service-providers/gcp.mdx b/content/docs/node/run/validator/cloud-service-providers/gcp.mdx new file mode 100644 index 0000000..0f5ccbb --- /dev/null +++ b/content/docs/node/run/validator/cloud-service-providers/gcp.mdx @@ -0,0 +1,47 @@ +--- +title: Google Cloud Platform Setup Guide +description: Steps to run a Shardeum Validator on Google Cloud Platform (GCP) +--- + +This guide provides detailed instructions for setting up a Shardeum Validator using Google Cloud Platform (GCP). + +## Prerequisites + +- A Google Cloud Platform account +- GCP project created +- Basic familiarity with GCP Compute Engine +- gcloud CLI installed (optional) + +## Instance Setup + +### 1. GCP Account Setup +- Visit [cloud.google.com](https://cloud.google.com) +- Create a new account or sign in +- Set up billing and claim your free credits + +### 2. Create a VM Instance +- Navigate to "Compute Engine" > "VM instances" +- Click "Create Instance" +- Configure your instance: + - Name: shardeum-validator (or your preferred name) + - Region: Choose the closest to you + - Machine type: e2-medium (2 vCPU, 4 GB memory) + - Boot disk: Ubuntu 20.04 LTS (20 GB SSD) + - Allow HTTP and HTTPS traffic + + +### 3. Configure Firewall Rules +- Navigate to "VPC Network" > "Firewall" and create rules for: + - SSH (tcp:22) + - Dashboard (tcp:8080) + - P2P Communication (tcp:9001) + - P2P Communication (tcp:10001) + +### 4. Connect to Your Instance +Click the SSH button in the GCP console to open the web-based SSH terminal or connect via command line: +```bash +gcloud compute ssh your-instance-name --zone your-zone +``` + +### 5. Install Shardeum +Once your GCP instance is ready, follow our [Base Guide for Running a Shardeum Validator Node](/docs/node/run/validator/self-host#install-the-shardeum-validator) for detailed installation instructions, including the steps to open the validator dashboard, stake SHM, start the validator, and more. diff --git a/content/docs/node/run/validator/cloud-service-providers/index.mdx b/content/docs/node/run/validator/cloud-service-providers/index.mdx new file mode 100644 index 0000000..539b6bf --- /dev/null +++ b/content/docs/node/run/validator/cloud-service-providers/index.mdx @@ -0,0 +1,30 @@ +--- +title: Cloud Service Providers +description: Steps to run a Shardeum Validator on Cloud Service Providers +--- + +This guide provides detailed instructions for setting up a Shardeum Validator on different cloud service providers. + + + + + + + + \ No newline at end of file diff --git a/content/docs/node/run/validator/meta.json b/content/docs/node/run/validator/meta.json new file mode 100644 index 0000000..cca6dd8 --- /dev/null +++ b/content/docs/node/run/validator/meta.json @@ -0,0 +1,3 @@ +{ + "pages": ["one-click","vps-cloud-provider", "self-host", "node-providers", "cloud-service-providers"] +} \ No newline at end of file diff --git a/content/docs/node/run/validator/node-providers.mdx b/content/docs/node/run/validator/node-providers.mdx new file mode 100644 index 0000000..ffc6642 --- /dev/null +++ b/content/docs/node/run/validator/node-providers.mdx @@ -0,0 +1,31 @@ +--- +title: Node Service Providers +description: List of Shardeum Node Service Providers +--- + +This page lists the current node service providers for Shardeum. These providers offer one-click node setup services, making it easier for users to run Shardeum validator nodes without extensive technical knowledge. + + +Shardeum does not endorse any specific provider. Users should conduct their own due diligence before choosing a service. + + +## Available Providers + +### Mintair + +[Mintair](https://mintair.xyz/) offers a user-friendly platform for deploying and managing Shardeum validator nodes. + +**Features:** +- Easy setup process +- Automated node management +- 24/7 technical support +- Competitive pricing + + + +import { Callout } from 'fumadocs-ui/components/callout'; + + +More providers will be added soon. Check back regularly for updates to this list. + + diff --git a/content/docs/node/run/validator/one-click.mdx b/content/docs/node/run/validator/one-click.mdx new file mode 100644 index 0000000..b868215 --- /dev/null +++ b/content/docs/node/run/validator/one-click.mdx @@ -0,0 +1,34 @@ +--- +title: One-Click Node Setup +description: Steps to run a Shardeum Validator using 1-Click Install +--- + +This guide provides instructions for setting up a Shardeum Validator using the One-Click Node Setup method, designed for users with little to no experience running servers. + +## Detailed Setup Process + +As the name suggests, one-click node setup require far fewer steps and technical know-how to setup a node when compared to self-hosting. You simply need to choose a suitable service provider available in the market, pay a service fee and let them handle all the technical aspects for you to run the node seamlessly while you earn rewards. Follow the steps below to get started: + + +### 1. Choose a Service Provider +Visit the [providers list](/docs/node/run/validator/providers) and choose the provider that best suits your needs and budget. +The process is similar for all providers, but the exact steps may vary slightly. Here is a general overview of the process: + +### 2. Account Creation +- Navigate to your chosen provider's website +- Provide the required information and create an account + +### 3. Payment and Activation +- Complete the payment process +- Look for a list of available options to "Deploy Node" +- Select Shardeum from the list of available networks +- Choose your node configuration, ensure it meets the [minimum requirements](/docs/node/run/validator/self-host#minimum-hardware-requirements) + +### 4. Start Validating +- Access the validator dashboard through the provider's interface +- Stake the required SHM tokens +- Ensure your node is in `Standby` or `Validating` mode + +## Resources + +- [Run a Shardeum Validator on MintAir](https://shardeum.org/blog/run-node-one-click-setup/) diff --git a/content/docs/node/run/validator/self-host.mdx b/content/docs/node/run/validator/self-host.mdx new file mode 100644 index 0000000..67857a7 --- /dev/null +++ b/content/docs/node/run/validator/self-host.mdx @@ -0,0 +1,617 @@ +--- +title: Self Hosting +description: Steps to run a Self Hosted Shardeum Validator on Your Own Hardware +--- + + + + + + + + + + + +For true decentralization and censorship resistance, it's crucial to minimize reliance on cloud providers. Self-hosting your Shardeum validator on personal hardware offer several advantages: + +1. Enhanced network security and resilience +2. Reduced risk of centralized points of failure +3. Greater control over your node's operation and data + +Shardeum nodes are versatile and can run on various personal hardware platforms: + +- Desktop computers +- Laptops +- Dedicated servers + +While it's possible to run a validator on your everyday computer, it is generally recommended to use a dedicated machine for optimal performance and security. This approach ensures your validator operates consistently without interfering with your daily computing tasks. + +By choosing to self-host, you're not just running a validator – you're actively contributing to the robustness and decentralization of the Shardeum network. + + +## Benefits of operating a Shardeum validator + +- Earn SHM for securing the network. +- Contribute to the security, scalability and decentralization of Shardeum. + + +## Minimum Hardware Requirements + +- 250 GB SSD storage +- Quad core CPU less than 10 years old if self hosting +- Dual core CPU works if hosted with newer Xeons / EPYC +- 16 GB of ram, 4+ GB of virtual memory recommended +- Hosting: 8 GB RAM + 8 GB Virtual Memory + +Access the terminal interface for Shell CLI commands: + +import { Tab, Tabs } from 'fumadocs-ui/components/tabs'; +import { Callout } from 'fumadocs-ui/components/callout'; +import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'; + + + + +```ts tab="Linux" +(Press at the same time) +Ctrl + Alt + T +``` + +```ts tab="MacOS" +(Press at the same time) +Command + Space bar +(Type) +Terminal +``` + + + +## Install the Shardeum Validator + +### Install package managers +We will use curl in this tutorial to download files: + + + +```ts tab="Linux" +sudo apt-get install curl +``` + +```ts tab="MacOS" +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +//Adding homebrew to your PATH +echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' +eval "$(/opt/homebrew/bin/brew shellenv)" +``` + + +### Update package managers + +```ts tab="Linux" +sudo apt update +``` + +```ts tab="MacOS" +brew update +``` + + +### Install docker and docker.io + +```ts tab="Linux" +sudo apt install docker.io +``` + +```ts tab="MacOS" +brew install docker +``` + + +Check that docker is working with (should return version 20.10.12 or higher): + +``` +docker --version +``` + +### Install docker-compose + + +```ts tab="Linux" +sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +``` + +```ts tab="MacOS" +brew install docker-compose +``` + + +Setup permissions for docker-compose: + +``` +sudo chmod +x /usr/local/bin/docker-compose +``` + +Check that docker-compose is working with (should return version 1.29.2 or higher): +``` +docker-compose --version +``` + + +## Download and Install Validator + +Run the following command: + +``` +curl -O https://raw.githubusercontent.com/shardeum/validator-dashboard/main/installer.sh && chmod +x installer.sh && ./installer.sh +``` + +The terminal will ask questions about your setup settings. + +Give permission to collect validator data for bug reporting: + +```shell +By running this installer, you agree to allow the Shardeum team to collect this data. (y/n)?: +``` + +Enter y to setup the web based dashboard: + +```shell +Do you want to run the web based Dashboard? (y/n): +``` + +Set a password for dashboard access: + +```shell +Set the password to access the Dashboard: +``` + +Add a custom session port for the web based dashboard or hit enter for port 8080: + +```shell +Enter the port (1025-65536) to access the web based Dashboard (default 8080): +``` + +Add a custom external IP address or use an automatically detected IP address: + +```shell +If you wish to set an explicit external IP, enter an IPv4 address (default=auto): +``` + +Add a custom internal IP address or use an automatically detected IP address: + +```shell +If you wish to set an explicit internal IP, enter an IPv4 address (default=auto): +``` + +Set the first p2p port (default 9001): + +```shell +To run a validator on the Sphinx Atomium network, you will need to open two ports in your firewall. +This allows p2p communication between nodes. +Enter the first port (1025-65536) for p2p communication (default 9001): +``` + +Set the second p2p port (default 10001): + +```shell +Enter the second port (1025-65536) for p2p communication (default 10001): +``` + +Add a custom path or install to root: + +```shell +What base directory should the node use (defaults to ~/.shardeum): +``` + +Wait for the installation process to complete. + + + + + +If you are behind a router and you are using ports 9001 and 10001 for p2p communication, +make sure ports 9001 and 10001, are forwarded (be careful doing this since it will modify your firewall). + +Router port forwarding example with AT&T: + +https://www.att.com/support/article/u-verse-high-speed-internet/KM1010280/ + +More info on router port forwarding: + +https://www.noip.com/support/knowledgebase/general-port-forwarding-guide/ + + + + + + + + + + + +If you see docker permission error: + +```shell +Got permission denied while trying to connect to the Docker daemon socket at +unix:///var/run/docker.sock: +Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/shardeum-dashboard/json": +dial unix /var/run/docker.sock: +connect: +permission denied +``` + +run: + + +```ts tab="Shell" +sudo usermod -a -G docker $USER && newgrp docker +``` + + +if that does not work, also try: + + +```ts tab="Shell" + +sudo service docker start +``` + +then try to start the shell script again. + + + + + + + +## Open validator GUI + +Go to your web browser and go to: + + +```shell tab="Shell" +https://localhost:8080/ +``` + +```shell tab="Server" +https://:8080/ +``` + + + + +You might see a warning page when trying to access this address in your web browser. Ignore this warning and continue to the validator dashboard. Another way to work around this warning: + + + + +Enter the password you set during the installation process. + +![loginPage.png](/img/node/run/validator/loginPage.png) + +You should now see the “Overview” page for the Shardeum Validator Dashboard in your web browser: + +![overviewBetanet.png](/img/node/run/validator/overviewBetanet.png) + + +## Start validator + +Click the “Start Node” button in the top right white box: + +if that does not work, you can also try running the following command on cli: + + +```ts tab="Shell" +operator-cli start +``` + + +Set password for logging into the GUI + + +```ts tab="Shell" +operator-cli gui set password 123456 #log into the GUI with 123456 as your password +``` + + +## Monitor validator + +Go to “Performance” to see your node’s hardware performance here: + +![performanceBetanet.png](/img/node/run/validator/performanceBetanet.png) + +For more details about your node status run the following inside the CLI: + + +```ts tab="Shell" +operator-cli status +``` + + + +## Connect Wallet to Shardeum Testnet + +Connect to Shardeum Validator with your wallet by configuring the network with the network details [here](/docs/network/endpoints). + +## Get SHM from ITN Faucet + +Claim testnet tokens from [Shardeum Discord SHM Faucet](/docs/faucet/claim). + +## Stake SHM to validator + +### GUI + +After you start the validator, you will be asked to connect your wallet: + +![connectWalletBetanet.png](/img/node/run/validator/connectWalletBetanet.png) + +After you connect your wallet, click on the "Add Stake" button, you will see the following: + +![connectedWalletAddStake.png](/img/node/run/validator/connectedWalletAddStake.png) + +``` +-Stake Wallet Address [wallet connected] +-Nominee Public Key [filled in automatically while validator is running] +-Stake amount (SHM) [empty and is in units ether not wei] +``` + +This example has filled in 10 SHM tokens to stake. + + + + +Stake the specified minimum amount to start earning rewards.(For testnet, its 10 SHM) + + + + +Once all fields are filled, click the “Stake” button. + +Your wallet will ask you to sign the transaction stake your SHM. + +Once the transaction is signed and complete, you have staked your SHM tokens successfully. + + +If your node status is on Standby and you have 10 SHM or more staked, your validator node is setup correctly. + +The network will automatically add your validator to be active in the network. + +The time to be added as an active validator will vary based on network load and validators in the network. + + + + + + +Go into the operator dashboard docker (may be different if you customized install location: + +```ts tab="Shell" +cd ~/.shardeum +./shell.sh +``` + + +Get your node's external IP: + + +```ts tab="Shell" +curl https://ipinfo.io/ip +``` + + +The returned IP in the format of nnn.nnn.nnn.nnn is your EXTERNAL_IP. + +Set the number above in place of EXTERNAL_IP: + + +```ts tab="Shell" +export APP_IP="EXTERNAL_IP" +``` + + + + + + +### CLI + +You can also stake and unstake from the Validator CLI if you are not able to access a web browser for the Validator GUI. + +Open validator CLI: + +Make sure you are in the root directory by running: + + +```ts tab="Shell" +cd .shardeum +``` + + +Start the CLI by running the following shell script: + + +```ts tab="Shell" +./shell.sh +``` + + + + +First, set your private key in your Validator CLI: + + + +Be very careful with your private keys. We recommend you use a private key which has testnet tokens only to be safe. + +Please note, this is not the recommended method for staking with the Shardeum validator. Mishandling of private key may result in loss of assets. Shardeum discards private key after the transaction is signed. Take precaution when extracting your private key. + + + +```ts tab="Shell" +export PRIV_KEY= +``` + + +Make sure your private key is stored in your Validator CLI by running: + + +```ts tab="Shell" +echo $PRIV_KEY +``` + + +Add stake with: + + +```ts tab="Shell" +operator-cli stake 10 +``` + + +Check your stake amount with: + + + +```ts tab="Shell" +operator-cli stake_info +``` + + +Remove stake with: + + + +```ts tab="Shell" +operator-cli unstake +``` + + +## Validator + +### Version + + +It is necessary to keep your validator updated by checking the minimum version required and your current version periodically. + + +Run: + + +```ts tab="Shell" +curl localhost:9001/nodeinfo +``` +```ts tab="Server" +curl :9001/nodeinfo +``` + + +## Update + +- Stop your validator before updating (you don't need to unstake though) +- In your terminal, first exit from the container using + + +```ts tab="Shell" +exit +cd .. +``` + + + + +- Run the following curl script + + +```ts tab="Shell" +curl -O https://raw.githubusercontent.com/shardeum/validator-dashboard/main/installer.sh && chmod +x installer.sh && ./installer.sh +``` + + + +You might manually have to start the GUI afterwards with: + + +```ts tab="Shell" +operator-cli gui start +``` + + + +- Check your currect version from either CLI or GUI and make sure it is the latest version. + + +## CLI And GUI + +### Version + +Run: + +```ts tab="Shell" +operator-cli version +``` + + + + + + +### Update + +Run: + + +```ts tab="Shell" +operator-cli update +``` + + +### Commands + +To see all CLI commands, run: + + + +```ts tab="Shell" +operator-cli help +``` + + +## Uninstall Validator + +Useful if your validator is outdated and you want to clean your last installation. + +You can delete the validator folder while in your root directory with: + + + +```ts tab="Shell" +rm -rf .shardeum +``` + + diff --git a/content/docs/node/run/validator/vps-cloud-provider.mdx b/content/docs/node/run/validator/vps-cloud-provider.mdx new file mode 100644 index 0000000..e61abb8 --- /dev/null +++ b/content/docs/node/run/validator/vps-cloud-provider.mdx @@ -0,0 +1,84 @@ +--- +title: VPS Service +description: Steps to run a Shardeum Validator using a VPS / Cloud Provider +--- + +This guide provides instructions for setting up a Shardeum Validator using a VPS (Virtual Private Server) service like Google Cloud Platform (GCP, Contabo, Digital Ocean, AWS EC2, etc.) + +### Detailed Setup Process + +This approach offers more control over infrastructure compared to self-hosting. It requires selecting a cloud provider and configuring a server that meets Shardeum's node requirements. After setup, you'll use SSH to connect and launch the validator. + +**Key steps:** +### 1. Choose a Cloud Provider +The choice of cloud provider is largely a matter of personal preference. Here are some of the most popular options in our community: + - Contabo + - Google Cloud Platform, etc + +### 2. Server Configuration Requirements +Ensure your server meets the [minimum requirements](/docs/node/run/validator/self-host#minimum-hardware-requirements) + +### 3. Instance Launch Process +1. Log in to your chosen cloud provider and create a new instance, droplet, or virtual machine +2. Open required ports: (port 9001, 8080 and 10001 ) + +### 4. Connect to your server + +Depending on the cloud provider, you can connect to your server using the provider's console or SSH. + +```bash +# Connect to your server +ssh -i your-key.pem ubuntu@your-server-ip + +# Update system packages +sudo apt update && sudo apt upgrade -y + +# Install required dependencies +sudo apt install -y curl docker.io docker-compose +``` + +### 5. Security Configuration + +```bash +# Configure UFW firewall +sudo ufw allow ssh +sudo ufw allow 8080/tcp # Dashboard +sudo ufw allow 9001/tcp # Validator port +sudo ufw allow 10001/tcp # Validator port +sudo ufw enable + +# (OPTIONAL) Create dedicated user +sudo adduser shardeum +sudo usermod -aG docker shardeum +sudo usermod -aG sudo shardeum +``` + +### 6. Launch the node + +```bash +# Switch to shardeum user +su - shardeum + +# Download installer +curl -O https://raw.githubusercontent.com/shardeum/validator-dashboard/dev/installer.sh && chmod +x installer.sh && ./installer.sh +``` + +### 7. Dashboard Access + +- Open web browser +- Navigate to https://YOUR-SERVER-IP:8080 +- Create a password at first login +Complete initial setup: + - Connect wallet + - Stake required SHM + - Start validator + +import { Callout } from 'fumadocs-ui/components/callout'; + + +Disclaimer: Shardeum is not liable for any consequences arising from the use of third party services, including but not limited to performance issues, service outages, or any other operational failures. + + +## Resources + +- [Run a Shardeum Validator on GCP](https://kenny-io.hashnode.dev/how-to-run-a-shardeum-validator-node-on-gcp)