- What is ScPrime?
- What You Will Need
- Get Started
- Port Forwarding
- Important Note About Metadata
- Starting The Daemon
- Creating a Wallet
- Adding Folders to the Network
- Resizing Data Folders
- Entering Our Provider Settings
- Dynamic DNS
- Announce Our Provider Host
- Automatically Unlock Wallet & Restart Daemon After Reboots
- Check the ScPrime Grafana List
- How to Update (1.6.0 to 1.6.1)
What is ScPrime?
ScPrime is a new Cryptocurrency that, in it’s simplest form, aims to provide a worldwide distributed datacentre. The coin is primarily mined with ASIC’s but that is not what this guide is about. ScPrime is a fork of the SiaCoin project but the ScPrime team has reviewed and fixed code that was buggy and/or detrimental to the network as a whole. A lot consider SiaCoin to have almost failed and ScPrime aims to fill the gap with a great team behind it. For more information you can read more about it here.
What is a Provider?
Essentially we will be setting up as a “provider” where we will put up some of our storage space for use on the network and in return we will be compensated in SCP which is currently trading around the $1.20 mark. The word “miner” and “provider” is, in this case interchangeable and the same thing. As a provider we are “mining” ScPrime just not in the traditional way with a GPU/CPU.
I could write a long article about what it is because there is a lot to take in but we are trying to simplify things here and will only focus on being a Provider for the ScPrime network and contribute to the distributed datacentre. If you have ever farmed Chia (XCH), this is similar but we are not filling our drives with unusable space because renters will be able to buy our space and pay us in SCP on a monthly basis.
For the next 12 months there is incentives to providers which gives a flat fee for keeping your rig online and available with at least 85% uptime.
Incentives work as follows:
- Incentives start at 125SCP per terabyte and will reduce by 10SCP every month for the next 12 months.
- Above 95% uptime – You will receive 100% of incentives.
- Above 90% uptime – You will receive 50% of incentives.
- Below 85% uptime – You will receive no incentives.
Global Data Creation
Below is a chart showing the prediction forecast for worldwide data created from now until 2025. This information is based on the creation of the “metaverse” and Web3.0 where massive amounts of data storage will be needed for things like NFT’s and other Web3.0 related storage. ScPrime fits this business model perfectly and will be a distributed blockchain storage provider with providers worldwide.
What You Will Need
- An amount of capital to allow for the creation of contracts.**
- A x64 based PC. Windows & Linux are supported but I will only cover Linux here.
- 500GB or more of storage space available. Usually a high quality Nas Drive like WD RED or Seagate Enterprise.
- Ideally an SSD hard drive for storing metadata with a minimum 100GB to be safe and allow for expansion.
- Dynamic DNS service like noip.com or duckdns (Optional but recommended)
**A small amount of SCP funds is needed to allow the creation of contracts. Its not huge, I started with 37SCP which was about £20 or $30 at the time. Later I added more to bring up my collateral level above the recommended 30-50SCP as I have it and am investing. A word on collateral,
Collateral is an amount of SCP required by providers because it shows you are willing to complete the contract. Once the contract is complete you get your collateral back with your fees added. Currently I have not had any contract cost more than even 1SCP but that may change in the near future so it is best to have enough available if you can but do not be put off as the money you earn can be put back into your collateral allowing for larger contracts and will do so automatically.
After you create your wallet further on in the guide, you can use it to send funds to for your collateral. The main exchange trading SCP right now is SouthXchange.com. There was zero KYC requirements to buy the small amount of SCP needed to start accepting contracts.
Operating System Choices
Operating System compatibility will vary somewhat but the recommended way to host ScPrime as a DIY provider is with Debian or Ubuntu Linux Server. For this tutorial I will be using Debian Bullseye as a Headless machine (no monitors) but the tutorial is also compatible with Ubuntu Server flavours. You can use a full setup with a desktop but the minimal server version is the most desirable for this situation.
Our computer must be connected through Ethernet because WiFi is just too unstable and could cause you to lose your incentives due to downtime.
First let’s download the ScPrime CLI application and then we will be setting out our folder structure.
Visit https://scpri.me/software/ and download the client for your chosen OS. The CLI version is the recommended way to set up as a provider so that is how we will be getting set up.
# Change to root sudo su # Change to the home directory #eg /root cd root # Make the Directory mkdir ScPrime && cd ScPrime # Download the zip file wget https://releases.scpri.me/1.6.0/ScPrime-v1.6.0-linux-amd64.zip # Install unzip if you don't already have it sudo apt install unzip # Unzip the file unzip ScPrime-v1.6.0-linux-amd64.zip # Delete the zip file rm -r ScPrime-v1.6.0-linux-amd64.zip
Lets add our folders on our drive, for this example i will be using a 4TB 3.5″ HDD Western Digital Red NAS. Quality drives are one of the most important factors when setting up a provider. Any enterprise grade NAS drives like WD RED or Seagate Barracuda are a good choice because they are tested and able to withstand the constant writes and reads.
# Move to the folder on the HDD cd /mnt/4tbhdd # Make the directory mkdir SCPDATA1 mkdir SCPDATA2 mkdir SCPDATA3 # When we have set up the daemon we will add these folders later as 1TB each to the network.
We will need to forward some ports to our machine. Namely ports 4282-4285. Because of the variation in routers its not possible for me to explain all of them but here is a website that should help you forward those three ports.
Important Note About Metadata
The ScPrime Website states the following important note for providers who also host their wallet that you must have ample space for your metadata and room for expansion so 100GB+ is recommended.
A stable and full backup of the metadata should be done frequently as corruption of the data will mean you could lose contracts. From the official ScPrime Website:
“Important note: If you’re planning to use the CLI to run a storage provider instance and not just as a wallet, you need to be aware of where you are keeping your metadata. If there is a sure way to corrupt your Storage Provider’s metadata and lose all contracts and collateral, it’s by keeping your metadata on a drive that may run out of HD space. The default location is $HOME/.scprime. This should be fine, if you have over 100GB free on your system drive. However, if your system drive is lacking on free space or you have reserved too little space for system-updates and/or growth for metadata (consensus, contractdb, etc) this could prevent the Storage Provider from writing to or accessing the metadata folder. If this happens, your host may be unrecoverable.
To avoid this, ensure your system drive has ample free space. How much space can be different for each instance, but 100GB is a safe bet. An easier route however, would be to put your metadata on a non system drive or disk partition. To do this, swap out the default location above, with where you would like your metadata to be stored instead (see example below).”
From this we can establish that ScPrime, state a very important point.
KEEP YOUR METADATA FOLDER SAFE and create a backup solution if you can.
Lets create the Metadata folder, I will be using
/mnt/ssd/scp-metadata which is on a 1tb SSD.
Starting The Daemon
Now we have our metadata directory we can start the daemon. We will be using the
-M gctwh flag to disable the renter module as we will not be renting any space.
# Start the daemon with ./spd -d /mnt/ssd/scp-metadata -M gctwh
If you are impatient you can download the current consensus file from the scprime website here
Restart the service after adding the consensus.db file into the consensus folder in the metadata folder.
Finally you should see the demon is fully started
We can now check the status of our host with
./spc host -v or
Creating a Wallet
Open up a new terminal and navigate to the ScPrime folder. Type
./spc wallet init to generate a seed. Backup the seed as you will need it for the future. Type
./spc wallet address to generate a wallet address.
You can now use this address to send funds to your account for collateral. This is explained earlier in the guide but you need a small amount of collateral in the form of SCP funds in your account and you can buy SCP from SouthXchange.com.
# Unlock Wallet with ./spc wallet unlock
You should see the metadata start to populate. Be patient, this may take some time depending on your internet connection. Be aware it could take quite a few hours to download the whole consensus.db file.
Adding Folders to the Network
# Add the folders we created for our data earlier ./spc host folder add /mnt/4tbhdd/SCPDATA1 1TB ./spc host folder add /mnt/4tbhdd/SCPDATA2 1TB ./spc host folder add /mnt/4tbhdd/SCPDATA3 1TB # The minimum amount of storage required is 500GB
Resizing Data Folders
If you choose that you want to resize a folder for whatever reason you can issue the command below
./spc host folder resize /mnt/4tbhdd/SCPDATA1 500GB # Use GB, TB. eg 1024GB, 1TB
Entering Our Provider Settings
We need to set some basic limits for our provider settings and set what rates we are willing to accept for contracts. Here i will be entering the recommended settings from the ScPrime Website
# Set the max duration in weeks (Recommended is 9-13w) ./spc host config maxduration 10w # Set the amount of collateral used per contract (50SCP recommended) ./spc host config maxcollateral 50SCP # Set the collateral budget, the max amount that can be tied up in contracts. ./spc host config collateralbudget 1KS # Set the minimum storage price (5SCP recommended) ./spc host config minstorageprice 5SCP # Set the collateral amount to be the same as the storage price ./spc host config collateral 5SCP # Set the price for download bandwidth per 1TB (1SCP recommended) ./spc host config mindownloadbandwidthprice 1SCP # Set the price for upload bandwidth per 1TB (1SCP recommended) ./spc host config minuploadbandwidthprice 1SCP
You can ignore the ‘error’ message. It pops up because we aren’t loading the renter module on the daemon.
Dynamic DNS is recommended if you use a non static IP from your ISP. These are usually DSL internet connections and the main disadvantage is with a non static or “dynamic” IP is your ISP can change the IP whenever it likes and will do sometimes quite frequently. We don’t really want to have to re-announce every time that happens so we will use Dynamic DNS to announce the domain name instead. There are a lot of free options including DuckDNS which are great services but I will be using noip just because it’s compatible with my router and I have been using it for years.
If you would like to sign up for no-ip, if you use our link you can get $5 off using the code REFER5. This is a great deal because you can get a whole year of Enhanced Dynamic DNS for only $19.99 instead of the usual $24.99.
Full guides are available at the respective websites and are far more extensive than I could write here. Essentially you install software on your machine that updates the website every 5 or 10 minutes with your current IP address.
Announce Our Provider Host
Once we have set our rates we need to announce our host to the network. We can do this with one command but we need to make sure all the other steps are completed before we announce or we will get problems and may not be eligible for incentives.
# Announce the host ./spc host announce <ip-address/ddns>:<port (default port is 4282) # eg ./spc host announce scprime.noip.com:4282 # or ./spc host announce 126.96.36.199:4282 # an ip address can be used if Dynamic DNS is not used.
Automatically Unlock Wallet & Restart Daemon After Reboots
To automatically restart the spd daemon and unlock the wallet after reboot simply create the service script. Credits to HexCrypto on YouTube for his guide. He originally wrote the script for both Linux & Windows. There are a few steps but they are easy to implement.
- Rename ScPrime main folder to ScPrime. (download the current version then rename the folder)
- Create a .service file.
- Create the script to unlock and start the service after reboot.
- Create a seed file.
- Edit crontab to run the script on every reboot.
- Set the permissions for each file.
Create Daemon Service
Next create a file named
cd /etc/systemd/system nano scp-daemon.service
Next we need to add the script to the file. Copy and paste the below code and press ctrl+x to exit and Y to save.
[Unit] After=network.service [Service] ExecStart=/usr/local/bin/scp-startup.sh [Install] WantedBy=default.target
This tells the computer to start the script we are going to create after the network starts as a daemon.
Create Seed File
The seed file needs to be in the spd directory, where the main application is. eg,
# Navigate to your scprime main install folder, (MUST MATCH THE ABOVE SCRIPT) cd /home/user/ScPrime #Create the seed file nano hidden.seed
Add your seed to this file, save and close.
Now we need to create the script itself. In /usr/local/bin
cd /usr/local/bin nano scp-startup.sh
Copy and paste the code below to
#!/bin/bash #Script to startup SCPrime by DazEB Originally Created By HexCrypto @ YouTube SCPRIME=/enter/scprime/spd/folder/location #eg /home/user/ScPrime SPD_DATA=/enter/scprime/metadata/folder #eg /mnt/ssd/scp-metadata SCPRIME_WALLET_PASSWORD=`cat /home/user/ScPrime/unlock.seed` #eg same folder as spc and spd. export SCPRIME_WALLET_PASSWORD $SCPRIME/spd -d /scprime/metadata/folder/location -M gctwh & #eg /mnt/ssd/scp-metadata $SCPRIME/spc wallet unlock
Next we need to set some permissions for the files.
# Set the permission for scp-startup.sh chmod 744 /usr/local/bin/scp-startup.sh # Set the permisson for the service file chmod 664 /etc/systemd/system/scp-daemon.service
Add Cron job
Now we need to create the entry in the cron jobs and set the script to run on reboot.
# Edit the cron file crontab -e # Enter the following line below the comments. You may also have a duckdns service here, enter it below that. @reboot /usr/local/bin/scp-startup.sh
Your cron file should look like the image below. If you have DuckDNS enabled you will see an entry here also to update your IP to the domain.
Now we can reboot the machine with
reboot and after reboot we can check if the service is running.
# Reboot machine reboot # After reboot, check the status with (make sure to be in the scprime directory) ./spc wallet
You should be greeted with the status of the wallet. It should show you your wallet balance and show that it is unlocked.
Next check the service with
# Check the status of the daemon. htop # You should see the spd executable in the list and is running.
This is the startup script complete.
Check the ScPrime Grafana List
go to https://grafana.scpri.me/ and click the filter icon
Type your node name into the filter and click ok and you should see your node listed. Clicking the text will give you detailed statistics about your node.
How to Update (1.6.0 to 1.6.1)
Stop the daemon
Open the ScPrime folder and delete the
Either reboot and let your script restart the process or issue the command:
./spd -d /mnt/ssd/scp-metadata -M gctwh
As of now you should be fully set up to provide your services and be fully eligible for the incentives. The image below is what you will see.
Hello there! My name is Darren and i am a hobbyist/homelab/crypto enthusiast. If you liked this post please consider signing up for a Digital Ocean account using my link and you will receive $100 in free credit while at the same time helping me to cover the costs of my servers. Thank you!
Some great affiliate links give you free cash to spend on VPS. If you use these links I will get a small commission if you choose to sign up.
- Vultr.com – $100 free to spend on VPS
- DigitalOcean.com – £200 to spend on all services including VPS
- Atlantic.net – 1 Core 2GB RAM VPS FREE for 12 months from signup + $15
- Hetzner Cloud – $20 Free to use on all products
- GSuite – Google Workspace 10% off the first year
6AKCQG7CAFYCQWAto your Google Workspace Account