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
Copy file name to clipboardExpand all lines: README.md
+82-21Lines changed: 82 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,6 @@
2
2
3
3
Production-ready [Matrix](https://matrix.org/) homeserver image for operating [Beacon](https://tzip.tezosagora.org/proposal/tzip-10/) relay nodes. Beacon is the open communication standard connecting Tezos wallets and dApps, ratified as [TZIP-10](https://tzip.tezosagora.org/proposal/tzip-10/). Matrix provides the federated transport layer.
4
4
5
-
This image is what [ECAD Infra](https://ecadinfra.com) runs in production. We publish it so that anyone can operate Beacon relay infrastructure using the same tooling we do.
6
-
7
-
## Why operator diversity matters
8
-
9
-
Beacon relay nodes are the infrastructure that every Tezos wallet-to-dApp connection depends on. When a user pairs a wallet with a dApp, that connection flows through Matrix relay servers.
10
-
11
-
The Beacon network is stronger when relay infrastructure is operated by **multiple independent organizations** across different regions and hosting providers. Federation is a core design property of the Matrix protocol, and Beacon inherits it: wallets and dApps can communicate regardless of which operator's relay node they connect through. No single organization needs to be a bottleneck or a single point of failure.
12
-
13
-
This image exists to make running a Beacon relay node straightforward. If you operate infrastructure in the Tezos ecosystem, consider running one.
14
-
15
5
## Provenance
16
6
17
7
Beacon relay infrastructure was originally created by [Papers (AirGap)](https://papers.ch/) as part of the [Beacon SDK](https://github.com/airgap-it/beacon-sdk) ecosystem. Papers designed the protocol, built the SDK, and operated the first relay nodes, establishing the standard that the entire Tezos wallet and dApp ecosystem relies on today.
@@ -21,20 +11,51 @@ This image builds on [AirGap's beacon-node](https://github.com/airgap-it/beacon-
21
11
### What changed from upstream
22
12
23
13
-**Synapse v1.98.0 to v1.147.1**: Upgraded to current release
-**`beacon_monitor_module.py`**: Observability module for diagnosing connection and federation issues. Logs operational metadata (room lifecycle, membership changes, payload sizes, login events) in logfmt format. All Beacon message payloads are encrypted end-to-end between wallet and dApp using NaCl cryptobox before reaching the relay server; message content is not and cannot be logged. User and room identifiers are opaque hashes with no link to real-world identity.
25
16
-**`beacon_info_module.py`**: HTTP endpoint exposing server region and known relay servers
26
-
-**Worker mode**: Support for 4 generic workers behind the main process
17
+
-**Worker mode**: Official Element HQ worker orchestration (supervisord + nginx + redis) for horizontal scaling
27
18
-**`MAX_PDU_SIZE` patch**: 64KB to 1MB (Beacon messages can exceed the default Matrix limit)
28
19
-**logfmt logging**: Structured log output for ingestion into Loki/Grafana/etc.
20
+
-**SSRF protection**: `federation_ip_range_blacklist` covering RFC 1918, link-local, and loopback
This starts Synapse with PostgreSQL and Redis. The server will be available at `http://localhost:8008`.
58
+
Supervisord orchestrates the main Synapse process, worker processes, nginx, and redis, all inside a single container. nginx routes requests to the appropriate worker based on URL patterns. Redis handles inter-process replication.
38
59
39
60
## Configuration
40
61
@@ -52,11 +73,32 @@ The image uses template variables in `homeserver.yaml` that are substituted at s
52
73
|`SERVER_REGION`| No | Region label for the `/beacon/info` endpoint |
53
74
|`SYNAPSE_ENABLE_METRICS`| No | Set to `1` to expose Prometheus metrics on port 19090 |
54
75
|`SYNAPSE_WORKERS`| No | Set to `true` to enable multi-worker mode |
76
+
|`SYNAPSE_WORKER_TYPES`| No | Comma-separated worker types (default: `synchrotron:2,event_persister:1,federation_inbound:1`) |
55
77
|`PUBLIC_BASEURL`| No | Public URL for federation (default: `https://SERVER_NAME`) |
56
78
|`SERVE_WELLKNOWN`| No | Set to `true` to serve `.well-known/matrix/server` for Cloudflare |
57
79
|`DB_CP_MIN`| No | Minimum database connections (default: `20`) |
58
80
|`DB_CP_MAX`| No | Maximum database connections (default: `80`) |
59
81
82
+
### Worker types
83
+
84
+
The `SYNAPSE_WORKER_TYPES` variable accepts the official Element HQ worker type syntax:
0 commit comments