Restoring a backed-up wallet
Setting up a new yagna instance to use a saved keystore file.
If, for whatever reason, your Golem wallet is destroyed or corrupted e.g. you moved on to a new machine and forgot to take move Golem's installation with it, you'll be faced with the necessity to recover your wallet from your previously backed-up keystore file.
To restore your wallet, first start with a fresh yagna install:
curl -sSf https://join.golem.network/as-requestor | bash -
Once yagna is installed, run it with:
yagna service run
Now, as usual, leave the daemon running in the background and proceed with the rest of the process in another terminal window.
Here you'll need the key.json file you had previously backed up. Do whatever you need to restore it - e.g. decrypt it if you previously encrypted it. For the process to work, it must be the same plain-text json file that yagna originally exported.
Be sure that your
key.jsonfile is in your current working directory and run:
yagna id create --from-keystore ./key.json
This should create a new identity in yagna based on your backed-up wallet. If the private key that you just imported is password-protected, the message that you receive on a successful import will include
isLocked: trueand means that you'll need to unlock the key later on before it can be used by yagna.
On the other hand, if the message reads:
isLocked: false, it means that you're using an uprotected keystore file.
1. Using the Ethereum address of your backed-up wallet, run:
yagna id update --set-default 0x-the-address
2. STOP YOUR YAGNA DAEMON
(just press Ctrl-C in the console that's running
yagna service runand wait for the daemon to exit)
yagna's accounts configuration file
mac OS X
rm $HOME/Library/Application\ Support/GolemFactory.yagna/accounts.json
4. Start your yagna daemon again (as usual, do it in a separate command line terminal and allow it to run in the background)
yagna service run
5. Ensure yagna is using your newly-restored wallet
yagna id show
nodeIdproperty should display the Ethereum address of your backed-up wallet.
If you have used
yagnabefore, you have probably already created an application key (the key that the requestor agent uses to connect to the
In that case, after you import your Ethereum mainnet key, you need to re-create Yagna's application key, as the previous one is now bound to your old (rinkeby) key:
yagna app-key create requestor-mainnet
The name (
requestor-mainnetabove) is not important as long as it doesn't collide with the existing one (assuming it was just
After you have done that run:
yagna app-key list
and verify that in the table like the one below, your new app-key is bound to your mainnet Ethereum address
│ name │ key │ id │ role │ created │
│ requestor-mainnet │ your-app-key │ 0x-your-mainnet-address │ manager │ 2021-07-06T11:41:52.252257 │
Lastly, remember to set the new app-key in your environment (or in an other way you supply the app key to your requestor agent app).