0

I have setup geth in 2 servers as a private testing Etheruem environment.

In the 1st server, I have created accounts. For the 2nd server, I would like to build as a node to attach the 1st server. After I have setup and mount the 2nd server, 2 server can synchronize the number of block immediately.

However, the accounts in the 1st server cannot be found in the 2nd server. Is there a way to synchronize accounts between nodes?

If no, it implied that each account can be access from a single server only even there are multiple nodes/server for the single private Ethereum network.

Appreciate if there is any idea.

3
  • 2
    Geth will not synchronized accounts, you have to synchronized them on your own.
    – Ismael
    Commented Jul 30, 2017 at 20:48
  • Hi Ismael, thank you for your idea. I have tried to search Internet but I cannot find a clear answer about the synchronization of accounts between nodes. I am sorry to ask this question. Highly appreciate if you may have information on account synchronization between ethereum nodes. thank you very much.
    – Thomas Lau
    Commented Jul 31, 2017 at 2:21
  • I am facing the same issue. I have used --kyestore option to share keystore detail between two nodes. whenever I create an account from node1, it does not reflect into node2. but if i restart both node, the newly added account is getting reflected in both nodes. Please suggest
    – user28326
    Commented Jan 9, 2018 at 12:52

2 Answers 2

1

By default, geth stores accounts as a plain files in keystore directory inside its data directory specified by --datadir command line option. You may copy these files between geth instances and geth will catch them up immediately without restart.

If you didn't specify --datadir, then geth uses default location:

Mac: ~/Library/Ethereum
Linux: ~/.ethereum
Windows: %APPDATA%\Ethereum

Also, if you have network directory shared between servers taht run your geth instances, you may put account files there and pass path to them to geth via --keystore command-line option.

See geth documentation and wiki for details.

0

You don't need to synchronize accounts. Just share key store between both geth servers using --keystore command line option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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