aboutsummaryrefslogtreecommitdiffstats
path: root/messages/README.md
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-25 16:00:12 -0700
committerAdam Soltys <[email protected]>2026-10-25 16:00:12 -0700
commit5f3985bfd2b7b96eea30a3253a755ab409276f00 (patch)
tree64adba99338cd92927c09d24f2ae6834e21b3d03 /messages/README.md
parent8ea5ae33f14ade28a0809a6dc267b44570c8e74f (diff)
downloadcoinosv3-server-5f3985bfd2b7b96eea30a3253a755ab409276f00.tar.gz
coinosv3-server-5f3985bfd2b7b96eea30a3253a755ab409276f00.zip
messages: messages.coinos.io, a Magnitude Relay for the app's private messages, inbox lists, calls and group chats; copies down from relay.coinos.io over NIP-77 (the strfry tunnel), never writes into it
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
Diffstat (limited to 'messages/README.md')
-rw-r--r--messages/README.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/messages/README.md b/messages/README.md
new file mode 100644
index 0000000..aa0d4da
--- /dev/null
+++ b/messages/README.md
@@ -0,0 +1,35 @@
+# messages.coinos.io
+
+The messaging relay: [Magnitude Relay](https://github.com/VectorPrivacy/magnitude-relay)
+(AGPL-3.0, Rust), run as the `messages` service in `compose.yml` with the
+settings in `relay.toml`. relay.coinos.io (strfry on desk) stays the general
+relay; this one takes the app's private messages, inbox lists, calls and
+group chats, and copies down what other clients deliver to relay.coinos.io.
+
+## Build (on cs)
+
+The binary is built from a pinned commit, outside the deploy hook (a release
+build takes minutes), and mounted into the container:
+
+```sh
+git -C ~/magnitude-relay-src fetch && git -C ~/magnitude-relay-src checkout <rev>
+docker run --rm --cpus 4 -v ~/magnitude-relay-src:/src -v ~/magnitude-build:/target \
+ -v magnitude-cargo:/usr/local/cargo/registry -w /src -e CARGO_TARGET_DIR=/target \
+ -e RELAY_BUILD_REV=<rev> rust:1-bookworm cargo build --release -p relay-server
+install -m 755 ~/magnitude-build/release/magnitude-relay $STATE/messages/bin/
+docker compose -f ~/coinosv3-server/compose.yml --env-file ~/coinosv3-state/.env up -d --force-recreate messages
+```
+
+Running now: 92f2440.
+
+## Ingress
+
+`messages.coinos.io` → `http://localhost:8794` in `~/.cloudflared/bitcoin.yml`
+(`sudo systemctl restart cloudflared-bitcoin`), DNS CNAME to the tunnel.
+
+## Operating
+
+Dashboard `https://messages.coinos.io/dashboard`, `/stats`, `/metrics`. Operator
+commands (`query`, `count`, `delete`, `backup`, `sync`) reach the running relay
+through `/data/admin.sock`:
+`docker exec messages magnitude-relay --config /etc/magnitude-relay/relay.toml count '{"kinds":[1059]}'`