Skip to content

Instantly share code, notes, and snippets.

@chevdor
Created June 26, 2017 17:00
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save chevdor/8b8aaea0be521e19d2b898f561ca301b to your computer and use it in GitHub Desktop.
Save chevdor/8b8aaea0be521e19d2b898f561ca301b to your computer and use it in GitHub Desktop.
Sia install on Digital Ocean Ubuntu

HOWTO Run Sia host on Ubuntu server

Based on:

Updated: 2017-06-26

Tested with Sia 1.2.2 and Ubuntu 16.04

Create user siad
sudo adduser siad
su siad
Download and install Sia binaries
cd ~
wget https://github.com/NebulousLabs/Sia/releases/download/v1.2.2/Sia-v1.2.2-linux-amd64.zip
unzip Sia-v1.2.2-linux-amd64.zip
rm Sia-v1.2.2-linux-amd64.zip
mv Sia-v1.2.2-linux-amd64/ Sia/
Create siad.service
joe ~/.config/systemd/siad.service
Add these lines to siad.service
[Unit]
Description=Sia Daemon

[Service]
ExecStart=/home/siad/Sia/siad
WorkingDirectory=/home/siad/Sia/
Restart=always

[Install]
WantedBy=multi-user.target
Alias=siad.service
Note
If you are also running Sia-UI, change WorkingDirectory above to: WorkingDirectory=/home/siad/.config/Sia-UI/sia/
Exit to root user
exit
Configure firewall (if ufw is in use)
ufw allow 9982
Start siad as a service
systemctl daemon-reload
systemctl enable ~/.config/systemd/siad.service
systemctl start siad.service
Sia should now be running as a service which can be confirmed with:
curl -s -X GET http://localhost:9980/consensus -A "Sia-Agent"
Next, lets configure siad by changing to user siad:
su siad
cd ~/Sia
Create new wallet:
./siac wallet init
Unlock wallet (might take upwards to a minute, but probably less):
./siac wallet unlock
Create a new wallet address that you can receive funds on:
./siac wallet address
Create a storage folder (can be anywhere)
mkdir ~/Sia/STORAGE
./siac host folder add ./STORAGE/ 5GB
Set your prices
./siac host config minstorageprice 11574074074
./siac host config mindownloadbandwidthprice 25000000000000
./siac host config minuploadbandwidthprice 1000000000000
Note
For now, I used the default

1 SC = 1e24 hastings 30 SC = 30'000 000 000 000 000 000 000 000

Confirm your host status:
./siac host

To announce, you will need 50k to 100k SC as collateral per TB. 1 TB = 1024GB 5 GB = 0.00488 TB = 488 SC

Announce your host:
./siac host announce
Wait a few minutes/hours and confirm other nodes see you:

http://siapulse.com/page/network

@johnross2007
Copy link

FYI, I couldn't edit with Joe, Vim, etc. I used "systemctl edit --force"

@johnross2007
Copy link

I still can't figure out what's going on related to ~/.config/systemd/siad.service. I either can't edit it, or the later command "systemctl enable ~/.config/systemd/siad.service" doesn't work because it can't find it.

@tricecold
Copy link

you need to create the service under system user not siad, because it tells you to create it using joe , while under the siad user but then tells u to start the services after exiting siad, so your ~ folder changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment