How to set up a Sia node via command-line
Setting up a Sia node is the first step to using Skynet. Your Sia node is how you can upload and pin files, and rely only on yourself instead of a third-party webportal.
The required steps are:
- set up your Sia node
- sync consensus
- fund your wallet
- create an allowance
Set up your Sia node
Go to the Sia website and download the Sia Daemon package for your OS.
The downloaded folder will look something like this:
Move this folder to a permanent location on your computer.
Launch your CLI, and
cd into the new folder's location.
You need to start the Sia Daemon, so type
A number of new folders have been created in this directory:
You can now
cd to the directory again, and run commands starting with
./siac to see some important info like your sync status, wallet lock status, and renter info.
Your Sia node is now running. Use
./siac help to find the full list of commands, and access our API docs for more technical info.
Sia works because a blockchain governs it - a blockchain which allows for immutable transactions and a reference point that you don't need to trust. As long as siad is running, the block height will continue to sync until it is fully updated.
./siac consensus See your sync status. The two easiest things to look for here are:
Synced This will return yes or no.
Height This is the block height you are currently at.
Fund your wallet
Your Sia node has a wallet, and this wallet needs Siacoins to operate.
Siacoins are used in lots of ways, but serve a single purpose – facilitating network operations. When you upload files to Skynet, you pay for that storage in Siacoins. If you're a portal and you're storing other people's data, you get paid for that in Siacoins. If you own Siafunds, your share of Sia network growth is paid out in, you guessed it, Siacoins.
./siac wallet balance View your wallet balance.
./siac wallet address Generate a Siacoin address. Send Siacoins to this address to fund your wallet.
./siac wallet help See the full list of wallet commands.
Create an allowance
You'll need to set an Allowance, or how much money you're willing to spend on storage. Having an allowance makes sure that your storage costs are predictable, and won't exceed an amount you're comfortable with.
./siac renter See your current allowance, and info on the files you've already uploaded.
./siac renter setallowance Walk thorugh the allowance setup process.
./siac renter help See the full list of renter commands.
siac skynet upload [source] [destination Upload a file to Skynet.
siac skynet pin [skylink] [destination] Pin a file on Skynet.
More on this in the next section.