My Rails hosting company, Railsplayground.net, provides cheap, easy to use Linux virtual servers for running Rails apps on. I asked them if they could host my Phoenix app, https://github.com/pdxrod/blockchain_explorer, which includes running several instances of bitcoind, and they wanted too much money
I’ve tried several suggested alternatives found in this forum, but they either don’t have a persistent file system, which you need for running bitcoind, or they won’t answer your questions about how to deploy Phoenix on port 4000, have port 80 redirecting to it, and two or three bitcoinds running, except by directing you to hundreds of pages of irrelevant information. I refer to Amazon Web Services EC2.
I’m trying to find something like Rails Playground but for Phoenix. I wonder if anyone knows of one.
I would have to check the docs but take a look at Nanobox.io. It allows you to use VPS providers as the servers and they handle the setup/deployment/security/etc. If
bitcoind doesn’t need to be accessed from the outside world they would consider it a
worker. I haven’t done this myself so I can’t say it will work but I hope it gives you another option.
As far as I know, if you don’t want to mine it, you’d “only” need to attach a ~500 GB ssd (~$70 on digital ocean) for the chain (or maybe you can find something cheaper than ssd, you can even buy a hard drive from amazon probably for $50).
After a month, I found the solution. I tried Gigalixir, but their file system isn’t persistent, and various other suggestions I read here, but couldn’t make sense of them. I found out that I could run my Phoenix app on port 4000 internally in a server, and redirect external port 80 to it.
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 80 -j REDIRECT --to-port 4000
(as root - I could do this)
The only problem was opening port 80. After a month of correspondence with AWS, all they could do was send me links to documentation and forums, none of which were any use, since I needed them, the hosting company, to open the port. But Rails Playground, after a month, figured out how to do it. So now when you browse to the machine, it shows the Phoenix app running.