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
{{ message }}
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/usage/administration/admin_faq.md
+65-15Lines changed: 65 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,19 @@
2
2
3
3
How do I become a server admin?
4
4
---
5
-
If your server already has an admin account you should use the [User Admin API](../../admin_api/user_admin_api.md#change-whether-a-user-is-a-server-administrator-or-not) to promote other accounts to become admins.
5
+
If your server already has an admin account you should use the
If you don't have any admin accounts yet you won't be able to use the admin API, so you'll have to edit the database manually. Manually editing the database is generally not recommended so once you have an admin account: use the admin APIs to make further changes.
9
+
If you don't have any admin accounts yet you won't be able to use the admin API,
10
+
so you'll have to edit the database manually. Manually editing the database is
11
+
generally not recommended so once you have an admin account: use the admin APIs
12
+
to make further changes.
8
13
9
14
```sql
10
15
UPDATE users SET admin =1WHERE name ='@foo:bar.com';
11
16
```
17
+
12
18
What servers are my server talking to?
13
19
---
14
20
Run this sql query on your db:
@@ -36,8 +42,38 @@ How can I export user data?
36
42
---
37
43
Synapse includes a Python command to export data for a specific user. It takes the homeserver
38
44
configuration file and the full Matrix ID of the user to export:
The directory to store the export data in can be customised with the
58
+
`--output-directory` parameter; ensure that the provided directory is
59
+
empty. If this parameter is not provided, Synapse defaults to creating
60
+
a temporary directory (which starts with "synapse-exfiltrate") in `/tmp`,
61
+
`/var/tmp`, or `/usr/tmp`, in that order.
62
+
63
+
The exported data has the following layout:
64
+
65
+
```
66
+
output-directory
67
+
├───rooms
68
+
│ └───<room_id>
69
+
│ ├───events
70
+
│ ├───state
71
+
│ ├───invite_state
72
+
│ └───knock_state
73
+
└───user_data
74
+
├───connections
75
+
├───devices
76
+
└───profile
41
77
```
42
78
43
79
Manually resetting passwords
@@ -50,21 +86,29 @@ I have a problem with my server. Can I just delete my database and start again?
50
86
---
51
87
Deleting your database is unlikely to make anything better.
52
88
53
-
It's easy to make the mistake of thinking that you can start again from a clean slate by dropping your database, but things don't work like that in a federated network: lots of other servers have information about your server.
89
+
It's easy to make the mistake of thinking that you can start again from a clean
90
+
slate by dropping your database, but things don't work like that in a federated
91
+
network: lots of other servers have information about your server.
54
92
55
-
For example: other servers might think that you are in a room, your server will think that you are not, and you'll probably be unable to interact with that room in a sensible way ever again.
93
+
For example: other servers might think that you are in a room, your server will
94
+
think that you are not, and you'll probably be unable to interact with that room
95
+
in a sensible way ever again.
56
96
57
-
In general, there are better solutions to any problem than dropping the database. Come and seek help in https://matrix.to/#/#synapse:matrix.org.
97
+
In general, there are better solutions to any problem than dropping the database.
98
+
Come and seek help in https://matrix.to/#/#synapse:matrix.org.
58
99
59
100
There are two exceptions when it might be sensible to delete your database and start again:
60
-
* You have *never* joined any rooms which are federated with other servers. For instance, a local deployment which the outside world can't talk to.
61
-
* You are changing the `server_name` in the homeserver configuration. In effect this makes your server a completely new one from the point of view of the network, so in this case it makes sense to start with a clean database.
101
+
* You have *never* joined any rooms which are federated with other servers. For
102
+
instance, a local deployment which the outside world can't talk to.
103
+
* You are changing the `server_name` in the homeserver configuration. In effect
104
+
this makes your server a completely new one from the point of view of the network,
105
+
so in this case it makes sense to start with a clean database.
62
106
(In both cases you probably also want to clear out the media_store.)
63
107
64
108
I've stuffed up access to my room, how can I delete it to free up the alias?
`<access-token>` - can be obtained in riot by looking in the riot settings, down the bottom is:
@@ -75,19 +119,25 @@ Access Token:\<click to reveal\>
75
119
How can I find the lines corresponding to a given HTTP request in my homeserver log?
76
120
---
77
121
78
-
Synapse tags each log line according to the HTTP request it is processing. When it finishes processing each request, it logs a line containing the words `Processed request: `. For example:
122
+
Synapse tags each log line according to the HTTP request it is processing. When
123
+
it finishes processing each request, it logs a line containing the words
Here we can see that the request has been tagged with `GET-37`. (The tag depends on the method of the HTTP request, so might start with `GET-`, `PUT-`, `POST-`, `OPTIONS-` or `DELETE-`.) So to find all lines corresponding to this request, we can do:
130
+
Here we can see that the request has been tagged with `GET-37`. (The tag depends
131
+
on the method of the HTTP request, so might start with `GET-`, `PUT-`, `POST-`,
132
+
`OPTIONS-` or `DELETE-`.) So to find all lines corresponding to this request, we can do:
85
133
86
-
```
134
+
```console
87
135
grep 'GET-37' homeserver.log
88
136
```
89
137
90
-
If you want to paste that output into a github issue or matrix room, please remember to surround it with triple-backticks (```) to make it legible (see [quoting code](https://help.github.com/en/articles/basic-writing-and-formatting-syntax#quoting-code)).
138
+
If you want to paste that output into a github issue or matrix room, please
139
+
remember to surround it with triple-backticks (```) to make it legible
140
+
(see [quoting code](https://help.github.com/en/articles/basic-writing-and-formatting-syntax#quoting-code)).
91
141
92
142
93
143
What do all those fields in the 'Processed' line mean?
@@ -127,7 +177,7 @@ This is normally caused by a misconfiguration in your reverse-proxy. See [the re
127
177
128
178
129
179
Help!! Synapse is slow and eats all my RAM/CPU!
130
-
-----------------------------------------------
180
+
---
131
181
132
182
First, ensure you are running the latest version of Synapse, using Python 3
133
183
with a [PostgreSQL database](../../postgres.md).
@@ -169,7 +219,7 @@ in the Synapse config file: [see here](../configuration/config_documentation.md#
169
219
170
220
171
221
Running out of File Handles
172
-
---------------------------
222
+
---
173
223
174
224
If Synapse runs out of file handles, it typically fails badly - live-locking
175
225
at 100% CPU, and/or failing to accept new TCP connections (blocking the
0 commit comments