@meshwhisper/node 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +46 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # @meshwhisper/node
2
+
3
+ The [MeshWhisper](https://github.com/twotwoonethree/meshwhisper) relay node — packet relay, store-and-forward, push-notification forwarding, encrypted media storage, encrypted archive storage, username/prekey directory, and relay-to-relay federation, in a single binary.
4
+
5
+ The node never holds a decryption key. Everything it relays, stores, or queues is opaque ciphertext; clients encrypt on-device with PQXDH + Double Ratchet via [`@meshwhisper/sdk`](https://www.npmjs.com/package/@meshwhisper/sdk).
6
+
7
+ ## Quickstart
8
+
9
+ The easiest path is the CLI, which writes a Docker Compose deployment around this package:
10
+
11
+ ```bash
12
+ npx @meshwhisper/cli init
13
+ ```
14
+
15
+ Or run it directly:
16
+
17
+ ```bash
18
+ npm install -g @meshwhisper/node
19
+ BASE_URL=https://relay.myapp.com DB_PATH=./meshwhisper.db meshwhisper-node
20
+ ```
21
+
22
+ Listens on port 8080 (`PORT` to change). Put TLS in front of it (Caddy: `reverse_proxy localhost:8080`). Verify with `curl https://relay.myapp.com/health` or `npx @meshwhisper/cli doctor`.
23
+
24
+ ## Key environment variables
25
+
26
+ | Variable | Default | Description |
27
+ |---|---|---|
28
+ | `PORT` | `8080` | HTTP/WebSocket listen port |
29
+ | `BASE_URL` | — | Public URL; **required** for media download links to be reachable |
30
+ | `DB_PATH` | `./meshwhisper.db` | SQLite database location |
31
+ | `BLOB_TTL_HOURS` | `720` | How long queued messages wait for offline recipients (30 days) |
32
+ | `MEDIA_TTL_HOURS` | `168` | Encrypted media retention |
33
+ | `PUSH_WEBHOOK_URL` | — | `@meshwhisper/push-service` endpoint for offline wake signals |
34
+ | `TRUST_PROXY` | unset | Set to `1` behind a reverse proxy so rate limiting sees real client IPs |
35
+ | `FEDERATION_MODE` | off | `open` joins the relay mesh — your node forwards packets for other relays and they for yours; `allowlist` for explicit peering |
36
+
37
+ Full reference, including federation, backups, and metrics: [self-hosting guide](https://github.com/twotwoonethree/meshwhisper/blob/main/docs/self-hosting.md).
38
+
39
+ ## Operational features
40
+
41
+ - Per-IP rate limiting on every endpoint
42
+ - Prometheus metrics at `/metrics`, health at `/health`
43
+ - Hot backup via bundled sqlite: `sqlite3 meshwhisper.db ".backup backup.db"`
44
+ - Federation wire protocol specified in [docs/federation.md](https://github.com/twotwoonethree/meshwhisper/blob/main/docs/federation.md)
45
+
46
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshwhisper/node",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "MeshWhisper Node — relay, push forwarding, media storage, and prekey directory in a single binary",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",