<p>You do not need to install Electrum. Your setup seems to (mostly?) work fine for you. As far as I can tell, the config option <code>keypool</code> can be used to increase the number of addresses your wallet pre-generates.</p>
<p>Alternatively, you could call <a href="https://bitcoincore.org/en/doc/25.0.0/rpc/wallet/keypoolrefill/" rel="nofollow noreferrer"><code>keypoolrefill</code></a> with a new keypool size, e.g. 10,000.</p>
<blockquote>
<p>keypoolrefill ( newsize )</p>
<p>Fills the keypool. Requires wallet passphrase to be set with
walletpassphrase call if wallet is encrypted.</p>
<p>Arguments:</p>
<ol>
<li>newsize    (numeric, optional, default=1000, or as set by -keypool) The new keypool size</li>
</ol>
<p>Result: null    (json null)</p>
<p>Examples:</p>
<blockquote>
<p>bitcoin-cli keypoolrefill
curl --user myusername --data-binary '{&quot;jsonrpc&quot;: &quot;1.0&quot;, &quot;id&quot;: &quot;curltest&quot;, &quot;method&quot;: &quot;keypoolrefill&quot;, &quot;params&quot;: []}' -H
'content-type: text/plain;' <a href="http://127.0.0.1:8332/" rel="nofollow noreferrer">http://127.0.0.1:8332/</a></p>
</blockquote>
</blockquote>
<p>Since you have not described the issue you are seeing in detail, and it is not clear to me how you determined that you may have exceeded the gap limit. Perhaps your wallet has not been unlocked in a long time? It might just need to be unlocked to regenerate the keypool. If you provide more details in the question, someone might be able to provide more informed advice.</p>

CC BY-SA 4.0
2024-10-22T12:42:40.347Z
2024-10-22T13:02:32.383Z
2024-10-22T13:02:32.383Z
Murch
<p>I am running Bitcoin Core for my shop, in the last two years i have genereated a lot of addresses (over 1000) and i think i have exceeeded the gap limit. I am using CLI for commands, can someone guide me on how should i increase the gap limit ? Or what should I do ?</p>
<p>I found some info that were telling me to instal Electrum and set gap limit to 5000 should this be my case ? Can someone please guide me ? Thank you</p>

CC BY-SA 4.0
2024-10-18T14:49:24.090Z
June 2022 , if it is more recent the wallet doe not have a private key pool or gap limit ? my wallet if it is from june 2022 does not have a gap limit ? I think i lost some bitcoins that is why i am investigating.
FreshStartBtcCore
CC BY-SA 4.0
2024-10-21T14:55:59.477Z
Sorry, I was thinking of the pre-HD wallets where you had a keypool. Bitcoin Core uses a gap limit of 1000 addresses. Could you tell us more about your setup? I assume you run a watch-only wallet in conjunction with your website and you run the corresponding wallet with your backend. Did you generate over 1000 addresses without ever receiving a single payment? Otherwise, when you synchronize your backend wallet, whenever it detects a payment it should refill the future addresses to 1000 beyond the paid address.
Murch
CC BY-SA 4.0
2024-10-22T02:23:34.300Z
I am running Bitcoin Core on external server and is always connected with the backend of my website.  No i did not generated 1000 addresses without ever receiving a single payment. it's like 40-60 ratio with 40 being unpaid. 

 Operating system:Ubuntu 22.04.4 LTS
 bitcoin version: 25.0

If i can provide more details please tell me, thank you for your time and for your help.
FreshStartBtcCore
CC BY-SA 4.0
2024-10-22T12:19:30.200Z
What makes you think that you have exceeded the gap limit? What issues are you seeing?
Murch
CC BY-SA 4.0
2024-10-22T23:33:39.683Z
I can't find some funds. I supposed that is because some bitcoins are not taken into consideration by my wallet when i try to display balance. Sorry because my description it is not cleared enough.
FreshStartBtcCore
<bitcoin-core><bitcoin-cli><address-generation><gap-limit>
I am running a bitcoin node (using Bitcoin Core) and i have exceeded gap limit
FreshStartBtcCore
# I am running a bitcoin node (using Bitcoin Core) and i have exceeded gap limit

(Asked by: username_0 on 2024-10-18)

I am running Bitcoin Core for my shop, in the last two years i have genereated a lot of addresses (over 1000) and i think i have exceeeded the gap limit. I am using CLI for commands, can someone guide me on how should i increase the gap limit ? Or what should I do ?

I found some info that were telling me to instal Electrum and set gap limit to 5000 should this be my case ? Can someone please guide me ? Thank you

**Tags:** bitcoin-core, bitcoin-cli, address-generation, gap-limit

> **Comments:**
> **username_0**: June 2022 , if it is more recent the wallet doe not have a private key pool or gap limit ? my wallet if it is from june 2022 does not have a gap limit ? I think i lost some bitcoins that is why i am investigating.  
> **username_1**: Sorry, I was thinking of the pre-HD wallets where you had a keypool. Bitcoin Core uses a gap limit of 1000 addresses. Could you tell us more about your setup? I assume you run a watch-only wallet in conjunction with your website and you run the corresponding wallet with your backend. Did you generate over 1000 addresses without ever receiving a single payment? Otherwise, when you synchronize your backend wallet, whenever it detects a payment it should refill the future addresses to 1000 beyond the paid address.  
> **username_0**: I am running Bitcoin Core on external server and is always connected with the backend of my website.  No i did not generated 1000 addresses without ever receiving a single payment. it's like 40-60 ratio with 40 being unpaid.    Operating system:Ubuntu 22.04.4 LTS  bitcoin version: 25.0  If i can provide more details please tell me, thank you for your time and for your help.  
> **username_1**: What makes you think that you have exceeded the gap limit? What issues are you seeing?  
> **username_0**: I can't find some funds. I supposed that is because some bitcoins are not taken into consideration by my wallet when i try to display balance. Sorry because my description it is not cleared enough.  

---

## 1 answers

### Answer by username_1 on 2024-10-22. Score: 2

You do not need to install Electrum. Your setup seems to (mostly?) work fine for you. As far as I can tell, the config option `keypool` can be used to increase the number of addresses your wallet pre-generates.

Alternatively, you could call [`keypoolrefill`](https://bitcoincore.org/en/doc/25.0.0/rpc/wallet/keypoolrefill/) with a new keypool size, e.g. 10,000.

> keypoolrefill ( newsize )
>
> Fills the keypool. Requires wallet passphrase to be set with
> walletpassphrase call if wallet is encrypted.
>
> Arguments:
>
> 1. newsize (numeric, optional, default=1000, or as set by -keypool) The new keypool size
>
> Result: null (json null)
>
> Examples:
>
> > bitcoin-cli keypoolrefill
> > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "keypoolrefill", "params": []}' -H
> > 'content-type: text/plain;' <http://127.0.0.1:8332/>

Since you have not described the issue you are seeing in detail, and it is not clear to me how you determined that you may have exceeded the gap limit. Perhaps your wallet has not been unlocked in a long time? It might just need to be unlocked to regenerate the keypool. If you provide more details in the question, someone might be able to provide more informed advice.


---

