1

I have a full node running on a digital ocean droplet. I have an app running at heroku, and I want to execute getnewaddress from this app. I'm trying to generate BTC addresses to which users can send payment to for payment processing in my app. How can I do this? Thanks in advance.

My app is in Python, for what it's worth.

0
1

I used SSH. Had to do something special with heroku to get it to work though

https://stackoverflow.com/questions/21575582/ssh-tunneling-from-heroku/27361295#27361295

2
  • Thank you for answering your own question. If you don't mind, adding a couple pointers on what you needed to do would make this answer more helpful to future users! – Murch Apr 9 '20 at 16:25
  • ok, edited my answer – Michael Johnson Apr 9 '20 at 23:46
1

As chytrik said, a better way of generating new addresses on a remote server would be to export an extended public key (xpub) from your wallet and put only the xpub online. Then your private key material would remain offline, and you could generate new child addresses from the xpub using BIP32.

If you still want to execute getnewaddress on your node, you would have to expose the bitcoin RPC by adding server=1 to the bitcoin.conf file on your node in order to accept JSON-RPC commands and call the getnewaddress directly.

1
  • Great answer! Welcome to Bitcoin.Stackexchange. – Murch Apr 11 '20 at 1:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.