| #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 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ne0ark
commented
Apr 12, 2017
|
Do you need WorkingDirectory? It might not be necessary to specify it. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jnmclarty
May 19, 2017
Worked for me today, using Ubuntu 16.04.2 LTS Siad 1.2.1 ...up to the first curl
jnmclarty
commented
May 19, 2017
•
|
Worked for me today, using Ubuntu 16.04.2 LTS Siad 1.2.1 ...up to the first curl |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Gitsack
Jul 16, 2017
Hi - i tried this but it's not working for me (Fedora Server 26):
Starting the service fails with status=203/EXEC
I put the service in /etc/systemd/system and added "User=sia" in the [Service] section, because that's my username.
Do you have a clue what's wrong?
Btw: starting the siad daemon manually works perfectly.
Gitsack
commented
Jul 16, 2017
•
|
Hi - i tried this but it's not working for me (Fedora Server 26): I put the service in Btw: starting the siad daemon manually works perfectly. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ianrountree
Aug 2, 2017
The "systemctl" command for me returns:
Command 'systemctl' from package 'systemd' (main)
systemct1: command not found
I'm not sure that I've been able to execute siad. Double-clicking siad doesn't work, nor does attempting to run it from the command line. (I'm running Ubuntu 16.04.2, have tried Sia v1.3.0 & 1.2.2)
ianrountree
commented
Aug 2, 2017
|
The "systemctl" command for me returns: Command 'systemctl' from package 'systemd' (main) I'm not sure that I've been able to execute siad. Double-clicking siad doesn't work, nor does attempting to run it from the command line. (I'm running Ubuntu 16.04.2, have tried Sia v1.3.0 & 1.2.2) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
pmknutsen
Aug 9, 2017
@ne0ark You need WorkingDirectory if you want to use a non-default directory to store Sia's datafiles. I am not certain what the default directory is when running siad in isolation, i.e. without the UI.
|
@ne0ark You need |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
pmknutsen
Aug 9, 2017
@Gitsack Only thing I can think of is that its a permissions issue. Check that the user you're running siad as has permissions to run siad and read/write permissions to the data directory (WorkingDirectory).
|
@Gitsack Only thing I can think of is that its a permissions issue. Check that the user you're running |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
zeki893
Jan 16, 2018
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
zeki893
commented
Jan 16, 2018
|
Thanks for the guide. systemctl enable ~/.config/systemd/siad.service should be systemctl enable /home/siad/.config/systemd/siad.service |
Do you need WorkingDirectory? It might not be necessary to specify it.