Setting up Sia Daemon on Digital Ocean



  • @bryan
    In general, you can rent a virtual machine from Digital Ocean, but the storage price is insane compared to Sia...
    Currently 100$/TB/month. Though, they state it is on SSD.



  • @reinisp I want to develop an application, but I do not want to host the application on my work/home computer, hence the VPS.



  • @kiljoy001
    I have no experience with Digital Ocean. If your siad is still stuck, perhaps you can "dynamically" adjust the RAM for a short term?
    As I read, they ar billing hourly, so you could rent a 8GB version say for one day or even less, so siad finishes initial syncing, and reduce it afer that to the desired size (or move the synced node data folders to your original).
    I think a SmartOS zone is comparable to a DigitalOcean VM. My testing showed a delayed (slow) but acceptable startup on a 2GB zone after the initial sync.



  • I eventually settled on setting up a VM on my home machine and using teamviewer to connect to it remotely if needed, it seems to work fine mostly. I however now have another problem - how do I reach the daemon remotely? I got it set up in the virtual machine, works fine on the VM but it does not seem to be reachable from the host machine using the IP address (addressing is done my router, and the VM is able to reach the internet). I'm not sure quite what to do - I had thought the purpose of the daemon is so that remote clients can contact it to make api calls - is this not the case?



  • @kiljoy001
    The daemon api is listening to localhost by default, as it opens a big hole in the security if you accept api calls on public address. Remember that if the wallet is unlocked (if you host/rent) anyone could send a "transfer coins" api call to it...
    You should configure your router/firewall for your Digital Ocean VM so it accepts connections to the API port (9980) ONLY from your home IP. Then start the Sia daemon with the "--api-addr <IP accessible from your home>:9980" option.



  • @reinisp Hm, well since I set it up using systemd, I couldn't figure out how to pass flag commands in the config file. I think I will just have to deploy the site on the VM. Not what I wanted to do, but it seems that would be the easiest method available to me. I'm sure there are better ways to set this up, but I'm already struggling with getting this running before even getting as far as developing something that can even talk to the daemon.



  • @kiljoy001
    I put the siad with options into a "shell script" (it contains only the one line) file and execute the script instead of siad directly... Just like the .bat files for starting miner.



  • @reinisp that's not a bad idea. Can you add a shell script as a service with systemd?



  • @kiljoy001
    I'm not familiar with systemd, but I can't imagine any diference between calling/executing a binary executable or a text file with the executable attribute set.



  • Would you happen to know how to set the API password? I've looked and I can't find the instructions on how to do so.


Log in to reply