SPS Validator Node Setup Guide for Dummies on Windows

in #splinterlands19 hours ago (edited)

Hi!
I've created this guide for those who want to run a Validator node on a Windows PC without buying a server. If anything is unclear, doesn't work, or have any questions, feel free to leave a comment! I'll be happy to help.

Preparing

Type ‘powershell’ on windows search bar
Run ‘Windows PowerShell’ as administrator

2025-03-11-15-05-53.jpg



run ‘wsl --install’
2025-03-11-15-10-44.jpg



This will install ubuntu by default
Restart your computer after installation

Install Docker Desktop
Download and install Docker Desktop from
https://docs.docker.com/desktop/setup/install/windows-install/

2025-03-11-15-09-30.jpg



During installation, ensure the "Use WSL 2 instead of Hyper-V" option is selected
2025-03-11-15-11-33.jpg


After installation, open Docker Desktop , Click Skip so you don’t have sign up docker account
and go to Settings > Resources > WSL Integration
Enable integration with your installed WSL distro - Ubuntu

2025-03-11-15-25-10.jpg


Setting Up the Validator

Open your WSL terminal
Search for "Ubuntu" in the Start menu and click Ubuntu or run wsl in PowerShell

2025-03-11-15-26-10.jpg

2025-03-11-15-51-04.jpg


Get node files

run (change the mail with your actual email)
ssh-keygen -t ed25519 -C "[email protected]"

It asks three questions you can just enter three times for the questions.
→ enter → enter → enter

2025-03-11-16-04-21.jpg


run
cat ~/.ssh/id_ed25519.pub

drag & select the key and copy the key with ctrl+C

2025-03-11-16-05-10.jpg

Sign up and log in github.com
After login github, go setting

2025-03-11-16-01-01.jpg

SSH and GPG keys → New SSH key

2025-03-11-16-01-25.jpg

paste the key and add ssh key

2025-03-11-16-06-08.jpg

2025-03-11-16-05-50.jpg


run
git clone --branch vlatest --single-branch [email protected]:TheSPSDAO/SPS-Validator.git
yes

2025-03-11-16-14-56.jpg

run
cd SPS-Validator

2025-03-11-16-15-18.jpg

Set up environment variables

Edit the configuration file

run
cp .env-example .env

Use a txt editor to modify the .env file:
run
nano .env

  • Important settings to configure:
    • VALIDATOR_ACCOUNT: Your Hive account name
    • VALIDATOR_KEY: Your Hive posting key
    • If you just want license rewards, set DB_BLOCK_RETENTION=432000 to keep your database size small if you’re not aiming Top Validators. Recommend for most people.

2025-03-11-16-17-05.jpg

2025-03-11-16-16-48.jpg


save the updated .env file
ctrl + x → y → enter

2025-03-11-16-17-43.jpg

Build the validator

run
./run.sh build

  • This will deploy the database, run migrations, and download/deploy the snapshot
  • This process may take some time

2025-03-11-16-39-44.jpg

2025-03-11-16-36-42.jpg

Start the validator

run
./run.sh start all

This starts both the validator and the management UI
This process may take some time

2025-03-11-16-43-03.jpg

You need to wait this number become 0 to start your node validate block

2025-03-11-16-46-38.jpg



Congrat! Now your validator node is running!


Monitoring and Managing the Validator

Open your favorite browser

Check validator status
- Open http://localhost:3333/status in your browser

2025-03-11-16-44-11.jpg

Access the management UI
- Open http://localhost:8888/ in your browser

2025-03-11-16-44-29.jpg

View logs

./run.sh logs

Check and Stake your node

  • Make sure Set the VALIDATOR_ACCOUNT and VALIDATOR_KEY in your .env file if you haven't already
  • Go to http://localhost:8888/validator-nodes/manage and follow the registration steps
  • Wait until your node catches up before registering (logs will show "Blocks to head: 0")
  • First-time registrations will be set to "inactive"
  • After registration and when your node is caught up, you can set it to active
  • Stake your license on splinterland license page

Keeping the Node Running

To keep the node running continuously:

  1. Make sure your WSL instance stays running

    • WSL might shut down with some reason like a system restart
  2. After a Windows restart:

    • Open WSL terminal
    • Navigate to your SPS-Validator directory
    • Check if the validator is running:

    ./run.sh logs

    • If not running, start it again:

    ./run.sh start all

  3. Set Windows to auto-start Docker Desktop

    • This will ensure Docker is available after restarts
    • Open Docker Desktop > Settings > General > Start Docker Desktop when you log in
  4. Consider using a WSL startup script to auto-start the validator

    • Create a startup script in your home directory:
      echo '#!/bin/bash
      cd ~/SPS-Validator
      ./run.sh start all' > ~/start-validator.sh
      chmod +x ~/start-validator.sh

2025-03-11-16-26-49.jpg

  • Add this to your Windows startup by creating a .vbs script:
  • open notepad app on windows -> paste this

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "wsl -d Ubuntu -e /bin/bash -c ~/start-validator.sh", 0, True

Save this as a .vbs file and place it in your Windows Startup folder (Win+R, then type shell:startup)

Common Commands for Management

  • ./run.sh stop: Stops all services
  • ./run.sh start: Starts validator and database
  • ./run.sh start all: Starts validator, database, and UI
  • ./run.sh logs: Shows the validator logs
  • ./run.sh rebuild_service validator: Rebuilds the validator to apply new environment variables
  • ./run.sh snapshot: Creates a backup of your database

Please vote this post so it reaches more people
If this helps, could you consider voting for my node?

Thank you! https://monstermarket.io/validators?validator=hanv

Sort:  

This post has been supported by @Splinterboost with a 12% upvote! Delagate HP to Splinterboost to Earn Daily HIVE rewards for supporting the @Splinterlands community!

Delegate HP | Join Discord