HOWTO Run Sia host on headless Linux server (Ubuntu)



  • Hello @brisk thanks for your thoughts,
    can you explain how an attacker, which overtook a local (non root) user, could read the echo from your suggested command line?
    Would it make a difference wheather script is executed by root or a non-root user?

    greetings





  • What about

    Could not announce host: insufficient balance

    when trying to annouce ?



  • Me and a few others who read the Github Gist and this (https://gist.github.com/pmknutsen/7521a29fe8125c24eb3e/) are getting this error:
    Starting the service fails with status=203/EXEC


  • Global Moderator

    @chanakyabtc 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).


  • Global Moderator

    Awesome tutorial, thanks for making this!

    I ended up using this for setting up sia.pixeldrain.com.

    I modified the service file slightly, to fit my requirements better:

    Description=Sia Daemon
    After=network.target
    
    [Service]
    Type=simple
    ExecStart=/home/sia/Sia/siad -M gctwr 
    ExecStop=/home/sia/Sia/siac stop
    WorkingDirectory=/home/sia/Sia/
    Restart=always
    RestartSec=10
    User=sia
    Nice=2
    
    [Install]
    WantedBy=multi-user.target
    Alias=siad.service
    

    The nice value is so it doesn't end up eating all resources of the pixeldrain server. It also causes siad to get eaten first if the server happens to run OOM.
    This also contains a clean shutdown sequence for Sia, to reduce risks of data corruption when the server needs to reboot.
    The type=simple line indicates that this is not a forking service, and that it should be started in a new process.
    And I added After=network.target to make sure it doesn't start before the network driver is initialized.

    I learned a lot about systemd from this, thanks for that :)



  • This post is deleted!


  • I'm having problems installing Sia via the linux command line. I've never used go before I think that's where my major breakdown comes in.

    Does anyone have an install guide where they use go? Everything I'm finding is back before V1.1 and nothing I can find is helping me install with go.



  • @brollySSJ you don't need go, just install the compiled version from Github. The above guide still works with little modifications.


Log in to reply