<p>I used SSH. Had to do something special with heroku to get it to work though</p>

<p><a href="https://stackoverflow.com/questions/21575582/ssh-tunneling-from-heroku/27361295#27361295">https://stackoverflow.com/questions/21575582/ssh-tunneling-from-heroku/27361295#27361295</a></p>

CC BY-SA 4.0
2020-04-01T17:40:57.727Z
2020-04-09T23:45:37.933Z
2020-04-09T23:45:37.933Z
Michael Johnson
<p>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.</p>

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

CC BY-SA 4.0
2020-03-30T21:02:55.527Z
2020-04-11T01:47:47.240Z
2020-04-11T01:47:47.240Z
J. Wahab
<p>I have a full node running on a digital ocean droplet. I have an app running at heroku, and I want to execute <code>getnewaddress</code> 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.</p>

<p>My app is in Python, for what it's worth.</p>

<json-rpc><address-generation><python><watch-only>
How can I execute `getnewaddress` at my full node from a remote server?
Michael Johnson
# How can I execute `getnewaddress` at my full node from a remote server?

(Asked by: username_0 on 2020-03-27)

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.

**Tags:** json-rpc, address-generation, python, watch-only


---

## 2 answers

### Answer by username_0 on 2020-04-01. Score: 1 | Accepted answer

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>


---

### Answer by username_1 on 2020-03-30. Score: 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.


---

