From fb3c27d488c69a93005dda479414e146c2b4645a Mon Sep 17 00:00:00 2001 From: kenny-io Date: Wed, 27 Nov 2024 23:46:42 +0400 Subject: [PATCH] setup modifications and file hierarchy optimizations --- content/docs/node/run/validator.mdx | 4 +- .../validator/cloud-service-providers/aws.mdx | 4 +- .../cloud-service-providers/contabo.mdx | 3 +- .../cloud-service-providers/digital-ocean.mdx | 2 +- .../validator/cloud-service-providers/gcp.mdx | 2 +- content/docs/node/run/validator/index.mdx | 39 +++++++++ content/docs/node/run/validator/self-host.mdx | 26 +----- .../node/run/validator/vps-cloud-provider.mdx | 84 ------------------- 8 files changed, 51 insertions(+), 113 deletions(-) create mode 100644 content/docs/node/run/validator/index.mdx delete mode 100644 content/docs/node/run/validator/vps-cloud-provider.mdx diff --git a/content/docs/node/run/validator.mdx b/content/docs/node/run/validator.mdx index adc67e7..d95a6b0 100644 --- a/content/docs/node/run/validator.mdx +++ b/content/docs/node/run/validator.mdx @@ -26,8 +26,8 @@ To run a Shardeum validator, first choose the approach that best suits your expe description="You have little to no experience running servers" /> diff --git a/content/docs/node/run/validator/cloud-service-providers/aws.mdx b/content/docs/node/run/validator/cloud-service-providers/aws.mdx index 8bda464..c6ddf5b 100644 --- a/content/docs/node/run/validator/cloud-service-providers/aws.mdx +++ b/content/docs/node/run/validator/cloud-service-providers/aws.mdx @@ -55,9 +55,9 @@ 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 +ssh -i your-key-pair.pem user@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. +Once your AWS instance is ready, follow our [Base Guide for Running a Shardeum Validator Node](/docs/node/run/validator/self-host#download-and-install-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 index d5befcc..7a8656f 100644 --- a/content/docs/node/run/validator/cloud-service-providers/contabo.mdx +++ b/content/docs/node/run/validator/cloud-service-providers/contabo.mdx @@ -39,10 +39,11 @@ Inbound Rules: ### 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. +Once your VPS is ready, follow our [Base Guide for Running a Shardeum Validator Node](/docs/node/run/validator/self-host#download-and-install-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 index cae7f0e..847ec4d 100644 --- a/content/docs/node/run/validator/cloud-service-providers/digital-ocean.mdx +++ b/content/docs/node/run/validator/cloud-service-providers/digital-ocean.mdx @@ -44,4 +44,4 @@ 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. +Once your Droplet is ready, follow our [Base Guide for Running a Shardeum Validator Node](/docs/node/run/validator/self-host#download-and-install-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 index 0f5ccbb..1551dac 100644 --- a/content/docs/node/run/validator/cloud-service-providers/gcp.mdx +++ b/content/docs/node/run/validator/cloud-service-providers/gcp.mdx @@ -44,4 +44,4 @@ 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. +Once your GCP instance is ready, follow our [Base Guide for Running a Shardeum Validator Node](/docs/node/run/validator/self-host#download-and-install-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/index.mdx b/content/docs/node/run/validator/index.mdx new file mode 100644 index 0000000..d95a6b0 --- /dev/null +++ b/content/docs/node/run/validator/index.mdx @@ -0,0 +1,39 @@ +--- +title: Validator +description: Steps to run a Shardeum Validator +--- + + +## 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. + + +import { Callout } from 'fumadocs-ui/components/callout'; + + +To run a Shardeum validator, first choose the approach that best suits your experience level and requirements. + + + + + + + + +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. + + + diff --git a/content/docs/node/run/validator/self-host.mdx b/content/docs/node/run/validator/self-host.mdx index 67857a7..8eefaff 100644 --- a/content/docs/node/run/validator/self-host.mdx +++ b/content/docs/node/run/validator/self-host.mdx @@ -37,6 +37,10 @@ description: Steps to run a Self Hosted Shardeum Validator on Your Own Hardware /> + +The instructions on this page are primarily written for Ubuntu/Linux operating systems. If you are using a different operating system you will need to adapt the commands and steps accordingly. The core concepts remain the same, but package installation methods and system commands may differ. + + 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 @@ -138,28 +142,6 @@ 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 diff --git a/content/docs/node/run/validator/vps-cloud-provider.mdx b/content/docs/node/run/validator/vps-cloud-provider.mdx deleted file mode 100644 index 82bc231..0000000 --- a/content/docs/node/run/validator/vps-cloud-provider.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -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, Contabo, Digital Ocean, AWS EC2, etc. - -### Detailed Setup Process - -This approach offers more control over infrastructure compared to one-click node setup. 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 `http://[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)