Hosting with the siad CLI on Linux
Last updated
Last updated
This is a technical guide to setting up a new host from scratch on Ubuntu server using only the terminal. To learn more about the basics of Sia hosting read our hosting article. This guide should be similar for any other Linux distributions.
Install the latest version of siad
by going to the official website and downloading the latest binary for your operating system. This guide has been written for v1.5.9.
You can download the files and extract them using wget
and unzip
By creating a systemd file we can start Sia whenever the server is booted instead of starting it manually. Run the following command to create a new systemd unit file:
Then, modify the following snippet to fit your host and then paste it into the file. You will want to change asecurewalletpassword
to a more secure wallet password.
Your Sia node should now be running and accessible. You can try out a few commands to test it:
You should now create a wallet. You will need the password you set in your systemd unit earlier. I will be using asecurewalletpassword
. Wallet seeds should not be shared between hosts, so we will be generating a new recovery seed. When prompted type in the wallet password you chose.
A new 29 word wallet seed will be generated. Save this seed somewhere secure, if something happens to your server you will need it to recover your Siacoin. Secure Seed Management
You should now unlock your wallet with. In the future, when starting Sia your wallet will automatically unlock.
The last step is to generate an address to send Siacoin to:
You can now send Siacoin to this address to fund your host, however the funds will not show up until you are fully synced.
Hosts need Siacoin to form contracts, post collateral, and provide storage proofs. It is important to keep at least a little balance in your wallet at all times. Around $10 USD in Siacoin is enough to get started, but you may need to add more as it gets locked into storage collateral.
Now we need to wait for our host to fully synchronize we can check progress with the following command:
Now you can add storage folders. I am going to assume that any external drives are already mounted and formatted. I am going to be adding a 1TB folder mounted at /mnt/data
I am going to be setting my host's storage price to 85 SC/Tb/mo
(around $1.50 USD), download price to 170 SC/Tb
(around $3.00 USD), and collateral to 170 SC/Tb/mo
(2x storage price
). Due to a bug, I will also be setting my collateral budget to 100KS
. You can see all of the configuration options by typing siac host config --help
The Skynet registry is a key value store for storing really small data. The host does not have to post collateral for data stored in the registry, so there's no risk of losing money if you lose the stored data. It is completely optional to enable.
Pricing is based on your storage and bandwidth prices. Updating a registry key costs the renter 5 years of storage + bandwidth. Reading a registry entry costs the renter the equivalent of 10 years of storage + bandwidth.
The recommended registry size is 4GB, it is stored with your consensus data.
If you have a firewall or router you will need to forward/open TCP ports 9981-9983. How to do so is outside of the scope of this guide, there are tutorials available for most routers/firewalls available on Google.
Now that you have setup your host, all that is left is to announce. Most hosts like to setup a custom DNS for their hosts such as host.siacentral.host:9982
. If you have a dynamic IP, it is recommended to use a dynamic DNS service to update your IP automatically when it changes. Substitute your domain or IP in the following command:
Announcements can take between 20 minutes to an hour to be confirmed. Once your announcement is confirmed you can check your host using Sia Central's Host Troubleshooter or SiaStat's Host Monitor.
siac
is the utility used to interact with a running Sia node you can list commands available or get usage information by adding --help
to the end of any command:
It is important to keep your host up to date. To update:
Download and unzip the latest release from https://sia.tech/get-started
Stop the siad service with sudo systemctl stop siad
Replace the siad
and siac
binaries at /usr/local/bin
Start the siad service sudo systemctl start siad