Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MichalKalita/df38b036e6a65ee1ed36fa61f728a6d9 to your computer and use it in GitHub Desktop.
Save MichalKalita/df38b036e6a65ee1ed36fa61f728a6d9 to your computer and use it in GitHub Desktop.
HOWTO Run Sia host on Ubuntu server
#HOWTO Run Sia host on Ubuntu server
#Updated: 13 august, 2016
#Tested with Sia 1.0.2 and Ubuntu 16.04
#Update 13.08.2016: Changed from using supervisor to systemd
# Create user `siad`
adduser siad
su siad
# Download and install Sia binaries
cd ~
wget https://github.com/NebulousLabs/Sia-UI/releases/download/v1.0.2/Sia-UI-v1.0.2-linux-x64.zip
unzip Sia-UI-v1.0.2-linux-x64.zip
mv Sia-UI-linux-x64/ Sia/
# Configure systemd so that siad runs on boot (and restarts in case of a crash)
# Create siad.service
nano ~/.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
# Copy down the seed to a safe location! You will need this to unlock your wallet.
# 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
# Configure your host settings:
# See: http://blog.sia.tech/2016/05/26/how-to-run-a-host-on-sia/
# Confirm your host status:
./siac host
# Announce your host:
./siac host announce
# If you want to run Sia on a different port and/or host, do this instead:
./siac host announce [hostname]:[port]
# Wait a few minutes/hours and confirm other nodes see you:
http://siapulse.com/page/network
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment