You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Note:** If you previously ran Nostream on Linux/Mac and are switching to Windows, your existing data lives at `.nostr/data/` on the host. You'll need to copy it into the Docker named volume manually or it won't be visible to the new setup.
222
+
213
223
Stop the server with:
214
224
```
215
225
./scripts/stop
@@ -220,6 +230,29 @@ Print the Tor hostname:
220
230
./scripts/print_tor_hostname
221
231
```
222
232
233
+
### Importing events from JSON Lines
234
+
235
+
You can import NIP-01 events from a `.jsonl` file directly into the relay database.
236
+
237
+
Basic import:
238
+
```
239
+
npm run import -- ./events.jsonl
240
+
```
241
+
242
+
Set a custom batch size (default: `1000`):
243
+
```
244
+
npm run import -- ./events.jsonl --batch-size 500
245
+
```
246
+
247
+
The importer:
248
+
249
+
- Processes the file line-by-line to keep memory usage bounded.
250
+
- Validates NIP-01 schema, event id hash, and Schnorr signature before insertion.
251
+
- Inserts in database transactions per batch.
252
+
- Skips duplicates without failing the whole import.
0 commit comments