Bitcoin Forum
September 17, 2025, 04:05:38 AM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Best settings for airgap mode  (Read 132 times)
takuma sato (OP)
Hero Member
*****
Offline Offline

Activity: 774
Merit: 663


View Profile
September 06, 2025, 08:53:58 PM
 #1

If you want to launch bitcoin-qt with zero network activity, what are the best settings to add? I have added all I could find (-connect=0 -listen=0 -dnsseed=0 -listenonion=0 -maxconnections=0 -upnp=0 -proxy=0)

Yet when I launch bitcoin-qt and run getnetworkinfo on the console it says

Quote
"networkactive": true,

Also in the different types of connections are enabled for ipv4, ipv6 are set as true in reachable. So why are those set as true if I added all these command lines? The commands that you set to launch bitcoin-qt supposedly supercede any settings on bitcoin.conf but I have that file empty anyway so I don't get it. The network activity icon is not greyed out when I launch it and it gives the option to "Disable network activity". How do I launch it with network activity disabled? I do not want the software to constantly try to connect if I don't want to run internet there anyway.

BitMaxz
Legendary
*
Offline Offline

Activity: 3738
Merit: 3414


My PC.broke :(


View Profile WWW
September 06, 2025, 09:29:24 PM
 #2

For non-syncing from your config above, connect, listen, and maxconnection should be enough to make your core not sync online.

But since this is an air gap, why not completely disable the wifi and disconnect it forever from the internet? You don't need to configure it unless you still want the device to be connected online.
An air gap device should be completely disconnected from any network. If you are planning to connect it in the future, then. That's not an air gap device.

.
 betpanda.io 
 
ANONYMOUS & INSTANT
.......ONLINE CASINO.......
▄███████████████████████▄
█████████████████████████
█████████████████████████
████████▀▀▀▀▀▀███████████
████▀▀▀█░▀▀░░░░░░▄███████
████░▄▄█▄▄▀█▄░░░█▄░▄█████
████▀██▀░▄█▀░░░█▀░░██████
██████░░▄▀░░░░▐░░░▐█▄████
██████▄▄█░▀▀░░░█▄▄▄██████
█████████████████████████
█████████████████████████
█████████████████████████
▀███████████████████████▀
▄███████████████████████▄
█████████████████████████
██████████▀░░░▀██████████
█████████░░░░░░░█████████
███████░░░░░░░░░███████
████████░░░░░░░░░████████
█████████▄░░░░░▄█████████
███████▀▀▀█▄▄▄█▀▀▀███████
██████░░░░▄░▄░▄░░░░██████
██████░░░░█▀█▀█░░░░██████
██████░░░░░░░░░░░░░██████
█████████████████████████
▀███████████████████████▀
▄███████████████████████▄
█████████████████████████
██████████▀▀▀▀▀▀█████████
███████▀▀░░░░░░░░░███████
██████░░░░░░░░░░░░▀█████
██████░░░░░░░░░░░░░░▀████
██████▄░░░░░░▄▄░░░░░░████
████▀▀▀▀▀░░░█░░█░░░░░████
████░▀░▀░░░░░▀▀░░░░░█████
████░▀░▀▄░░░░░░▄▄▄▄██████
█████░▀░█████████████████
█████████████████████████
▀███████████████████████▀
.
SLOT GAMES
....SPORTS....
LIVE CASINO
▄░░▄█▄░░▄
▀█▀░▄▀▄░▀█▀
▄▄▄▄▄▄▄▄▄▄▄   
█████████████
█░░░░░░░░░░░█
█████████████

▄▀▄██▀▄▄▄▄▄███▄▀▄
▄▀▄█████▄██▄▀▄
▄▀▄▐▐▌▐▐▌▄▀▄
▄▀▄█▀██▀█▄▀▄
▄▀▄█████▀▄████▄▀▄
▀▄▀▄▀█████▀▄▀▄▀
▀▀▀▄█▀█▄▀▄▀▀

Regional Sponsor of the
Argentina National Team
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3780
Merit: 7364


Just writing some code


View Profile WWW
September 06, 2025, 10:15:48 PM
 #3

-networkactive=0, but -connect=0 should be sufficient to not have any p2p network activity.

takuma sato (OP)
Hero Member
*****
Offline Offline

Activity: 774
Merit: 663


View Profile
September 07, 2025, 12:53:36 AM
 #4

For non-syncing from your config above, connect, listen, and maxconnection should be enough to make your core not sync online.

But since this is an air gap, why not completely disable the wifi and disconnect it forever from the internet? You don't need to configure it unless you still want the device to be connected online.
An air gap device should be completely disconnected from any network. If you are planning to connect it in the future, then. That's not an air gap device.

Yes, everything is turned off, no wifi card or ethernet, I just want to disable the network activity so the node stops trying to download blocks.

-networkactive=0, but -connect=0 should be sufficient to not have any p2p network activity.

Yeah, this did it, now the icon shows it's not enabled and getnetworkinfo says false on "networkactive". What I was hopping is that it could stop trying to look for peers, but on the lower left it still says "Connecting to peers...". Does this stay in this permanent state of trying to ping for peers? I feel like there may be resources being wasted with the software trying to do something all the time, looking for an internet connection. Maybe there should be an -airgap mode or something, designed for people that use an airgap setup with 2 computers, like a way to automatically tell the software to stop anything under the radar that may be trying to still do something but it can't due lack of internet connection, such as for instance this message of "Connecting to peers..." that I assume it means it's trying to connect to peers. Maybe this airgap mode could actually refuse to start the software if it detects an internet connection, in case you do something stupid like accidentally connecting an ethernet cable into the wrong laptop, something dumb like that you may accidentally do, you never know, so that's just another layer of protection at the software level.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3780
Merit: 7364


Just writing some code


View Profile WWW
September 07, 2025, 01:49:34 AM
Merited by ABCbits (1)
 #5

but on the lower left it still says "Connecting to peers...". Does this stay in this permanent state of trying to ping for peers?
No, that's just the default text of the initial state. Since it never leaves that initial state, it does not change, but it's not actually attempting any connections.

Maybe there should be an -airgap mode or something, designed for people that use an airgap setup with 2 computers, like a way to automatically tell the software to stop anything under the radar that may be trying to still do something but it can't due lack of internet connection,
That's literally what -networkactive does.

apogio
Legendary
*
Offline Offline

Activity: 910
Merit: 1961


Duelbits.com - Rewarding, beyond limits.


View Profile WWW
September 09, 2025, 06:54:15 AM
 #6

From your conversation, since I am also interested, can I assume that -networkactive=0 can be the only parameter that I need to set in order to get an airgapped Bitcoin Core instance? There are many parameteres suggested, or discussed, but I don't want to add redundant parameters in my config (if I am not 100% sure what they do).

takuma sato (OP)
Hero Member
*****
Offline Offline

Activity: 774
Merit: 663


View Profile
September 09, 2025, 07:58:08 PM
 #7

From your conversation, since I am also interested, can I assume that -networkactive=0 can be the only parameter that I need to set in order to get an airgapped Bitcoin Core instance? There are many parameteres suggested, or discussed, but I don't want to add redundant parameters in my config (if I am not 100% sure what they do).

Im guessing that one does it. I added the usual ones (connect=0, listen=0, maxconnections=0... etc) just for good measure but probably redundant.
nc50lc
Legendary
*
Offline Offline

Activity: 2898
Merit: 7613


Self-proclaimed Genius


View Profile
September 10, 2025, 06:12:55 AM
Merited by hugeblack (1), apogio (1)
 #8

-snip- can I assume that -networkactive=0 can be the only parameter that I need to set in order to get an airgapped Bitcoin Core instance? There are many parameteres suggested, or discussed, but I don't want to add redundant parameters in my config (if I am not 100% sure what they do).
Not only unnecessary, some of those configs also have interactions with one another.
Like if either -connect or -maxconnections are set to "0" like in his config, -listen and -dnsseed will also be set to "0".
Test setting only -connect=0, then open your logs and look for "parameter interaction" to check which of those options are unnecessary.

Another is: upnp=0 is not available in Core v29.0+ because it's dropped in that version; in Bitcoin Knots/Core, it's also unnecessary since it's already set to "0" by default.

Im guessing that one does it. I added the usual ones (connect=0, listen=0, maxconnections=0... etc) just for good measure but probably redundant.
I thought you're "future-proofing" your bitcoin.conf file with all those disabled network-related config in case something change in the future.

apogio
Legendary
*
Offline Offline

Activity: 910
Merit: 1961


Duelbits.com - Rewarding, beyond limits.


View Profile WWW
September 10, 2025, 06:36:40 AM
 #9

So reading @nc50lc's post I realize that some attributes have significant correlation, meaning that changing the one will also change the other.

And I can't help but wonder, perhaps being too naive, but can't I simply run Core on an airgapped computer and have the default config, without even spending a second changing it?

nc50lc
Legendary
*
Offline Offline

Activity: 2898
Merit: 7613


Self-proclaimed Genius


View Profile
September 10, 2025, 10:20:37 AM
 #10

And I can't help but wonder, perhaps being too naive, but can't I simply run Core on an airgapped computer and have the default config, without even spending a second changing it?
Yes, the default should be enough as long as the machine is actually setup Air-Gap because it wont be able to establish a connection to anything.

I think takuma sato's main goal was in this reply where he's looking for a way to remove the "connecting to peers" message while Core is offline:
What I was hopping is that it could stop trying to look for peers, but on the lower left it still says "Connecting to peers...". Does this stay in this permanent state of trying to ping for peers?

apogio
Legendary
*
Offline Offline

Activity: 910
Merit: 1961


Duelbits.com - Rewarding, beyond limits.


View Profile WWW
September 10, 2025, 10:33:52 AM
 #11

Yes, the default should be enough as long as the machine is actually setup Air-Gap because it wont be able to establish a connection to anything.

I think takuma sato's main goal was in this reply where he's looking for a way to remove the "connecting to peers" message while Core is offline:
What I was hopping is that it could stop trying to look for peers, but on the lower left it still says "Connecting to peers...". Does this stay in this permanent state of trying to ping for peers?

Got it, I actually have a fully offline computer that I use to generate wallets (not that I generate many, but when I do I need it to be offline). This computer has never been connected to the internet and it has no WiFi adapter, nor Bluetooth adapter. I guess, without any software modification in Bitcoin Core, my goal to be completely offline is accomplished.

As far as the "info" message for peer connections is concerned, yeah it can be annoying, but not anything that bothers me too much so that I need it gone desperately. In fact, many software wallets have this kind of info messages; Sparrow has a "connecting to server" message and I think Electrum has one as well. It's normal because they are primarily meant to be used online and connected with nodes.

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!