<p>Jon Atack answered this on <a href="https://twitter.com/jonatack/status/1366764964896075776?s=20" rel="noreferrer">Twitter</a>.</p>
<p><strong>Configuration and setup</strong></p>
<p>First install and start I2P (version 2.35 or above).</p>
<pre><code>$ apt install i2pd
$ systemctl enable i2pd.service
$ systemctl start i2pd.service
</code></pre>
<p>In your <code>bitcoin.conf</code> file add (I will assume you run Bitcoin Core v22+ and want to use both Tor and I2P but remove <code>debug=tor</code> and <code>onlynet=onion</code> if not interested in Tor):</p>
<pre><code>debug=tor
debug=i2p
onlynet=onion
onlynet=i2p
i2psam=127.0.0.1:7656
</code></pre>
<p>There are 2 config options for I2P. Only the second one is required to be set for I2P to work.</p>
<pre><code>  -i2pacceptincoming
       If set and -i2psam is also set then incoming I2P connections are
       accepted via the SAM proxy. If this is not set but -i2psam is set
       then only outgoing connections will be made to the I2P network.
       Ignored if -i2psam is not set. Listening for incoming I2P
       connections is done through the SAM proxy, not by binding to a
       local address and port (default: 1)

  -i2psam=&lt;ip:port&gt;
       I2P SAM proxy to reach I2P peers and accept I2P connections (default:
       none)
</code></pre>
<p><strong>Connecting to I2P peers</strong></p>
<p>There are some hardcoded I2P seeds at the bottom of this <a href="https://github.com/bitcoin/bitcoin/blob/master/contrib/seeds/nodes_main.txt" rel="noreferrer">file</a> to get started with connections. Scroll down to <code># manually added 2021-05 for minimal i2p bootstrap support</code></p>
<p>You can connect to these seeds with <code>-addnode</code> or <code>-seednode</code> in your configuration file (<code>bitcoin.conf</code>).</p>
<p>(If your <code>peers.dat</code> is empty and you start up with <code>-dnsseed=0</code> then your node will only know the hardcoded seeds.)</p>
<p>Once you have connections you can view your I2P peers:</p>
<p><code>watch -t ./src/bitcoin-cli -netinfo 4</code></p>
<p>(For more information on <code>-netinfo</code> see the help documentation using <code>bitcoin-cli -netinfo help</code> or this StackExchange <a href="https://bitcoin.stackexchange.com/questions/99064/how-do-i-view-information-on-the-peers-my-bitcoin-core-full-node-is-connected-to/">question</a>)</p>
<p><a href="https://i.sstatic.net/I3UfW.png" rel="noreferrer"><img src="https://i.sstatic.net/I3UfW.png" alt="enter image description here" /></a></p>
<p>This was enabled by Vasil Dimov's Bitcoin Core <a href="https://github.com/bitcoin/bitcoin/pull/20685" rel="noreferrer">PR 20685</a> merged in March 2021 and <a href="https://github.com/bitcoin/bips/blob/master/bip-0155.mediawiki" rel="noreferrer">BIP 155</a> for addrv2 messages</p>
<p>Historical discussion of supporting I2P back in 2012 is <a href="https://github.com/bitcoin/bitcoin/issues/2091" rel="noreferrer">here</a>. (Thanks to Adam Jonas for finding this)</p>

CC BY-SA 4.0
2021-05-03T10:57:59.127Z
when I try to start the service, I get "System has not been booted with systemd as init system (PID 1). Can't operate."
Rebroad
CC BY-SA 4.0
2021-05-03T11:09:23.540Z
what is the "4" for on the watch command?
Rebroad
CC BY-SA 4.0
2021-05-03T11:45:39.760Z
@Rebroad: See Jon Atack's pull https://github.com/bitcoin/bitcoin/pull/20829 "4 - Like 1 but with both address and version columns". Basically 4 provides the most information that is possible for netinfo whilst 0 provides the least.
Michael Folkson
CC BY-SA 4.0
2021-05-03T11:58:07.597Z
@Rebroad: Re your error message. Are you running bitcoind before you run the watch command? If you are I don't know why you are getting that error message. Feel free to ask about it on Freenode #bitcoin-core-pr-reviews
Michael Folkson
CC BY-SA 4.0
2021-06-09T07:31:58.230Z
@nisc: It hasn't been released yet as part of v22.0 of Bitcoin Core and thus far these are the only instructions to do it so it is still early :) I think the nodes should get picked up by Bitnodes but I'll check
Michael Folkson
CC BY-SA 4.0
2021-09-21T03:22:42.360Z
@MichaelFolkson now that I2P is live in an official release, do you know if there's a place to track the growth of the I2P network? Does BitNodes support it?
bananas_rock
CC BY-SA 4.0
2022-01-16T11:14:10.440Z
found that adding `onlynet=i2p` stopped the node from making successful i2p connections.
My additions to bitcoin.conf:  
`debug=tor`  
`debug=i2p`  
`i2psam=127.0.0.1:7656`  
`i2pacceptincoming=1`  

The full manual process of installing i2p fro bitcoin on a RaspiBlitz:
https://github.com/rootzoll/raspiblitz/issues/2413#issuecomment-1013855483
openoms
CC BY-SA 4.0
2021-03-08T19:38:35.767Z
2021-06-05T17:56:50.683Z
2021-06-05T17:56:50.683Z
Michael Folkson
<p>How can I use Bitcoin Core with the I2P anonymous network protocol?</p>

<bitcoin-core><tor><p2p><i2p>
How can I use Bitcoin Core with the anonymous network protocol I2P?
Michael Folkson
# How can I use Bitcoin Core with the anonymous network protocol I2P?

(Asked by: username_0 on 2021-03-08)

How can I use Bitcoin Core with the I2P anonymous network protocol?

**Tags:** bitcoin-core, tor, p2p, i2p


---

## 1 answers

### Answer by username_0 on 2021-03-08. Score: 13 | Accepted answer

Jon Atack answered this on Twitter.
Configuration and setup
First install and start I2P (version 2.35 or above).
$ apt install i2pd
$ systemctl enable i2pd.service
$ systemctl start i2pd.service

In your bitcoin.conf file add (I will assume you run Bitcoin Core v22+ and want to use both Tor and I2P but remove debug=tor and onlynet=onion if not interested in Tor):
debug=tor
debug=i2p
onlynet=onion
onlynet=i2p
i2psam=127.0.0.1:7656

There are 2 config options for I2P. Only the second one is required to be set for I2P to work.
  -i2pacceptincoming
       If set and -i2psam is also set then incoming I2P connections are
       accepted via the SAM proxy. If this is not set but -i2psam is set
       then only outgoing connections will be made to the I2P network.
       Ignored if -i2psam is not set. Listening for incoming I2P
       connections is done through the SAM proxy, not by binding to a
       local address and port (default: 1)

  -i2psam=
       I2P SAM proxy to reach I2P peers and accept I2P connections (default:
       none)

Connecting to I2P peers
There are some hardcoded I2P seeds at the bottom of this file to get started with connections. Scroll down to # manually added 2021-05 for minimal i2p bootstrap support
You can connect to these seeds with -addnode or -seednode in your configuration file (bitcoin.conf).
(If your peers.dat is empty and you start up with -dnsseed=0 then your node will only know the hardcoded seeds.)
Once you have connections you can view your I2P peers:
watch -t ./src/bitcoin-cli -netinfo 4
(For more information on -netinfo see the help documentation using bitcoin-cli -netinfo help or this StackExchange question)

This was enabled by Vasil Dimov's Bitcoin Core PR 20685 merged in March 2021 and BIP 155 for addrv2 messages
Historical discussion of supporting I2P back in 2012 is here. (Thanks to Adam Jonas for finding this)

> **Comments:**
> **username_1**: when I try to start the service, I get "System has not been booted with systemd as init system (PID 1). Can't operate."  
> **username_1**: what is the "4" for on the watch command?  
> **username_0**: @username_1: See Jon Atack's pull https://github.com/bitcoin/bitcoin/pull/20829 "4 - Like 1 but with both address and version columns". Basically 4 provides the most information that is possible for netinfo whilst 0 provides the least.  
> **username_0**: @username_1: Re your error message. Are you running bitcoind before you run the watch command? If you are I don't know why you are getting that error message. Feel free to ask about it on Freenode #bitcoin-core-pr-reviews  
> **username_0**: @nisc: It hasn't been released yet as part of v22.0 of Bitcoin Core and thus far these are the only instructions to do it so it is still early :) I think the nodes should get picked up by Bitnodes but I'll check  
> **username_2**: @MichaelFolkson now that I2P is live in an official release, do you know if there's a place to track the growth of the I2P network? Does BitNodes support it?  
> **username_3**: found that adding `onlynet=i2p` stopped the node from making successful i2p connections. My additions to bitcoin.conf:   `debug=tor`   `debug=i2p`   `i2psam=127.0.0.1:7656`   `i2pacceptincoming=1`    The full manual process of installing i2p fro bitcoin on a RaspiBlitz: https://github.com/rootzoll/raspiblitz/issues/2413#issuecomment-1013855483  

---

