SPK Testnet Node Setup Guide

in SPK Network5 months ago (edited)
Authored by @nathansenn

Introduction

This guide will walk you through setting up an SPK Testnet node. SPK is a decentralized file storage network built on the Hive blockchain.

spkcovertestnetnguide.png

Prerequisites

  • Have TEST LARYNX Tokens

Simple SPK Storage Node

This is the base model for the SPK ecosystem. It allows anybody with a computer and an internet connection to participate. This setup is extremely simple but requires you to have Docker, which is a way to run compartmentalized virtual machines. Get Docker

The Code button displays download options

Next, copy env.sample to .env and write your spknetwork hive account and active key in the coppied file.

  • copy and paste the env.sample file, open it with a text editor like Notepad, and fill in the account information.
  • Make sure you rename this file to .env
    • This might make the file invisible on your computer

Now run the build and up

  • docker-compose build

  • docker-compose up

You should now be able to store the files in contracts you might see around Hive.

To Earn Test BROCA and Test SPK

To manage your node, you can follow this link: localhost:5050

  • This link will only work from a computer with the software running on it.
    • Ports 4000(IPFS), 5001(IPFS), 5050(Trole), 8000(PoA), and 8080(IPFS) will be used.

Full Install Step-by-Step Instructions (Including Validator Node)

This install path is for developers who want to test the whole ecosystem. In addition to the above software, it will run a validator and an SPK Network node. This validator MUST be on a public address so the rest of the network can talk to it. You will also be able to accept uploads to the SPK Network and have the first chance at grabbing a lucrative spot on a storage contract. If you run any server, this should be easy; if you're capable with a computer, it shouldn't be too hard.

Full Install Prerequisites

  • Ubuntu Server
  • Domain name (stick to poa, spk, ipfs subdomains)

1. Set Up Your Server

  • Create a Server: Use Ubuntu 20.04 LTS on a service like DigitalOcean.
  • SSH Access: Log in to your server using Terminus or any SSH terminal.

Screenshot 2023-12-01 at 10.19.06 AM.png

2. Create User

  • Add User:
    sudo adduser spk
    
  • Set Password: Follow the prompts to set a new password.
  • Grant Permissions:
    sudo usermod -aG sudo spk
    
  • Switch User:
    su spk
    

root@ubuntu-s-1vcpu-1gb-sgp1-01~# sudo adduser spk.png

3. Domain Configuration

  • DNS Setup: Configure your domain's subdomains with Cloudflare or your DNS provider. A records should be set for:
    • spk.retzark.spk.tv
    • ipfs.retzark.spk.tv
    • poa.retzark.spk.tv
  • The install script will register poa ipfs and spk subdomains to your domain. We recommend sticking to these presets.

Screenshot 2023-12-01 at 10.42.02 AM.png

4. Install SPK

  • Navigate to Home Directory:
    cd
    
  • Clone Repository:
    git clone https://github.com/spknetwork/trole.git && cd trole
    
  • Run Installer:
    ./install.sh
    

5. Configuration

  • When prompted for a domain name, enter retzark.spk.tv.
  • Choose your installation options:
    • File Storage only (No SPK Node and No Validator): Respond with N.
    • Register a Validator: Respond with Y.

Screenshot 2023-12-01 at 10.45.04 AM.png

6. Hive Account Setup

  • Enter your Hive account name and active key when prompted.
  • For SPK keypair, select N to generate a new one.

Screenshot 2023-12-01 at 10.48.57 AM.png

7. Service Status Check

  • Verify services are running with:
    systemctl status ipfs
    systemctl status spk
    systemctl status poa
    systemctl status poav
    
  • If any services aren't running, restart them using:
    systemctl restart [service_name]
    

Screenshot 2023-12-01 at 11.09.42 AM.png

8. Uploading Files to SPK Network

  • Visit Dlux.
  • Power up SPK and create a contract.

0.000 SPK.png

Create Contract.png

  • Wait for the contract to be built, then add and upload files.

spkcc_channel_open.png

  • Sign and upload

game-board-ability (1)-png.png

  • Wait then refresh the page after the image is successfully uploaded

1.854436 MB.png

  • Create a post that with you’re uploaded image

Screenshot 2023-12-01 at 6.14.23 PM.png

SPK Storage Dashboard

At spk.your.domain you should find the storage node panel. This panel allows limited storage management with your hive keys and keychain. You can for example: store newfound contracts, explore and remove existing contracts (files), and see your SPK network balances.

Conclusion

After following these steps, your SPK Testnet node should be up and running. For any issues or further assistance, refer to the SPK Network Discord Server or Telegram Group, you can find the links below.


About the SPK Network:

The SPK Network is a decentralized Web 3.0 protocol that rewards value creators and infrastructure providers appropriately and autonomously by distributing reward tokens so that every user, creator, and platform can earn rewards on a level playing field.

Sort:  

Why no IPv6 on the dns entries?

Feel free to add them, I don't think it will break anything and caddy should set up the reverse proxy just fine.

Why not do it in the example? Caddy supports v6 out the box.

DYO on the project before considering investing on it

Whats the minimum and recommended specs to get this up and running?

IPFS can run in browser, and the only thing most of the rest of this does besides talking is hashing. It should run just about anywhere that has half a gig of ram and a cpu. Of course the thing we're trying to share is the hard drive space, and for full setups you'll need a little more buffer room to manage file uploads.

We're very interested to see what the lower requirements are.

I don't even remember where I've put my Lrn tokens, I shall look for them. I hope they weren't in an order and sold already...

All good! Everything will be great if you keep going
@ wordle unlimited

Congratulations @spknetwork! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You made more than 50 comments.
Your next target is to reach 100 comments.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

It looks like I've got a test node up and running in Docker, but I'm not showing any LARYNX after following/unfollowing a couple of times. Does a contract need to be written for my storage to be available on the network? My dashboard is reporting a percentage used with 1 object.