Guide: Storage Provider Quick Start, Command-Line Interface

The first Storage Provider quick start guide focused on using the ScPrime UI to set up your first provider instance. Even if one uses the UI to setup their host, it is recommended to actually run it on a day to day basis using the CLI, or Command-Line Interface, for reasons discussed in that write-up. This guide will show you how to use the CLI to setup your provider instance so you can forgo using the UI altogether.

Here are a few things you will be required to do to get started…

  1. Download and install the ScPrime Command Line Version from here. Learn how to properly install and setup the software by reading this guide. It is ok if you already have or want to install the UI version instead, as it will have what you need for this guide.
  2. Ensure you have at least 999GB free space on your hard drives/external drives, etc.
  3. Know your hosting PC’s IP address and try and make sure it’s a static IP. While a dynamic IP address can work, any time you have to reboot the machine, it could change the address, causing issues with your host. You can work around this with a dynamic DNS address. To learn how to get a dynamic DNS address, please join the ScPrime Discord and visit the network channel.
  4. You need to make sure you have port forwarding open on port 4282 and 4283. How and where you do this depends on your ISP. For myself, I just had to log into my ISP provided router and open those ports for the IP address of my hosting PC. There are thousands of router models, so you may need to chat with your ISP or manufacturer if you cannot find the forwarding menu.
  5. Make sure your hosting PC is one you can leave on 24/7. While you can be offline for small periods of time for updates, being a storage provider requires some commitment because you are storing data that people need access to.
  6. Have enough ‘collateral’ to cover the costs to start hosting. A good/safe value for offering 1TB to the network with current pricing would be between 300 and 500 SCP per TB provided.

A note on collateral- Collateral is part of the exchange between a storage provider and a storage renter. Because of the decentralized nature of the network there has to be a mechanic in place to keep a ScPrime Storage Provider from just switching off their computer or faking the data. This mechanism is collateral. Collateral is put up to guarantee original data is stored and not tampered with.

Let’s get started

You will want to find the directory where spd.exe and spc.exe are. It’s common that they are located in a directory similar to above. Now is a good time to set a system ‘path’ to this folder. It will make your career as a Storage Provider much easier as you can input spd and spc from any directory.

Pathing works differently within each OS. We will add Mac and Linux instructions soon as well. For Windows, you will want to search for ‘environmental variables’ and open ‘Edit the system environmental variables’.

Now click on Environment Variables

Select the ‘Path’ variable and click on Edit.

Click on New and then Browse. You will want to navigate to the directory discussed above using the Windows Explorer.

Once you see the path to your spd and spc files in the list, click OK. Your path is all set.

Starting the Daemon

Let’s fire up the daemon. As shown above you will either need to know the directory where ScPrime is installed (often different from where spd.exe file is). The directory will have folders like ‘consensus’, ‘host’, etc. Once found, use it as above with spd.exe. For this instance, it was ‘spd.exe -d c:\users\parts\appdata\local\scprime -M gctwh’.

In this command, spd.exe is the program. -d points the program to the directory where the metadata is stored including consensus, wallets and file contracts. -M refers to which modules will be loaded at startup. This is where the CLI shines by letting you cut some fat in not loading modules you won’t be using

g = gateway (access to the p2p network, must be active)
c = consensus (blockchain, must be active)
t = transactionpool (must be active)
w = wallet (must be active)
h = host (must be active if you are providing storage)

Other modules include renter, explorer, miner but these are seldom needed based on the current network setup.

The ScPrime Daemon is now running.

Unlock Wallet

Open a new command prompt and type spc to see the status. You will want to make sure your host is synced at a block height above 109,000. You will also notice that your wallet is still locked.

To unlock the wallet type ‘spc wallet unlock’ and then enter your wallet password (which is most likely your passphrase seed unless you changed it to a password). You can copy/paste your 28 or 29 word seed in from a text file or you can manually type it. In either case it will not show up on the screen for privacy reasons. Once you have entered it fully, hit enter and you should return to the command prompt if entered correctly.

If you use the spc command again, you will see the wallet is now unlocked.

Adding Shared Folders

You will have to create your shared folders first using your OS explorer. For this guide, I created a folder called ‘SCP’ on my D:\ drive and plan to store 1095 GB there. As shown above, the command is ‘spc host folder add (your drive and folder) (amount of storage offered).

If you have a larger drive (multiple terabytes), it’s a good idea to split this drive into a few smaller folders. For examples, if you have a 4TB drive, consider making 2x 2TB folders or if you have an 8TB drive, 4x 2 TB folders, etc. It’s also very important to leave at least 40 to 50 GB of the drive’s total capacity free to prevent any file corruption.

The minimum recommended amount of storage you should offer is 999GB. Storing at least this much, as this guide suggests, allows you to earn incentives to host, along with your rent (sign up for incentives here).

Storage Provider Settings

Now let’s take a closer look at the settings;

Max Duration- This is fairly straight forward. It’s the maximum amount of time in weeks you want to allow a smart contract with a renter to last. You can set this to what you like. 13 is a good number to set it at. Speaking further about contracts, on the ScPrime network, these contracts are smart contracts. They are validated on the blockchain, and are the reason two unknown parties can transact with each other, like ScPrime hosts and renters do.

Command: spc host config maxduration [value]

Collateral Per TB/Month- As previously mentioned, this is the amount of collateral you will put up per month, per terabyte in collateral. It’s recommended to set your collateral between 1x and 1.25x what you are charging for storage. Based on current recommendations of storage between 10 SCP and 20 SCP, collateral should be set at (if using 10 SCP pricing x 1.25) 12.5 SCP.

Command: spc host config collateral [value]

Storage Per TB/Month- This is what you are charging per terabyte per month for storage. 10 to 20 SCP is currently the set amount allowed if you want to qualify for incentives. You are not limited in how much you can charge, but you will receive lower extra incentive funds if your price is too high and may even be excluded from receiving a contract if there are cheaper providers near you.

Command: spc host config minstorageprice [value]

Download Per TB- This is another ‘fee’ you can charge depending on your ISP. Download as a host is actually your ‘upload’ in terms of your ISP. If a renter downloads some of his data from your host, you will be ‘uploading’ it to him. Many internet plans commonly have upload limits, so if that is the case with your ISP, you may want to play around with this value.

Command: spc host config mindownloadbandwidthprice [value]

Upload Per TB- Similar to above, but this is really you ‘downloading’ in terms of your ISP. Most internet plans have high or unlimited download options, so this might be one you can charge very little for.

Command: spc host config minuploadbandwidthprice [value]

A note on upload/download charges- While in theory, charging 0 SCP for upload and download would make your host more attractive for renters, there may be an issue currently that prevents storage if you do this. It is recommended to set your provider to at least 1 SCP for upload and download charges. Explore https://stats.scpri.me/storage-network-status to see how varied this pricing can be between Storage Providers.

Collateral Budget- The total amount of SCP from your wallet that can be locked up in smart contracts at one time is your collateral budget. It is recommend to set this at 2KS (2000 SCP).

Command: spc host config collateralbudget [value]

Max Collateral- This setting is the maximum amount of SCP that can be locked into a single contract at one time. 50 SCP is the recommended amount currently.

Command: spc host config maxcollateral [value]

Putting it all together

All the commands entered are within the recommended community settings to qualify for incentive payments. After each command is entered, you will get the confirmation the host setting is updated. You can ignore the ‘error’ message. It pops up because we aren’t loading the renter module on the daemon.

Now we will announce that our ‘host’ is ready to start taking on data from the network. Type in spc host announce and that’s it, you are now a Storage Provider!

Finishing up

  • Register for incentives. If you are within community guidelines, be sure to visit this link and sign up for incentive payments.
  • Uptime is the key to earning as much as possible as a Storage Provider. Check out this guide to setup a monitor to notify you when your host goes down.
  • Visit the network status page to keep tabs on the network.
  • Stop by the ScPrime Discord and say hello. The #network channel is always a great place to ask questions.

Guides, technical articles and news about ScPrime. ScPrime is a distributed cloud storage project.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store