Use POST /discover/:server_name
endpoint, here is example using an example.com
homeserver:
curl -X POST https://api.matrixrooms.info/discover/example.com
If your server publishes room directory over federation and has public rooms within the directory, they will appear in the search index after the next full reindex process (should be run daily).
Please keep in mind that to have a room indexed, you have to:
Your server must publish public rooms over federation (/_matrix/federation/v1/publicRooms
endpoint), eg: https://matrix.etke.cc:8448/_matrix/federation/v1/publicRooms
I get error on public rooms endpoint, something like:
"errcode":"M_FORBIDDEN","error":"You are not allowed to view the public rooms list of example.com"
In that case you should adjust your server's configuration. For synapse, you need to add the following config options in the homeserver.yaml
:
allow_public_rooms_over_federation: true
in case of etke.cc/ansible and mdad, add the following to your vars.yml:
matrix_synapse_allow_public_rooms_over_federation: true