Last active
February 24, 2021 01:56
-
-
Save pmknutsen/7521a29fe8125c24eb3e to your computer and use it in GitHub Desktop.
HOWTO Run Sia host on Ubuntu server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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
Thanks for the guide.
This part since we exited siad, ~ != /home/siad :
systemctl enable ~/.config/systemd/siad.service
should be
systemctl enable /home/siad/.config/systemd/siad.service