I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

run two sites with a single node

dashed-slug.net Forums General discussion run two sites with a single node

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7292
    Anonymous
    Inactive

    I have a question Alex, could we run two websites with the same node?
    At first I thought it would not be possible because of notifications, but perhaps, you can configure that each time a node receives a transaction, it is notified to two addresses per curl at a time.
    for example twice configured:
    server=1
    rpcallowip=127.0.0.1/8
    rpcallowip=XXX.XXX.XXX.XXX/24 # IP sitio 1
    rpcallowip=XXX.XXX.XXX.XXX/24 # IP sitio 2
    rpcport=8332
    rpcbind=127.0.0.1
    rpcbind=XXX.XXX.XXX.XXX # IP sitio 1
    rpcbind=XXX.XXX.XXX.XXX # IP sitio 2
    walletnotify=curl -s https://example1.com/wallets/api3/notify/BTC/wallet/%s >/dev/null
    blocknotify=curl -s https://example1.com/wallets/api3/notify/BTC/block/%s >/dev/null
    walletnotify=curl -s https://example2.com/wallets/api3/notify/BTC/wallet/%s >/dev/null
    blocknotify=curl -s https://example2.com/wallets/api3/notify/BTC/block/%s >/dev/null
    rpcauth=:example1in747wt4blfnw3inqefnuƱeof9uoqn3fuqnog8
    rpcauth=:example2uhunl8uyf4inw4iyfw84y8q3uyr89q398quwn

    Do you think this could work or give you a problem?

    #7293
    alexg
    Keymaster

    Hello,

    Generally you could connect multiple sites to the same wallet. By this I mean that it is technically possible to do so. It is true that you can specify rpcauth multiple times. I am not so sure about walletnotify / blocknotify, probably you would have to chain the two curl commands in the same line, like so:

    walletnotify=curl -s https://example1.com/wallets/api3/notify/BTC/wallet/%s >/dev/null ; curl -s https://example2.com/wallets/api3/notify/BTC/wallet/%s >/dev/null

    Or better yet:

    walletnotify=/bin/bash /path/to/walletnotify.sh

    and then add all of your curl commands in the shell script file. Do the same for blocknotify.

    The main issue with this approach is that you are introducing a centralized point of failure for all of your sites. In case any one is hacked, al the funds from all the sites can be lost.

    Instead, I recommend that you go the opposite direction: Instead of having multiple sites per wallet, have less than an entire full wallet for each site.

    Set up one wallet for each site, and hold only a fraction of the user balances in the hot wallet. Hold the rest of the funds in a cold wallet, using the Cold Storage feature, and replenish the hot wallets as needed. This is much safer in case of a hack. Generally WordPress can be made very secure, but this is hard, and because of it’s popularity, WordPress as a platform gets targeted a lot, so it’s always possible that your security can be breached. It’s best to be prepared.

    with regards

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.