<p>As Pieter says in the comment the private key is in the wallet.dat file and you can use:</p>
<p><code>./src/bitcoin-cli -signet dumpprivkey insert_signet_address</code></p>
<p>to get the private key for that signet address.</p>
<p>There are separate wallet.dat files for each chain (mainnet, testnet, signet, regtest) that persist across the different PR branches and different versions of Bitcoin Core you run. These aren't ever replaced or written over. If you have signet Bitcoin on one PR branch, then you build and run another PR branch you will still have access to that same signet Bitcoin that you had on the previous branch in the usual way.</p>
<p>Pieter added below:</p>
<blockquote>
<p>Every chain has its own distinct default datadir, and everything in
that datadir (including blocks, chainstate, peers.dat, onion
addresses/keys, ban data, fee estimates, mempool dumps, ...) is shared
between all codebases that use that chain.</p>
</blockquote>

CC BY-SA 4.0
2021-01-25T19:02:11.920Z
Indeed, but this isn't unique to wallets either. Every chain has its own distinct default datadir, and everything in that datadir (including blocks, chainstate, peers.dat, onion addresses/keys, ban data, fee estimates, mempool dumps, ...) is shared between all codebases that use that chain.
Pieter Wuille
CC BY-SA 4.0
2021-01-25T11:17:28.640Z
2021-01-26T00:13:26.537Z
2021-01-26T00:13:26.537Z
Michael Folkson
<p>I previously (months ago) generated a <a href="https://bitcoin.stackexchange.com/questions/98553/how-do-i-get-set-up-on-signet">Signet</a> address on a Bitcoin Core PR branch and obtained some Signet from the <a href="https://signetfaucet.com/" rel="nofollow noreferrer">faucet</a> to that address. How can I locate that private key in my file system if I know the Bitcoin address? How can I locate that private key if I have forgotten the Bitcoin address?</p>

CC BY-SA 4.0
2021-01-24T20:02:56.303Z
The private key is in your wallet.dat file. You can use `dumpprivkey` to get the key. Is that what you are asking? There isn't anything signet specific about this.
Pieter Wuille
CC BY-SA 4.0
2021-01-25T11:09:13.413Z
I guess I was getting confused about what persisted across different PR builds and across different chains (mainnet, testnet, signet, regtest). So there is a separate append only wallet.dat file for each of mainnet, testnet, signet, regtest that persists (not replaced or written over) regardless of what PR branch or Core version you are running. You can move from building one PR branch to another PR branch and you will still have access to the same wallet.dat file you had on the previous PR branch.
Michael Folkson
<bitcoin-core-development><signet>
I generated a Signet address on a Bitcoin Core PR branch and obtained some Signet from the faucet. How can I locate that private key?
Michael Folkson
# I generated a Signet address on a Bitcoin Core PR branch and obtained some Signet from the faucet. How can I locate that private key?

(Asked by: username_0 on 2021-01-24)

I previously (months ago) generated a [Signet](https://bitcoin.stackexchange.com/questions/98553/how-do-i-get-set-up-on-signet) address on a Bitcoin Core PR branch and obtained some Signet from the [faucet](https://signetfaucet.com/) to that address. How can I locate that private key in my file system if I know the Bitcoin address? How can I locate that private key if I have forgotten the Bitcoin address?

**Tags:** bitcoin-core-development, signet

> **Comments:**
> **username_1**: The private key is in your wallet.dat file. You can use `dumpprivkey` to get the key. Is that what you are asking? There isn't anything signet specific about this.  
> **username_0**: I guess I was getting confused about what persisted across different PR builds and across different chains (mainnet, testnet, signet, regtest). So there is a separate append only wallet.dat file for each of mainnet, testnet, signet, regtest that persists (not replaced or written over) regardless of what PR branch or Core version you are running. You can move from building one PR branch to another PR branch and you will still have access to the same wallet.dat file you had on the previous PR branch.  

---

## 1 answers

### Answer by username_0 on 2021-01-25. Score: 0 | Accepted answer

As username_1 says in the comment the private key is in the wallet.dat file and you can use:

`./src/bitcoin-cli -signet dumpprivkey insert_signet_address`

to get the private key for that signet address.

There are separate wallet.dat files for each chain (mainnet, testnet, signet, regtest) that persist across the different PR branches and different versions of Bitcoin Core you run. These aren't ever replaced or written over. If you have signet Bitcoin on one PR branch, then you build and run another PR branch you will still have access to that same signet Bitcoin that you had on the previous branch in the usual way.

username_1 added below:

> Every chain has its own distinct default datadir, and everything in
> that datadir (including blocks, chainstate, peers.dat, onion
> addresses/keys, ban data, fee estimates, mempool dumps, ...) is shared
> between all codebases that use that chain.

> **Comments:**
> **username_1**: Indeed, but this isn't unique to wallets either. Every chain has its own distinct default datadir, and everything in that datadir (including blocks, chainstate, peers.dat, onion addresses/keys, ban data, fee estimates, mempool dumps, ...) is shared between all codebases that use that chain.  

---

