3

Shared blockchain... I have a server PC that is on all the time and runs a copy of bitcoin core 24/7. My main personal computer I use separate for everything else including and I use both Bitcoin core and Armory. Each time I open either of these I have to update the blockchain to my computer, no big deal if it is only a day or two behind but it means I have two copies of the same blockchain, one on each PC. Would be nice to not have that increasing disk space used on my main personal PC. Rather than doing a copy from the server PC, is it possible to set up somehow, somewhere in the config file of either or both wallets to share the blockchain that will always be up to date on the server PC across my LAN ?

  • I don't know whether it works because I don't use Bitcoin Core, but if you're on a Unix system, just softlinking to the blockchain data via some network protocol (like SFTP where you don't have to set up anything besides installing an SSH server, which you probably already did, on most distros) probably works. – UTF-8 Jan 16 '17 at 1:10
1

I wouldn't try to have both bitcoinds attached to the same storage, that sounds like a recipe for disaster, if it'll start at all.

You can either tunnel the 8332 port on your personal computer to the remote server like this:

ssh -L 8332:localhost:8332 <remoteip>

This'll basically say "whenever I connect on the local port 8332, open a connection on the remote end to localhost:8332, i.e., your server's 8332 port, and tunnel all traffic through it". So this mimicks a local bitcoind but transparently passes everything over to the server. No need to share at all.

The other option is to add the following line to your bitcoin.conf file:

rpcconnect=<remoteip>

This will make bitcoin-cli connect to the remote bitcoind instead. You also need to make sure you actually allow incoming connections on the server, so this may be a bit less secure than the SSH variant above.

  • Bitcoin Core uses LevelDB which relies on mmap filesystem access - something that is generally available for network storage. – Pieter Wuille Jan 18 '17 at 23:47
  • I'm yet to solve this as I held off until I got a NAS , so I will want to stick the blockchain on that and I suppose one of the bitcoin clients has to service it while other clients can just look on, haven't tried your suggestions above yet. – user981977 Feb 16 '17 at 0:30
  • If you can run bitcoind on the NAS itself (e.g., dockerized on Synology and similar) you should do that and expose the RPC port to the LAN. Otherwise you could mount a volume on any other machine, run bitcoind there, possibly with the -datadir=<volume-mountpoint> option so that it stores the data on that volume, and have that bitcoind expose its RPC port to the LAN. – cdecker Feb 16 '17 at 13:00

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.