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
| Feature | I2P | Tor | CJDNS |
|---|---|---|---|
| Source visibility | Sender visible to receiver | Sender hidden | Sender visible |
| Speed | Slow | Medium | Fast |
| Centralization | Decentralized | Somewhat centralized | Decentralized |
| Ports | No ports (SAM v3.1) | Supports ports | Supports ports |
| Use case | Long-lived connections | General anonymity | Encrypted routing |
Quick Start
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
Enable SAM Bridge
For i2pd (enabled by default):Verify in For Java I2P Router:
/etc/i2pd/i2pd.conf:- Navigate to
http://127.0.0.1:7657/configclients - Enable “SAM application bridge”
- Save and restart I2P
Configuration Options
Basic Configuration
Example Configurations
I2P Only:bitcoin.conf
bitcoin.conf
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_keyin data directory - Same address used for all connections (outbound and inbound)
- Address ends in
.b32.i2p(52 characters) - Designed for long-lived identity
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
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
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
Limiting Bandwidth (Not Recommended)
If absolutely necessary, you can limit I2P traffic: For i2pd - Editi2pd.conf:
http://127.0.0.1:7657/config under “Bandwidth” tab.
Monitoring and Verification
Check Your I2P Address
View I2P Peers
I2P Debug Logging
Initial Block Download
Recommended Approach
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
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)
Privacy Recommendations
Best Practices:
- Use persistent addresses: Don’t disable
-i2pacceptincomingunless necessary - Share bandwidth: Leave default I2P bandwidth sharing enabled
- Combine networks: Use I2P + Tor for redundancy
- Monitor connections: Regularly check peer status
- Be patient: I2P is slower but more decentralized
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
- Slower than Tor and clearnet
- Fewer Bitcoin peers
- Longer connection setup time
- No port support (SAM v3.1)
Recommended Use Cases
- Privacy-focused node: Combine with Tor for maximum coverage
- Censorship resistance: Run on multiple privacy networks
- Network redundancy: Fallback if Tor is blocked
- Bridge node: Help connect I2P and clearnet networks
Bundling I2P in Applications
If you’re developing an application that bundles Bitcoin Core with I2P:- Read General Guidance for Developers
- Follow Embedding I2P guidelines
- Ensure SAM bridge is properly configured
- Test with both i2pd and Java router
See Also
- P2P Network - General network configuration
- Tor Support - Alternative privacy network
- CJDNS Support - Encrypted IPv6 network
- I2P Glossary - I2P terminology
- SAM v3 API - Protocol documentation