Summary
Let SimpleX Gateway point its headless SimpleX client at the user's own self-hosted SimpleX Server (the simplex package) instead of the public preset SMP/XFTP relays, as an optional dependency.
Motivation
Full self-sovereignty: when a user runs the SimpleX Server on the same box, the Gateway's messages and files should be able to relay through their server rather than the SimpleX team's public servers.
Proposed design
- Optional dependency on the
simplex (SimpleX Server) package.
- A Message Relays config: SimpleX defaults (public) / My self-hosted Server / Custom.
- When self-hosted is selected, auto-pull the Server's SMP and XFTP addresses from its StartOS service interfaces (no manual paste).
simplex-chat accepts custom relays at startup via -s/--server (SMP) and --xftp-server (XFTP), or at runtime via its chat API.
Address selection — preference order
When auto-pulling the Server's address, prefer in this order:
- Clearnet domain (most universally reachable + stable)
- Clearnet IP
- Tor onion
.local (LAN) — last resort, only when neither a clearnet nor a Tor address is available
Reachability note
The Gateway's SMP server is where its message queues live, so the user's contacts must be able to reach it to deliver messages. A .local/LAN-only relay therefore only works for same-LAN/same-box peers; reaching outside contacts requires the Server to be published on clearnet or Tor — hence the preference order above.
Context
Split out of the simplex-chat → SimpleX Gateway rename/redesign so that work can land without blocking on this.
Summary
Let SimpleX Gateway point its headless SimpleX client at the user's own self-hosted SimpleX Server (the
simplexpackage) instead of the public preset SMP/XFTP relays, as an optional dependency.Motivation
Full self-sovereignty: when a user runs the SimpleX Server on the same box, the Gateway's messages and files should be able to relay through their server rather than the SimpleX team's public servers.
Proposed design
simplex(SimpleX Server) package.simplex-chataccepts custom relays at startup via-s/--server(SMP) and--xftp-server(XFTP), or at runtime via its chat API.Address selection — preference order
When auto-pulling the Server's address, prefer in this order:
.local(LAN) — last resort, only when neither a clearnet nor a Tor address is availableReachability note
The Gateway's SMP server is where its message queues live, so the user's contacts must be able to reach it to deliver messages. A
.local/LAN-only relay therefore only works for same-LAN/same-box peers; reaching outside contacts requires the Server to be published on clearnet or Tor — hence the preference order above.Context
Split out of the
simplex-chat→ SimpleX Gateway rename/redesign so that work can land without blocking on this.