Get synapse list of users

Hello,

I am looking for a way to get a list of registered users on my synapse server.

I found two solutions:

  1. a first one, using sql queries https://github.com/matrix-org/synapse/wiki ;
  2. a second one, using matrix-js-sdk https://github.com/matrix-org/matrix-python-sdk/issues/99.

I am more interested in the first one, as it doesn’t need the installation of another package, however I don’t really know how to interrogate the database.

Is anyone know how to do it please?
Thank you.

Hello,

For the first one, you need to be connected on your YunoHost server (as root)

sudo -u postgres psql -d matrix_synapse
SELECT name from users;

Or

su --command=“psql matrix_synapse” postgres <<< “SELECT name from users”

Hello,

Thanks, that’s what I was looking for.