Skip to content

Commit 4af3eac

Browse files
committed
docs: document I2P deployment and compose validation (#35)
1 parent 67d1eb2 commit 4af3eac

3 files changed

Lines changed: 38 additions & 0 deletions

File tree

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,8 @@ WORKER_COUNT=2 # Defaults to CPU count. Use 1 or 2 for local testing.
6767
# TOR_CONTROL_PORT=9051
6868
# TOR_PASSWORD=
6969
# HIDDEN_SERVICE_PORT=80
70+
71+
# --- I2P (Optional) ---
72+
# To enable I2P, use: ./scripts/start_with_i2p
73+
# I2P tunnel configuration lives in i2p/tunnels.conf and i2p/i2pd.conf.
74+
# No application-level env vars are needed; the i2pd sidecar handles everything.

CONFIGURATION.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,23 @@ The following environment variables can be set:
5858
| DEBUG | Debugging filter | |
5959
| ZEBEDEE_API_KEY | Zebedee Project API Key | |
6060

61+
## I2P
62+
63+
I2P support is provided as a sidecar container (i2pd) via `docker-compose.i2p.yml`, mirroring the Tor setup. No application-level environment variables are needed — the i2pd container creates an I2P server tunnel that forwards traffic to nostream's WebSocket port.
64+
65+
Configuration files live in the `i2p/` directory:
66+
67+
| File | Description |
68+
|------|-------------|
69+
| `i2p/tunnels.conf` | Defines the I2P server tunnel pointing at nostream (port 8008). |
70+
| `i2p/i2pd.conf` | Minimal i2pd daemon configuration. |
71+
72+
Tunnel keys are persisted at `.nostr/i2p/data/` so the `.b32.i2p` address survives container restarts.
73+
74+
- Start with I2P: `./scripts/start_with_i2p`
75+
- Print hostname hints: `./scripts/print_i2p_hostname`
76+
- Validate compose merges without starting containers (requires Docker): `npm run compose:validate` (same logic as the `compose-validate` CI job).
77+
6178
If you've set READ_REPLICAS to 4, you should configure RR0_ through RR3_.
6279

6380
# Settings

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,22 @@ Print the Tor hostname:
234234
./scripts/print_tor_hostname
235235
```
236236
237+
Start with I2P:
238+
```
239+
./scripts/start_with_i2p
240+
```
241+
242+
Print the I2P hostname:
243+
```
244+
./scripts/print_i2p_hostname
245+
```
246+
247+
Verify that Docker Compose files merge correctly (no stack started; requires Docker on PATH):
248+
```
249+
npm run compose:validate
250+
```
251+
This runs `docker compose … config -q` for the I2P-only, Tor-only, and Tor+I2P overlay combinations (same check as the `compose-validate` CI job).
252+
237253
### Importing events from JSON Lines
238254
239255
You can import NIP-01 events from a `.jsonl` file directly into the relay database.

0 commit comments

Comments
 (0)