Skip to main content

Overview

I2P (Invisible Internet Project) is an anonymous network layer that allows for censorship-resistant, peer-to-peer communication. Bitcoin Core supports I2P through the SAM (Simple Anonymous Messaging) protocol, enabling private connections to other I2P peers.
I2P support was added to Bitcoin Core in version 22.0. The network may have fewer peers than Tor or clearnet.

I2P vs Tor vs CJDNS

Quick Start

1

Install I2P Router

Choose one of the supported I2P implementations:Option 1: i2pd (Recommended for Bitcoin Core)
Option 2: Official Java I2P RouterDownload from geti2p.net
2

Enable SAM Bridge

For i2pd (enabled by default):Verify in /etc/i2pd/i2pd.conf:
For Java I2P Router:
  1. Navigate to http://127.0.0.1:7657/configclients
  2. Enable “SAM application bridge”
  3. Save and restart I2P
3

Start I2P Router

4

Run Bitcoin Core

Bitcoin Core will automatically create a persistent I2P address and start accepting I2P connections.

Configuration Options

Basic Configuration

Example Configurations

I2P Only:
bitcoin.conf
I2P + Tor:
bitcoin.conf
Multi-Network:
bitcoin.conf

I2P Addresses

Persistent vs Transient

Bitcoin Core handles I2P addresses differently based on configuration:

Persistent Addresses (Default)

When -i2pacceptincoming=1 (default):
  • Private key saved to i2p_private_key in data directory
  • Same address used for all connections (outbound and inbound)
  • Address ends in .b32.i2p (52 characters)
  • Designed for long-lived identity
Example: 3xjxlz2x2yzzvoa3sccmjx5or3kv6q4zjfm7cj4dlxxr4xvgigmha.b32.i2p

Transient Addresses

When -i2pacceptincoming=0:
  • Random address generated for each outbound connection
  • No inbound connections accepted
  • Harder to track and fingerprint
  • No persistent identity
Disabling I2P listening (-i2pacceptincoming=0) should only be done if you specifically need transient addresses. It adds delay to connection setup and reduces your contribution to the I2P network.

How I2P Addressing Works

Unlike Tor, in I2P:
  • The recipient can see the sender’s I2P address
  • Each connection creates bidirectional tunnels
  • Tunnels are reused for efficiency
I2P addresses are designed to be long-lived. Frequent address changes reduce performance due to tunnel building overhead.

SAM Protocol Details

Bitcoin Core uses SAM v3.1 protocol:

Port Behavior

SAM v3.1 does not support ports:
  • Bitcoin Core sets listening port to 0
  • Advertises I2P address with port 0
  • Won’t connect to I2P addresses with non-zero ports
  • Compatible with future SAM versions
SAM v3.2+ supports ports, but Bitcoin Core currently uses v3.1 for maximum compatibility. All I2P connections use port 0 from the peer’s perspective.

Compatibility

Any I2P router supporting SAM v3.1 works with Bitcoin Core:
  • i2pd - Lightweight C++ implementation ✓
  • Java I2P Router - Official implementation ✓
  • Other SAM v3.1 compatible routers ✓

Bandwidth Considerations

Default Behavior

By default, your Bitcoin Core node:
  • Shares bandwidth with the I2P network
  • Participates in transit tunnels
  • Provides cover traffic for anonymity
  • Helps the I2P network function
It’s strongly discouraged to limit I2P bandwidth. Bitcoin nodes should contribute as much to I2P as they consume to maintain network health.
If absolutely necessary, you can limit I2P traffic: For i2pd - Edit i2pd.conf:
For Java I2P Router: Configure at http://127.0.0.1:7657/config under “Bandwidth” tab.
Before limiting bandwidth, read Participating Traffic Considerations in the I2P documentation.

Monitoring and Verification

Check Your I2P Address

View I2P Peers

I2P Debug Logging

Monitor logs:

Initial Block Download

Initial blockchain sync over I2P-only can be very slow due to limited bandwidth and peer availability.
1

Sync with Multiple Networks

Use Tor and I2P together during initial sync:
2

Monitor Progress

3

Switch to I2P-Only (Optional)

After sync completes, optionally switch to I2P-only:
bitcoin.conf
For fastest sync, consider syncing over clearnet first, then switching to privacy networks after validation completes.

Advanced Configuration

Multi-Network Privacy Setup

Combine I2P with other privacy networks for redundancy:
bitcoin.conf

I2P-Only Node

bitcoin.conf

Outbound-Only I2P

Use transient addresses, no inbound:
bitcoin.conf

Troubleshooting

SAM Bridge Not Available

Solution:

No I2P Peers

I2P peer discovery can be slow initially. It may take 15-30 minutes to find I2P peers.

Connection Timeouts

I2P tunnel building takes time:
  • First connection: 30-60 seconds
  • Subsequent connections: 10-30 seconds
  • Tunnel lifetime: 10 minutes (default)
Be patient - this is normal I2P behavior.

Privacy Recommendations

Best Practices:
  1. Use persistent addresses: Don’t disable -i2pacceptincoming unless necessary
  2. Share bandwidth: Leave default I2P bandwidth sharing enabled
  3. Combine networks: Use I2P + Tor for redundancy
  4. Monitor connections: Regularly check peer status
  5. Be patient: I2P is slower but more decentralized
Operating on multiple networks (e.g., clearnet and I2P) may allow correlation of your identities. Use single-network mode if unlinkability is critical.

Network Comparison

When to Use I2P

Advantages:
  • Fully decentralized (no directory authorities)
  • Both sender and receiver have addresses
  • Good for long-lived connections
  • Complementary to Tor
Disadvantages:
  • Slower than Tor and clearnet
  • Fewer Bitcoin peers
  • Longer connection setup time
  • No port support (SAM v3.1)
  1. Privacy-focused node: Combine with Tor for maximum coverage
  2. Censorship resistance: Run on multiple privacy networks
  3. Network redundancy: Fallback if Tor is blocked
  4. Bridge node: Help connect I2P and clearnet networks

Bundling I2P in Applications

If you’re developing an application that bundles Bitcoin Core with I2P:

See Also