diff --git a/docs/server.html b/docs/server.html index 200ee08c8f..30c0a6fa01 100644 --- a/docs/server.html +++ b/docs/server.html @@ -970,6 +970,7 @@ window.addEventListener('click',(e)=>{
Access the webpage you've deployed from your browser (https://smp.example.org). You should see the smp-server information that you've provided in your ini file.
SimpleX public names (like alice.simplex) resolve to contact and channel addresses. These records are stored in the SimpleX Namespace registry contracts on Ethereum, so resolving a name means reading from an Ethereum node. Read more about SimpleX Public Names.
With the [NAMES] section enabled, your smp-server resolves names for the clients connected to it: it forwards their lookups to a local REST resolver and returns the addresses. Resolution is off by default and requires running a resolver stack (an Ethereum node plus the resolver service), which needs:
The resolver stack (a reth + nimbus Ethereum node plus the resolver service) ships in scripts/resolver and starts with one command. See its README for details.
git clone https://github.com/simplex-chat/simplexmq
+cd simplexmq/scripts/resolver
+docker compose up -d
+
+The shipped .env targets Ethereum mainnet and needs no changes. Open the peer-to-peer ports so the node can sync:
ufw allow 30303 &&\
+ufw allow 9000
+
+The resolver returns errors until the node finishes syncing, which takes about a day.
+Once synced, confirm the resolver is healthy and resolves a name:
+curl -s http://127.0.0.1:8000/health
+curl -s http://127.0.0.1:8000/resolve/foobar.testing
+
+The first should report "ok": true. The second should return the records for the test name foobar.testing.
In /etc/opt/simplex/smp-server.ini, set the [NAMES] section:
[NAMES]
+enable: on
+resolver_endpoint: http://127.0.0.1:8000
+
+No authentication is needed while smp-server and the resolver share a host over loopback. Behind a TLS reverse proxy on another host, use its HTTPS address and add credentials (resolver_auth over plain http is only allowed for loopback):
[NAMES]
+enable: on
+resolver_endpoint: https://names.example.com:443
+resolver_auth: basic <username>:<password>
+
+systemctl restart smp-server
+
+The server logs the resolver status on start:
+[NAMES] resolver enabled, endpoint=http://127.0.0.1:8000
+[NAMES] endpoint probe ok
+
+If the node is still syncing the server starts anyway, and name lookups fail until the resolver is ready.
All necessary files for smp-server are located in /etc/opt/simplex/ folder.
Stored messages, connections, statistics and server log are located in /var/opt/simplex/ folder.