Bitcoin Forum
May 30, 2024, 01:42:38 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Electrum CLI multiple wallets  (Read 198 times)
zqbitcoin (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 2


View Profile
September 06, 2018, 02:48:44 AM
 #1

Hey guys, I'm looking for a way to run two wallets on the same server at the same time.
I know the electrum GUI supports two wallets at once, how do you manage two wallets with the same CLI?

I've tried to create a new wallet on the same daemon using the CLI, but it just returns with this error:

Code:
Error: Remove the existing wallet first!

I've seen some solutions online say to remove the old wallet first to solve the error above, but doesn't that means that i'll only have access to one wallet at a time?
I was thinking to run two daemon instances, since it seems that each daemon can only support one wallet. But I'm not sure how to go about doing that.


Any help would be greatly appreciated.
zqbitcoin (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 2


View Profile
September 06, 2018, 03:35:51 AM
Merited by HCP (2)
 #2

So I've figured it out.

You can create a new wallet by adding a wallet address to the command like so:

Code:
electrum --testnet create -w ~/.electrum/testnet/wallets/myNewWallet

Then load the wallet onto the daemon (one electrum instance can run multiple wallets)

Code:
electrum --testnet load_wallet -w ~/.electrum/testnet/wallets/myNewWallet

Now you can run all the commands with either wallet like so:

Code:
electrum --testnet getbalance -w ~/.electrum/testnet/wallets/myNewWallet
electrum --testnet getbalance -w ~/.electrum/testnet/wallets/myOldWallet
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!