This commit is contained in:
reivilibre 2023-01-05 18:18:54 +00:00
parent b6fd9153df
commit d07f6856fe
26 changed files with 74 additions and 76 deletions

View file

@ -151,7 +151,7 @@
use it, you must enable the account validity feature (under use it, you must enable the account validity feature (under
<code>account_validity</code>) in Synapse's configuration.</p> <code>account_validity</code>) in Synapse's configuration.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="../usage/administration/admin_api/">Admin API</a>.</p>
<h2 id="renew-account"><a class="header" href="#renew-account">Renew account</a></h2> <h2 id="renew-account"><a class="header" href="#renew-account">Renew account</a></h2>
<p>This API extends the validity of an account by as much time as configured in the <p>This API extends the validity of an account by as much time as configured in the
<code>period</code> parameter from the <code>account_validity</code> configuration.</p> <code>period</code> parameter from the <code>account_validity</code> configuration.</p>

View file

@ -149,7 +149,7 @@
<h1 id="show-reported-events"><a class="header" href="#show-reported-events">Show reported events</a></h1> <h1 id="show-reported-events"><a class="header" href="#show-reported-events">Show reported events</a></h1>
<p>This API returns information about reported events.</p> <p>This API returns information about reported events.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="../usage/administration/admin_api/">Admin API</a>.</p>
<p>The api is:</p> <p>The api is:</p>
<pre><code>GET /_synapse/admin/v1/event_reports?from=0&amp;limit=10 <pre><code>GET /_synapse/admin/v1/event_reports?from=0&amp;limit=10
</code></pre> </code></pre>

View file

@ -151,7 +151,7 @@
<p>Details about the format of the <code>media_id</code> and storage of the media in the file system <p>Details about the format of the <code>media_id</code> and storage of the media in the file system
are documented under <a href="../media_repository.html">media repository</a>.</p> are documented under <a href="../media_repository.html">media repository</a>.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="../usage/administration/admin_api/">Admin API</a>.</p>
<h2 id="list-all-media-in-a-room"><a class="header" href="#list-all-media-in-a-room">List all media in a room</a></h2> <h2 id="list-all-media-in-a-room"><a class="header" href="#list-all-media-in-a-room">List all media in a room</a></h2>
<p>This API gets a list of known media in a room. <p>This API gets a list of known media in a room.
However, it only shows media from unencrypted events or rooms.</p> However, it only shows media from unencrypted events or rooms.</p>

View file

@ -155,7 +155,7 @@ paginate further back in the room from the point being purged from.</p>
<p>Note that Synapse requires at least one message in each room, so it will never <p>Note that Synapse requires at least one message in each room, so it will never
delete the last message in a room.</p> delete the last message in a room.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="../usage/administration/admin_api/">Admin API</a>.</p>
<p>The API is:</p> <p>The API is:</p>
<pre><code>POST /_synapse/admin/v1/purge_history/&lt;room_id&gt;[/&lt;event_id&gt;] <pre><code>POST /_synapse/admin/v1/purge_history/&lt;room_id&gt;[/&lt;event_id&gt;]
</code></pre> </code></pre>

View file

@ -152,7 +152,7 @@ to a room with a given <code>room_id_or_alias</code>. You can only modify the me
local users. The server administrator must be in the room and have permission to local users. The server administrator must be in the room and have permission to
invite users.</p> invite users.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="../usage/administration/admin_api/">Admin API</a>.</p>
<h2 id="parameters"><a class="header" href="#parameters">Parameters</a></h2> <h2 id="parameters"><a class="header" href="#parameters">Parameters</a></h2>
<p>The following parameters are available:</p> <p>The following parameters are available:</p>
<ul> <ul>

View file

@ -151,7 +151,7 @@
server. There are various parameters available that allow for filtering and server. There are various parameters available that allow for filtering and
sorting the returned list. This API supports pagination.</p> sorting the returned list. This API supports pagination.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="../usage/administration/admin_api/">Admin API</a>.</p>
<p><strong>Parameters</strong></p> <p><strong>Parameters</strong></p>
<p>The following query parameters are available:</p> <p>The following query parameters are available:</p>
<ul> <ul>
@ -509,7 +509,7 @@ If the room does not define a type, the value will be <code>null</code>.</li>
sent to a room in a given timeframe. There are various parameters available sent to a room in a given timeframe. There are various parameters available
that allow for filtering and ordering the returned list. This API supports pagination.</p> that allow for filtering and ordering the returned list. This API supports pagination.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="../usage/administration/admin_api/">Admin API</a>.</p>
<p>This endpoint mirrors the <a href="https://spec.matrix.org/v1.1/client-server-api/#get_matrixclientv3roomsroomidmessages">Matrix Spec defined Messages API</a>.</p> <p>This endpoint mirrors the <a href="https://spec.matrix.org/v1.1/client-server-api/#get_matrixclientv3roomsroomidmessages">Matrix Spec defined Messages API</a>.</p>
<p>The API is:</p> <p>The API is:</p>
<pre><code>GET /_synapse/admin/v1/rooms/&lt;room_id&gt;/messages <pre><code>GET /_synapse/admin/v1/rooms/&lt;room_id&gt;/messages

View file

@ -150,7 +150,7 @@
<p>Returns information about all local media usage of users. Gives the <p>Returns information about all local media usage of users. Gives the
possibility to filter them by time and user.</p> possibility to filter them by time and user.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="../usage/administration/admin_api/">Admin API</a>.</p>
<p>The API is:</p> <p>The API is:</p>
<pre><code>GET /_synapse/admin/v1/statistics/users/media <pre><code>GET /_synapse/admin/v1/statistics/users/media
</code></pre> </code></pre>

View file

@ -148,7 +148,7 @@
<h1 id="user-admin-api"><a class="header" href="#user-admin-api">User Admin API</a></h1> <h1 id="user-admin-api"><a class="header" href="#user-admin-api">User Admin API</a></h1>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="../usage/administration/admin_api/">Admin API</a>.</p>
<h2 id="query-user-account"><a class="header" href="#query-user-account">Query User Account</a></h2> <h2 id="query-user-account"><a class="header" href="#query-user-account">Query User Account</a></h2>
<p>This API returns information about a specific user account.</p> <p>This API returns information about a specific user account.</p>
<p>The api is:</p> <p>The api is:</p>

View file

@ -215,8 +215,8 @@ Synapse developers.
regarding Synapse's Admin API, which is used mostly by sysadmins and external regarding Synapse's Admin API, which is used mostly by sysadmins and external
service developers.</p> service developers.</p>
<p>Synapse's code style is documented <a href="../code_style.html">here</a>. Please follow <p>Synapse's code style is documented <a href="../code_style.html">here</a>. Please follow
it, including the conventions for the <a href="../code_style.html#configuration-file-format">sample configuration it, including the conventions for <a href="../code_style.html#configuration-code-and-documentation-format">configuration
file</a>.</p> options and documentation</a>.</p>
<p>We welcome improvements and additions to our documentation itself! When <p>We welcome improvements and additions to our documentation itself! When
writing new pages, please writing new pages, please
<a href="https://github.com/matrix-org/synapse/tree/develop/docs#adding-to-the-documentation">build <code>docs</code> to a book</a> <a href="https://github.com/matrix-org/synapse/tree/develop/docs#adding-to-the-documentation">build <code>docs</code> to a book</a>
@ -230,7 +230,7 @@ or <code>maturin develop</code> (if installed) to rebuild the Rust code. Using <
is quicker than <code>poetry install</code>, so is recommended when making frequent is quicker than <code>poetry install</code>, so is recommended when making frequent
changes to the Rust code.</p> changes to the Rust code.</p>
<h1 id="8-test-test-test"><a class="header" href="#8-test-test-test">8. Test, test, test!</a></h1> <h1 id="8-test-test-test"><a class="header" href="#8-test-test-test">8. Test, test, test!</a></h1>
<p><a name="test-test-test"></a></p> <p><a name="test-test-test" id="test-test-test"></a></p>
<p>While you're developing and before submitting a patch, you'll <p>While you're developing and before submitting a patch, you'll
want to test your code.</p> want to test your code.</p>
<h2 id="run-the-linters"><a class="header" href="#run-the-linters">Run the linters.</a></h2> <h2 id="run-the-linters"><a class="header" href="#run-the-linters">Run the linters.</a></h2>
@ -437,8 +437,7 @@ chicken-and-egg problem.</p>
<ol> <ol>
<li> <li>
<p>Open the PR without a changelog file, see what number you got, and <em>then</em> <p>Open the PR without a changelog file, see what number you got, and <em>then</em>
add the changelog file to your branch (see <a href="#updating-your-pull-request">Updating your pull add the changelog file to your branch, or:</p>
request</a>), or:</p>
</li> </li>
<li> <li>
<p>Look at the <a href="https://github.com/matrix-org/synapse/issues?q=">list of all <p>Look at the <a href="https://github.com/matrix-org/synapse/issues?q=">list of all

View file

@ -189,8 +189,8 @@ that Synapse does not allow registering resources for several sub-paths in the <
namespace (such as anything under <code>/_matrix/client</code> for example). It is strongly namespace (such as anything under <code>/_matrix/client</code> for example). It is strongly
recommended that modules register their web resources under the <code>/_synapse/client</code> recommended that modules register their web resources under the <code>/_synapse/client</code>
namespace.</p> namespace.</p>
<p>The provided resource is a Python class that implements Twisted's <a href="https://twistedmatrix.com/documents/current/api/twisted.web.resource.IResource.html">IResource</a> <p>The provided resource is a Python class that implements Twisted's <a href="https://docs.twistedmatrix.com/en/stable/api/twisted.web.resource.IResource.html">IResource</a>
interface (such as <a href="https://twistedmatrix.com/documents/current/api/twisted.web.resource.Resource.html">Resource</a>).</p> interface (such as <a href="https://docs.twistedmatrix.com/en/stable/api/twisted.web.resource.Resource.html">Resource</a>).</p>
<p>Only one resource can be registered for a given path. If several modules attempt to <p>Only one resource can be registered for a given path. If several modules attempt to
register a resource for the same path, the module that appears first in Synapse's register a resource for the same path, the module that appears first in Synapse's
configuration file takes priority.</p> configuration file takes priority.</p>

View file

@ -558,7 +558,7 @@ does not return a <code>sub</code> property, an alternative <code>subject_claim<
<p><a href="https://www.keycloak.org/docs/latest/server_admin/#sso-protocols">Keycloak</a> is an opensource IdP maintained by Red Hat.</p> <p><a href="https://www.keycloak.org/docs/latest/server_admin/#sso-protocols">Keycloak</a> is an opensource IdP maintained by Red Hat.</p>
<p>Keycloak supports OIDC Back-Channel Logout, which sends logout notification to Synapse, so that Synapse users get logged out when they log out from Keycloak. <p>Keycloak supports OIDC Back-Channel Logout, which sends logout notification to Synapse, so that Synapse users get logged out when they log out from Keycloak.
This can be optionally enabled by setting <code>backchannel_logout_enabled</code> to <code>true</code> in the Synapse configuration, and by setting the &quot;Backchannel Logout URL&quot; in Keycloak.</p> This can be optionally enabled by setting <code>backchannel_logout_enabled</code> to <code>true</code> in the Synapse configuration, and by setting the &quot;Backchannel Logout URL&quot; in Keycloak.</p>
<p>Follow the <a href="https://www.keycloak.org/getting-started">Getting Started Guide</a> to install Keycloak and set up a realm.</p> <p>Follow the <a href="https://www.keycloak.org/guides">Getting Started Guide</a> to install Keycloak and set up a realm.</p>
<ol> <ol>
<li> <li>
<p>Click <code>Clients</code> in the sidebar and click <code>Create</code></p> <p>Click <code>Clients</code> in the sidebar and click <code>Create</code></p>

View file

@ -165,7 +165,7 @@ low-level postgres library is installed, which you can do with
the relevant package.</p> the relevant package.</p>
</li> </li>
<li> <li>
<p>If you installed synapse <a href="setup/installation.html#installing-from-source">in a <p>If you installed synapse <a href="setup/installation.html#installing-as-a-python-module-from-pypi">in a
virtualenv</a>, you can install virtualenv</a>, you can install
the library with:</p> the library with:</p>
<pre><code>~/synapse/env/bin/pip install &quot;matrix-synapse[postgres]&quot; <pre><code>~/synapse/env/bin/pip install &quot;matrix-synapse[postgres]&quot;

View file

@ -321,7 +321,7 @@ The latest version of Synapse can be installed from <a href="setup/installation.
<a href="https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15/standard/">https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15/standard/</a></p> <a href="https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15/standard/">https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15/standard/</a></p>
<h4 id="archlinux"><a class="header" href="#archlinux">ArchLinux</a></h4> <h4 id="archlinux"><a class="header" href="#archlinux">ArchLinux</a></h4>
<p>The quickest way to get up and running with ArchLinux is probably with the community package <p>The quickest way to get up and running with ArchLinux is probably with the community package
<a href="https://www.archlinux.org/packages/community/any/matrix-synapse/">https://www.archlinux.org/packages/community/any/matrix-synapse/</a>, which should pull in most of <a href="https://archlinux.org/packages/community/x86_64/matrix-synapse/">https://archlinux.org/packages/community/x86_64/matrix-synapse/</a>, which should pull in most of
the necessary dependencies.</p> the necessary dependencies.</p>
<p>pip may be outdated (6.0.7-1 and needs to be upgraded to 6.0.8-1 ):</p> <p>pip may be outdated (6.0.7-1 and needs to be upgraded to 6.0.8-1 ):</p>
<pre><code class="language-sh">sudo pip install --upgrade pip <pre><code class="language-sh">sudo pip install --upgrade pip
@ -673,7 +673,7 @@ low-level postgres library is installed, which you can do with
the relevant package.</p> the relevant package.</p>
</li> </li>
<li> <li>
<p>If you installed synapse <a href="setup/installation.html#installing-from-source">in a <p>If you installed synapse <a href="setup/installation.html#installing-as-a-python-module-from-pypi">in a
virtualenv</a>, you can install virtualenv</a>, you can install
the library with:</p> the library with:</p>
<pre><code>~/synapse/env/bin/pip install &quot;matrix-synapse[postgres]&quot; <pre><code>~/synapse/env/bin/pip install &quot;matrix-synapse[postgres]&quot;
@ -2331,8 +2331,8 @@ federation requests.</p>
<a href="https://matrix-org.github.io/synapse/latest/admin_api/rooms.html#delete-room-api">Delete Room API</a>.</p> <a href="https://matrix-org.github.io/synapse/latest/admin_api/rooms.html#delete-room-api">Delete Room API</a>.</p>
<h2 id="user-interactive-authentication-fallback-templates-can-now-display-errors"><a class="header" href="#user-interactive-authentication-fallback-templates-can-now-display-errors">User-interactive authentication fallback templates can now display errors</a></h2> <h2 id="user-interactive-authentication-fallback-templates-can-now-display-errors"><a class="header" href="#user-interactive-authentication-fallback-templates-can-now-display-errors">User-interactive authentication fallback templates can now display errors</a></h2>
<p>This may affect you if you make use of custom HTML templates for the <p>This may affect you if you make use of custom HTML templates for the
<a href="../synapse/res/templates/recaptcha.html">reCAPTCHA</a> or <a href="https://github.com/matrix-org/synapse/tree/develop/synapse/res/templates/recaptcha.html">reCAPTCHA (<code>synapse/res/templates/recaptcha.html</code>)</a> or
<a href="../synapse/res/templates/terms.html">terms</a> fallback pages.</p> <a href="https://github.com/matrix-org/synapse/tree/develop/synapse/res/templates/terms.html">terms (<code>synapse/res/templates/terms.html</code>)</a> fallback pages.</p>
<p>The template is now provided an <code>error</code> variable if the authentication <p>The template is now provided an <code>error</code> variable if the authentication
process failed. See the default templates linked above for an example.</p> process failed. See the default templates linked above for an example.</p>
<h2 id="removal-of-out-of-date-email-pushers"><a class="header" href="#removal-of-out-of-date-email-pushers">Removal of out-of-date email pushers</a></h2> <h2 id="removal-of-out-of-date-email-pushers"><a class="header" href="#removal-of-out-of-date-email-pushers">Removal of out-of-date email pushers</a></h2>
@ -2796,7 +2796,7 @@ INSERT INTO background_updates (update_name, progress_json, depends_on) VALUES
is configured to use SSO and a custom is configured to use SSO and a custom
<code>sso_redirect_confirm_template_dir</code> configuration then these templates <code>sso_redirect_confirm_template_dir</code> configuration then these templates
will need to be copied from will need to be copied from
<a href="synapse/res/templates">synapse/res/templates</a> into that directory.</p> <a href="https://github.com/matrix-org/synapse/tree/develop/synapse/res/templates"><code>synapse/res/templates</code></a> into that directory.</p>
<h2 id="synapse-sso-plugins-method-deprecation"><a class="header" href="#synapse-sso-plugins-method-deprecation">Synapse SSO Plugins Method Deprecation</a></h2> <h2 id="synapse-sso-plugins-method-deprecation"><a class="header" href="#synapse-sso-plugins-method-deprecation">Synapse SSO Plugins Method Deprecation</a></h2>
<p>Plugins using the <code>complete_sso_login</code> method of <p>Plugins using the <code>complete_sso_login</code> method of
<code>synapse.module_api.ModuleApi</code> should update to using the async/await <code>synapse.module_api.ModuleApi</code> should update to using the async/await
@ -4613,7 +4613,7 @@ connection pool. For a reference to valid arguments, see:</p>
<ul> <ul>
<li>for <a href="https://docs.python.org/3/library/sqlite3.html#sqlite3.connect">sqlite</a></li> <li>for <a href="https://docs.python.org/3/library/sqlite3.html#sqlite3.connect">sqlite</a></li>
<li>for <a href="https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS">postgres</a></li> <li>for <a href="https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS">postgres</a></li>
<li>for <a href="https://twistedmatrix.com/documents/current/api/twisted.enterprise.adbapi.ConnectionPool.html#__init__">the connection pool</a></li> <li>for <a href="https://docs.twistedmatrix.com/en/stable/api/twisted.enterprise.adbapi.ConnectionPool.html#__init__">the connection pool</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -6882,7 +6882,7 @@ other workers.</p>
<hr /> <hr />
<h3 id="worker_daemonize"><a class="header" href="#worker_daemonize"><code>worker_daemonize</code></a></h3> <h3 id="worker_daemonize"><a class="header" href="#worker_daemonize"><code>worker_daemonize</code></a></h3>
<p>Specifies whether the worker should be started as a daemon process. <p>Specifies whether the worker should be started as a daemon process.
If Synapse is being managed by <a href="usage/configuration/../../systemd-with-workers/README.html">systemd</a>, this option If Synapse is being managed by <a href="usage/configuration/../../systemd-with-workers/">systemd</a>, this option
must be omitted or set to <code>false</code>.</p> must be omitted or set to <code>false</code>.</p>
<p>Defaults to <code>false</code>.</p> <p>Defaults to <code>false</code>.</p>
<p>Example configuration:</p> <p>Example configuration:</p>
@ -7855,7 +7855,7 @@ does not return a <code>sub</code> property, an alternative <code>subject_claim<
<p><a href="https://www.keycloak.org/docs/latest/server_admin/#sso-protocols">Keycloak</a> is an opensource IdP maintained by Red Hat.</p> <p><a href="https://www.keycloak.org/docs/latest/server_admin/#sso-protocols">Keycloak</a> is an opensource IdP maintained by Red Hat.</p>
<p>Keycloak supports OIDC Back-Channel Logout, which sends logout notification to Synapse, so that Synapse users get logged out when they log out from Keycloak. <p>Keycloak supports OIDC Back-Channel Logout, which sends logout notification to Synapse, so that Synapse users get logged out when they log out from Keycloak.
This can be optionally enabled by setting <code>backchannel_logout_enabled</code> to <code>true</code> in the Synapse configuration, and by setting the &quot;Backchannel Logout URL&quot; in Keycloak.</p> This can be optionally enabled by setting <code>backchannel_logout_enabled</code> to <code>true</code> in the Synapse configuration, and by setting the &quot;Backchannel Logout URL&quot; in Keycloak.</p>
<p>Follow the <a href="https://www.keycloak.org/getting-started">Getting Started Guide</a> to install Keycloak and set up a realm.</p> <p>Follow the <a href="https://www.keycloak.org/guides">Getting Started Guide</a> to install Keycloak and set up a realm.</p>
<ol> <ol>
<li> <li>
<p>Click <code>Clients</code> in the sidebar and click <code>Create</code></p> <p>Click <code>Clients</code> in the sidebar and click <code>Create</code></p>
@ -8191,7 +8191,7 @@ specified in the config. It is located at
<a href="https://github.com/matrix-org/synapse/blob/develop/synapse/handlers/oidc.py"><code>synapse.handlers.oidc.JinjaOidcMappingProvider</code></a>.</p> <a href="https://github.com/matrix-org/synapse/blob/develop/synapse/handlers/oidc.py"><code>synapse.handlers.oidc.JinjaOidcMappingProvider</code></a>.</p>
<h2 id="saml-mapping-providers"><a class="header" href="#saml-mapping-providers">SAML Mapping Providers</a></h2> <h2 id="saml-mapping-providers"><a class="header" href="#saml-mapping-providers">SAML Mapping Providers</a></h2>
<p>The SAML mapping provider can be customized by editing the <p>The SAML mapping provider can be customized by editing the
<a href="docs/usage/configuration/config_documentation.html#saml2_config"><code>saml2_config.user_mapping_provider.module</code></a> <a href="usage/configuration/config_documentation.html#saml2_config"><code>saml2_config.user_mapping_provider.module</code></a>
config option.</p> config option.</p>
<p><code>saml2_config.user_mapping_provider.config</code> allows you to provide custom <p><code>saml2_config.user_mapping_provider.config</code> allows you to provide custom
configuration options to the module. Check with the module's documentation for configuration options to the module. Check with the module's documentation for
@ -9199,8 +9199,8 @@ that Synapse does not allow registering resources for several sub-paths in the <
namespace (such as anything under <code>/_matrix/client</code> for example). It is strongly namespace (such as anything under <code>/_matrix/client</code> for example). It is strongly
recommended that modules register their web resources under the <code>/_synapse/client</code> recommended that modules register their web resources under the <code>/_synapse/client</code>
namespace.</p> namespace.</p>
<p>The provided resource is a Python class that implements Twisted's <a href="https://twistedmatrix.com/documents/current/api/twisted.web.resource.IResource.html">IResource</a> <p>The provided resource is a Python class that implements Twisted's <a href="https://docs.twistedmatrix.com/en/stable/api/twisted.web.resource.IResource.html">IResource</a>
interface (such as <a href="https://twistedmatrix.com/documents/current/api/twisted.web.resource.Resource.html">Resource</a>).</p> interface (such as <a href="https://docs.twistedmatrix.com/en/stable/api/twisted.web.resource.Resource.html">Resource</a>).</p>
<p>Only one resource can be registered for a given path. If several modules attempt to <p>Only one resource can be registered for a given path. If several modules attempt to
register a resource for the same path, the module that appears first in Synapse's register a resource for the same path, the module that appears first in Synapse's
configuration file takes priority.</p> configuration file takes priority.</p>
@ -10427,7 +10427,7 @@ endpoints to the worker (<code>localhost:8083</code> in the above example).</p>
<code>synctl</code> or your distribution's preferred service manager such as <code>systemd</code>. We <code>synctl</code> or your distribution's preferred service manager such as <code>systemd</code>. We
recommend the use of <code>systemd</code> where available: for information on setting up recommend the use of <code>systemd</code> where available: for information on setting up
<code>systemd</code> to start synapse workers, see <code>systemd</code> to start synapse workers, see
<a href="systemd-with-workers">Systemd with Workers</a>. To use <code>synctl</code>, see <a href="systemd-with-workers/">Systemd with Workers</a>. To use <code>synctl</code>, see
<a href="synctl_workers.html">Using synctl with Workers</a>.</p> <a href="synctl_workers.html">Using synctl with Workers</a>.</p>
<h2 id="available-worker-applications"><a class="header" href="#available-worker-applications">Available worker applications</a></h2> <h2 id="available-worker-applications"><a class="header" href="#available-worker-applications">Available worker applications</a></h2>
<h3 id="synapseappgeneric_worker"><a class="header" href="#synapseappgeneric_worker"><code>synapse.app.generic_worker</code></a></h3> <h3 id="synapseappgeneric_worker"><a class="header" href="#synapseappgeneric_worker"><code>synapse.app.generic_worker</code></a></h3>
@ -10648,7 +10648,7 @@ An <code>event_creator</code> listens for requests from clients to create new ev
so. It will then pass those events over HTTP replication to any configured event so. It will then pass those events over HTTP replication to any configured event
persisters (or the main process if none are configured).</p> persisters (or the main process if none are configured).</p>
<p>Note that <code>event_creator</code>s and <code>event_persister</code>s are implemented using the same <p>Note that <code>event_creator</code>s and <code>event_persister</code>s are implemented using the same
<a href="workers.html#synapse.app.generic_worker"><code>synapse.app.generic_worker</code></a>.</p> <a href="workers.html#synapseappgeneric_worker"><code>synapse.app.generic_worker</code></a>.</p>
<p>An example <a href="usage/configuration/config_documentation.html#stream_writers"><code>stream_writers</code></a> <p>An example <a href="usage/configuration/config_documentation.html#stream_writers"><code>stream_writers</code></a>
configuration with multiple writers:</p> configuration with multiple writers:</p>
<pre><code class="language-yaml">stream_writers: <pre><code class="language-yaml">stream_writers:
@ -11033,7 +11033,7 @@ the changes being applied at a glance.</p>
<p>Many of the API calls in the admin api will require an <code>access_token</code> for a <p>Many of the API calls in the admin api will require an <code>access_token</code> for a
server admin. (Note that a server admin is distinct from a room admin.)</p> server admin. (Note that a server admin is distinct from a room admin.)</p>
<p>An existing user can be marked as a server admin by updating the database directly.</p> <p>An existing user can be marked as a server admin by updating the database directly.</p>
<p>Check your <a href="usage/administration/admin_api/config_documentation.html#database">database settings</a> in the configuration file, connect to the correct database using either <code>psql [database name]</code> (if using PostgreSQL) or <code>sqlite3 path/to/your/database.db</code> (if using SQLite) and elevate the user <code>@foo:bar.com</code> to administrator.</p> <p>Check your <a href="usage/administration/admin_api/../../configuration/config_documentation.html#database">database settings</a> in the configuration file, connect to the correct database using either <code>psql [database name]</code> (if using PostgreSQL) or <code>sqlite3 path/to/your/database.db</code> (if using SQLite) and elevate the user <code>@foo:bar.com</code> to administrator.</p>
<pre><code class="language-sql">UPDATE users SET admin = 1 WHERE name = '@foo:bar.com'; <pre><code class="language-sql">UPDATE users SET admin = 1 WHERE name = '@foo:bar.com';
</code></pre> </code></pre>
<p>A new server admin user can also be created using the <code>register_new_matrix_user</code> <p>A new server admin user can also be created using the <code>register_new_matrix_user</code>
@ -11050,10 +11050,10 @@ providing the token as either a query parameter or a request header. To add it a
<pre><code class="language-sh">curl --header &quot;Authorization: Bearer &lt;access_token&gt;&quot; &lt;the_rest_of_your_API_request&gt; <pre><code class="language-sh">curl --header &quot;Authorization: Bearer &lt;access_token&gt;&quot; &lt;the_rest_of_your_API_request&gt;
</code></pre> </code></pre>
<p>For example, suppose we want to <p>For example, suppose we want to
<a href="usage/administration/admin_api/user_admin_api.html#query-user-account">query the account</a> of the user <a href="usage/administration/admin_api/../../../admin_api/user_admin_api.html#query-user-account">query the account</a> of the user
<code>@foo:bar.com</code>. We need an admin access token (e.g. <code>@foo:bar.com</code>. We need an admin access token (e.g.
<code>syt_AjfVef2_L33JNpafeif_0feKJfeaf0CQpoZk</code>), and we need to know which port <code>syt_AjfVef2_L33JNpafeif_0feKJfeaf0CQpoZk</code>), and we need to know which port
Synapse's <a href="usage/administration/admin_api/config_documentation.html#listeners"><code>client</code> listener</a> is listening Synapse's <a href="usage/administration/admin_api/../../configuration/config_documentation.html#listeners"><code>client</code> listener</a> is listening
on (e.g. <code>8008</code>). Then we can use the following command to request the account on (e.g. <code>8008</code>). Then we can use the following command to request the account
information from the Admin API.</p> information from the Admin API.</p>
<pre><code class="language-sh">curl --header &quot;Authorization: Bearer syt_AjfVef2_L33JNpafeif_0feKJfeaf0CQpoZk&quot; -X GET http://127.0.0.1:8008/_synapse/admin/v2/users/@foo:bar.com <pre><code class="language-sh">curl --header &quot;Authorization: Bearer syt_AjfVef2_L33JNpafeif_0feKJfeaf0CQpoZk&quot; -X GET http://127.0.0.1:8008/_synapse/admin/v2/users/@foo:bar.com
@ -11065,7 +11065,7 @@ information from the Admin API.</p>
use it, you must enable the account validity feature (under use it, you must enable the account validity feature (under
<code>account_validity</code>) in Synapse's configuration.</p> <code>account_validity</code>) in Synapse's configuration.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="admin_api/../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="admin_api/../usage/administration/admin_api/">Admin API</a>.</p>
<h2 id="renew-account"><a class="header" href="#renew-account">Renew account</a></h2> <h2 id="renew-account"><a class="header" href="#renew-account">Renew account</a></h2>
<p>This API extends the validity of an account by as much time as configured in the <p>This API extends the validity of an account by as much time as configured in the
<code>period</code> parameter from the <code>account_validity</code> configuration.</p> <code>period</code> parameter from the <code>account_validity</code> configuration.</p>
@ -11162,7 +11162,7 @@ background updates which won't be cancelled once started.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="show-reported-events"><a class="header" href="#show-reported-events">Show reported events</a></h1> <div style="break-before: page; page-break-before: always;"></div><h1 id="show-reported-events"><a class="header" href="#show-reported-events">Show reported events</a></h1>
<p>This API returns information about reported events.</p> <p>This API returns information about reported events.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="admin_api/../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="admin_api/../usage/administration/admin_api/">Admin API</a>.</p>
<p>The api is:</p> <p>The api is:</p>
<pre><code>GET /_synapse/admin/v1/event_reports?from=0&amp;limit=10 <pre><code>GET /_synapse/admin/v1/event_reports?from=0&amp;limit=10
</code></pre> </code></pre>
@ -11317,7 +11317,7 @@ have a canonical alias set.</li>
<p>Details about the format of the <code>media_id</code> and storage of the media in the file system <p>Details about the format of the <code>media_id</code> and storage of the media in the file system
are documented under <a href="admin_api/../media_repository.html">media repository</a>.</p> are documented under <a href="admin_api/../media_repository.html">media repository</a>.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="admin_api/../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="admin_api/../usage/administration/admin_api/">Admin API</a>.</p>
<h2 id="list-all-media-in-a-room"><a class="header" href="#list-all-media-in-a-room">List all media in a room</a></h2> <h2 id="list-all-media-in-a-room"><a class="header" href="#list-all-media-in-a-room">List all media in a room</a></h2>
<p>This API gets a list of known media in a room. <p>This API gets a list of known media in a room.
However, it only shows media from unencrypted events or rooms.</p> However, it only shows media from unencrypted events or rooms.</p>
@ -11534,7 +11534,7 @@ paginate further back in the room from the point being purged from.</p>
<p>Note that Synapse requires at least one message in each room, so it will never <p>Note that Synapse requires at least one message in each room, so it will never
delete the last message in a room.</p> delete the last message in a room.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="admin_api/../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="admin_api/../usage/administration/admin_api/">Admin API</a>.</p>
<p>The API is:</p> <p>The API is:</p>
<pre><code>POST /_synapse/admin/v1/purge_history/&lt;room_id&gt;[/&lt;event_id&gt;] <pre><code>POST /_synapse/admin/v1/purge_history/&lt;room_id&gt;[/&lt;event_id&gt;]
</code></pre> </code></pre>
@ -11655,7 +11655,7 @@ registration requests, as proposed in
and stabilised in version 1.2 of the Matrix specification. and stabilised in version 1.2 of the Matrix specification.
To use it, you will need to enable the <code>registration_requires_token</code> config To use it, you will need to enable the <code>registration_requires_token</code> config
option, and authenticate by providing an <code>access_token</code> for a server admin: option, and authenticate by providing an <code>access_token</code> for a server admin:
see <a href="usage/administration/admin_api/../admin_api">Admin API</a>.</p> see <a href="usage/administration/admin_api/../admin_api/">Admin API</a>.</p>
<h2 id="registration-token-objects"><a class="header" href="#registration-token-objects">Registration token objects</a></h2> <h2 id="registration-token-objects"><a class="header" href="#registration-token-objects">Registration token objects</a></h2>
<p>Most endpoints make use of JSON objects that contain details about tokens. <p>Most endpoints make use of JSON objects that contain details about tokens.
These objects have the following fields:</p> These objects have the following fields:</p>
@ -11892,7 +11892,7 @@ to a room with a given <code>room_id_or_alias</code>. You can only modify the me
local users. The server administrator must be in the room and have permission to local users. The server administrator must be in the room and have permission to
invite users.</p> invite users.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="admin_api/../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="admin_api/../usage/administration/admin_api/">Admin API</a>.</p>
<h2 id="parameters"><a class="header" href="#parameters">Parameters</a></h2> <h2 id="parameters"><a class="header" href="#parameters">Parameters</a></h2>
<p>The following parameters are available:</p> <p>The following parameters are available:</p>
<ul> <ul>
@ -11917,7 +11917,7 @@ for a server admin: see <a href="admin_api/../usage/administration/admin_api">Ad
server. There are various parameters available that allow for filtering and server. There are various parameters available that allow for filtering and
sorting the returned list. This API supports pagination.</p> sorting the returned list. This API supports pagination.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="admin_api/../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="admin_api/../usage/administration/admin_api/">Admin API</a>.</p>
<p><strong>Parameters</strong></p> <p><strong>Parameters</strong></p>
<p>The following query parameters are available:</p> <p>The following query parameters are available:</p>
<ul> <ul>
@ -12275,7 +12275,7 @@ If the room does not define a type, the value will be <code>null</code>.</li>
sent to a room in a given timeframe. There are various parameters available sent to a room in a given timeframe. There are various parameters available
that allow for filtering and ordering the returned list. This API supports pagination.</p> that allow for filtering and ordering the returned list. This API supports pagination.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="admin_api/../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="admin_api/../usage/administration/admin_api/">Admin API</a>.</p>
<p>This endpoint mirrors the <a href="https://spec.matrix.org/v1.1/client-server-api/#get_matrixclientv3roomsroomidmessages">Matrix Spec defined Messages API</a>.</p> <p>This endpoint mirrors the <a href="https://spec.matrix.org/v1.1/client-server-api/#get_matrixclientv3roomsroomidmessages">Matrix Spec defined Messages API</a>.</p>
<p>The API is:</p> <p>The API is:</p>
<pre><code>GET /_synapse/admin/v1/rooms/&lt;room_id&gt;/messages <pre><code>GET /_synapse/admin/v1/rooms/&lt;room_id&gt;/messages
@ -12900,7 +12900,7 @@ can be used. See <a href="admin_api/../server_notices.html">the server notices d
<p>Returns information about all local media usage of users. Gives the <p>Returns information about all local media usage of users. Gives the
possibility to filter them by time and user.</p> possibility to filter them by time and user.</p>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="admin_api/../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="admin_api/../usage/administration/admin_api/">Admin API</a>.</p>
<p>The API is:</p> <p>The API is:</p>
<pre><code>GET /_synapse/admin/v1/statistics/users/media <pre><code>GET /_synapse/admin/v1/statistics/users/media
</code></pre> </code></pre>
@ -12974,7 +12974,7 @@ about the user and their local media. Objects contain the following fields:
</ul> </ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="user-admin-api"><a class="header" href="#user-admin-api">User Admin API</a></h1> <div style="break-before: page; page-break-before: always;"></div><h1 id="user-admin-api"><a class="header" href="#user-admin-api">User Admin API</a></h1>
<p>To use it, you will need to authenticate by providing an <code>access_token</code> <p>To use it, you will need to authenticate by providing an <code>access_token</code>
for a server admin: see <a href="admin_api/../usage/administration/admin_api">Admin API</a>.</p> for a server admin: see <a href="admin_api/../usage/administration/admin_api/">Admin API</a>.</p>
<h2 id="query-user-account"><a class="header" href="#query-user-account">Query User Account</a></h2> <h2 id="query-user-account"><a class="header" href="#query-user-account">Query User Account</a></h2>
<p>This API returns information about a specific user account.</p> <p>This API returns information about a specific user account.</p>
<p>The api is:</p> <p>The api is:</p>
@ -14099,7 +14099,7 @@ the remote server before trying again, in ms. This is <code>0</code> if no furth
<li><code>failure_ts</code> - nullable integer - The first time Synapse tried and failed to reach the <li><code>failure_ts</code> - nullable integer - The first time Synapse tried and failed to reach the
remote server, in ms. This is <code>null</code> if communication with the remote server has never failed.</li> remote server, in ms. This is <code>null</code> if communication with the remote server has never failed.</li>
<li><code>last_successful_stream_ordering</code> - nullable integer - The stream ordering of the most <li><code>last_successful_stream_ordering</code> - nullable integer - The stream ordering of the most
recent successfully-sent <a href="usage/administration/admin_api/understanding_synapse_through_grafana_graphs.html#federation">PDU</a> recent successfully-sent <a href="usage/administration/admin_api/../understanding_synapse_through_grafana_graphs.html#federation">PDU</a>
to this destination, or <code>null</code> if this information has not been tracked yet.</li> to this destination, or <code>null</code> if this information has not been tracked yet.</li>
</ul> </ul>
</li> </li>
@ -14172,7 +14172,7 @@ Room objects contain the following fields:
<ul> <ul>
<li><code>room_id</code> - string - The ID of the room.</li> <li><code>room_id</code> - string - The ID of the room.</li>
<li><code>stream_ordering</code> - integer - The stream ordering of the most recent <li><code>stream_ordering</code> - integer - The stream ordering of the most recent
successfully-sent <a href="usage/administration/admin_api/understanding_synapse_through_grafana_graphs.html#federation">PDU</a> successfully-sent <a href="usage/administration/admin_api/../understanding_synapse_through_grafana_graphs.html#federation">PDU</a>
to this destination in this room.</li> to this destination in this room.</li>
</ul> </ul>
</li> </li>
@ -14616,7 +14616,7 @@ option. By default, statistics are sent to Matrix.org.</p>
consider using one of the following known implementations:</p> consider using one of the following known implementations:</p>
<ul> <ul>
<li><a href="https://github.com/matrix-org/panopticon">Matrix.org's Panopticon</a></li> <li><a href="https://github.com/matrix-org/panopticon">Matrix.org's Panopticon</a></li>
<li><a href="https://gitlab.com/famedly/company/devops/services/barad-dur">Famedly's Barad-dûr</a></li> <li><a href="https://gitlab.com/famedly/infra/services/barad-dur">Famedly's Barad-dûr</a></li>
</ul> </ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="monthly-active-users"><a class="header" href="#monthly-active-users">Monthly Active Users</a></h1> <div style="break-before: page; page-break-before: always;"></div><h1 id="monthly-active-users"><a class="header" href="#monthly-active-users">Monthly Active Users</a></h1>
<p>Synapse can be configured to record the number of monthly active users (also referred to as MAU) on a given homeserver. <p>Synapse can be configured to record the number of monthly active users (also referred to as MAU) on a given homeserver.
@ -14928,7 +14928,7 @@ WHERE room_stats_state.room_id = event_json.room_id&quot; | psql -d synapse -h l
<h2 id="compression-tool"><a class="header" href="#compression-tool">Compression tool</a></h2> <h2 id="compression-tool"><a class="header" href="#compression-tool">Compression tool</a></h2>
<p>There is a tool at https://github.com/matrix-org/rust-synapse-compress-state which can compress the <code>state_groups_state</code> on a room by-room basis (essentially, it reduces the number of &quot;full&quot; state groups). This can result in dramatic reductions of the storage used.</p> <p>There is a tool at https://github.com/matrix-org/rust-synapse-compress-state which can compress the <code>state_groups_state</code> on a room by-room basis (essentially, it reduces the number of &quot;full&quot; state groups). This can result in dramatic reductions of the storage used.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="request-log-format"><a class="header" href="#request-log-format">Request log format</a></h1> <div style="break-before: page; page-break-before: always;"></div><h1 id="request-log-format"><a class="header" href="#request-log-format">Request log format</a></h1>
<p>HTTP request logs are written by synapse (see <a href="usage/administration/../synapse/http/site.py"><code>site.py</code></a> for details).</p> <p>HTTP request logs are written by synapse (see <a href="https://github.com/matrix-org/synapse/tree/develop/synapse/http/site.py"><code>synapse/http/site.py</code></a> for details).</p>
<p>See the following for how to decode the dense data available from the default logging configuration.</p> <p>See the following for how to decode the dense data available from the default logging configuration.</p>
<pre><code>2020-10-01 12:00:00,000 - synapse.access.http.8008 - 311 - INFO - PUT-1000- 192.168.0.1 - 8008 - {another-matrix-server.com} Processed request: 0.100sec/-0.000sec (0.000sec, 0.000sec) (0.001sec/0.090sec/3) 11B !200 &quot;PUT /_matrix/federation/v1/send/1600000000000 HTTP/1.1&quot; &quot;Synapse/1.20.1&quot; [0 dbevts] <pre><code>2020-10-01 12:00:00,000 - synapse.access.http.8008 - 311 - INFO - PUT-1000- 192.168.0.1 - 8008 - {another-matrix-server.com} Processed request: 0.100sec/-0.000sec (0.000sec, 0.000sec) (0.001sec/0.090sec/3) 11B !200 &quot;PUT /_matrix/federation/v1/send/1600000000000 HTTP/1.1&quot; &quot;Synapse/1.20.1&quot; [0 dbevts]
-AAAAAAAAAAAAAAAAAAAAA- -BBBBBBBBBBBBBBBBBBBBBB- -C- -DD- -EEEEEE- -FFFFFFFFF- -GG- -HHHHHHHHHHHHHHHHHHHHHHH- -IIIIII- -JJJJJJJ- -KKKKKK-, -LLLLLL- -MMMMMMM- -NNNNNN- O -P- -QQ- -RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR- -SSSSSSSSSSSS- -TTTTTT- -AAAAAAAAAAAAAAAAAAAAA- -BBBBBBBBBBBBBBBBBBBBBB- -C- -DD- -EEEEEE- -FFFFFFFFF- -GG- -HHHHHHHHHHHHHHHHHHHHHHH- -IIIIII- -JJJJJJJ- -KKKKKK-, -LLLLLL- -MMMMMMM- -NNNNNN- O -P- -QQ- -RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR- -SSSSSSSSSSSS- -TTTTTT-
@ -14964,7 +14964,7 @@ response and will simultaneously return with the first request, but with very
small processing times.</p> small processing times.</p>
<div style="break-before: page; page-break-before: always;"></div><h2 id="admin-faq"><a class="header" href="#admin-faq">Admin FAQ</a></h2> <div style="break-before: page; page-break-before: always;"></div><h2 id="admin-faq"><a class="header" href="#admin-faq">Admin FAQ</a></h2>
<h2 id="how-do-i-become-a-server-admin"><a class="header" href="#how-do-i-become-a-server-admin">How do I become a server admin?</a></h2> <h2 id="how-do-i-become-a-server-admin"><a class="header" href="#how-do-i-become-a-server-admin">How do I become a server admin?</a></h2>
<p>If your server already has an admin account you should use the <a href="usage/administration/../../admin_api/user_admin_api.html#Change-whether-a-user-is-a-server-administrator-or-not">User Admin API</a> to promote other accounts to become admins.</p> <p>If your server already has an admin account you should use the <a href="usage/administration/../../admin_api/user_admin_api.html#change-whether-a-user-is-a-server-administrator-or-not">User Admin API</a> to promote other accounts to become admins.</p>
<p>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.</p> <p>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.</p>
<pre><code class="language-sql">UPDATE users SET admin = 1 WHERE name = '@foo:bar.com'; <pre><code class="language-sql">UPDATE users SET admin = 1 WHERE name = '@foo:bar.com';
</code></pre> </code></pre>
@ -15032,7 +15032,7 @@ error (typically along the lines of &quot;Invalid signature&quot;). They might s
something like the following in their logs:</p> something like the following in their logs:</p>
<pre><code>2019-09-11 19:32:04,271 - synapse.federation.transport.server - 288 - WARNING - GET-11752 - authenticate_request failed: 401: Invalid signature for server &lt;server&gt; with key ed25519:a_EqML: Unable to verify signature for &lt;server&gt; <pre><code>2019-09-11 19:32:04,271 - synapse.federation.transport.server - 288 - WARNING - GET-11752 - authenticate_request failed: 401: Invalid signature for server &lt;server&gt; with key ed25519:a_EqML: Unable to verify signature for &lt;server&gt;
</code></pre> </code></pre>
<p>This is normally caused by a misconfiguration in your reverse-proxy. See <a href="usage/administration/docs/reverse_proxy.html">the reverse proxy docs</a> and double-check that your settings are correct.</p> <p>This is normally caused by a misconfiguration in your reverse-proxy. See <a href="usage/administration/../../reverse_proxy.html">the reverse proxy docs</a> and double-check that your settings are correct.</p>
<h2 id="help-synapse-is-slow-and-eats-all-my-ramcpu"><a class="header" href="#help-synapse-is-slow-and-eats-all-my-ramcpu">Help!! Synapse is slow and eats all my RAM/CPU!</a></h2> <h2 id="help-synapse-is-slow-and-eats-all-my-ramcpu"><a class="header" href="#help-synapse-is-slow-and-eats-all-my-ramcpu">Help!! Synapse is slow and eats all my RAM/CPU!</a></h2>
<p>First, ensure you are running the latest version of Synapse, using Python 3 <p>First, ensure you are running the latest version of Synapse, using Python 3
with a <a href="usage/administration/../../postgres.html">PostgreSQL database</a>.</p> with a <a href="usage/administration/../../postgres.html">PostgreSQL database</a>.</p>
@ -15154,8 +15154,8 @@ Synapse developers.
regarding Synapse's Admin API, which is used mostly by sysadmins and external regarding Synapse's Admin API, which is used mostly by sysadmins and external
service developers.</p> service developers.</p>
<p>Synapse's code style is documented <a href="development/../code_style.html">here</a>. Please follow <p>Synapse's code style is documented <a href="development/../code_style.html">here</a>. Please follow
it, including the conventions for the <a href="development/../code_style.html#configuration-file-format">sample configuration it, including the conventions for <a href="development/../code_style.html#configuration-code-and-documentation-format">configuration
file</a>.</p> options and documentation</a>.</p>
<p>We welcome improvements and additions to our documentation itself! When <p>We welcome improvements and additions to our documentation itself! When
writing new pages, please writing new pages, please
<a href="https://github.com/matrix-org/synapse/tree/develop/docs#adding-to-the-documentation">build <code>docs</code> to a book</a> <a href="https://github.com/matrix-org/synapse/tree/develop/docs#adding-to-the-documentation">build <code>docs</code> to a book</a>
@ -15169,7 +15169,7 @@ or <code>maturin develop</code> (if installed) to rebuild the Rust code. Using <
is quicker than <code>poetry install</code>, so is recommended when making frequent is quicker than <code>poetry install</code>, so is recommended when making frequent
changes to the Rust code.</p> changes to the Rust code.</p>
<h1 id="8-test-test-test"><a class="header" href="#8-test-test-test">8. Test, test, test!</a></h1> <h1 id="8-test-test-test"><a class="header" href="#8-test-test-test">8. Test, test, test!</a></h1>
<p><a name="test-test-test"></a></p> <p><a name="test-test-test" id="test-test-test"></a></p>
<p>While you're developing and before submitting a patch, you'll <p>While you're developing and before submitting a patch, you'll
want to test your code.</p> want to test your code.</p>
<h2 id="run-the-linters"><a class="header" href="#run-the-linters">Run the linters.</a></h2> <h2 id="run-the-linters"><a class="header" href="#run-the-linters">Run the linters.</a></h2>
@ -15376,8 +15376,7 @@ chicken-and-egg problem.</p>
<ol> <ol>
<li> <li>
<p>Open the PR without a changelog file, see what number you got, and <em>then</em> <p>Open the PR without a changelog file, see what number you got, and <em>then</em>
add the changelog file to your branch (see <a href="development/contributing_guide.html#updating-your-pull-request">Updating your pull add the changelog file to your branch, or:</p>
request</a>), or:</p>
</li> </li>
<li> <li>
<p>Look at the <a href="https://github.com/matrix-org/synapse/issues?q=">list of all <p>Look at the <a href="https://github.com/matrix-org/synapse/issues?q=">list of all

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -238,7 +238,7 @@ The latest version of Synapse can be installed from <a href="#matrixorg-packages
<a href="https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15/standard/">https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15/standard/</a></p> <a href="https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15/standard/">https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15/standard/</a></p>
<h4 id="archlinux"><a class="header" href="#archlinux">ArchLinux</a></h4> <h4 id="archlinux"><a class="header" href="#archlinux">ArchLinux</a></h4>
<p>The quickest way to get up and running with ArchLinux is probably with the community package <p>The quickest way to get up and running with ArchLinux is probably with the community package
<a href="https://www.archlinux.org/packages/community/any/matrix-synapse/">https://www.archlinux.org/packages/community/any/matrix-synapse/</a>, which should pull in most of <a href="https://archlinux.org/packages/community/x86_64/matrix-synapse/">https://archlinux.org/packages/community/x86_64/matrix-synapse/</a>, which should pull in most of
the necessary dependencies.</p> the necessary dependencies.</p>
<p>pip may be outdated (6.0.7-1 and needs to be upgraded to 6.0.8-1 ):</p> <p>pip may be outdated (6.0.7-1 and needs to be upgraded to 6.0.8-1 ):</p>
<pre><code class="language-sh">sudo pip install --upgrade pip <pre><code class="language-sh">sudo pip install --upgrade pip

View file

@ -290,7 +290,7 @@ specified in the config. It is located at
<a href="https://github.com/matrix-org/synapse/blob/develop/synapse/handlers/oidc.py"><code>synapse.handlers.oidc.JinjaOidcMappingProvider</code></a>.</p> <a href="https://github.com/matrix-org/synapse/blob/develop/synapse/handlers/oidc.py"><code>synapse.handlers.oidc.JinjaOidcMappingProvider</code></a>.</p>
<h2 id="saml-mapping-providers"><a class="header" href="#saml-mapping-providers">SAML Mapping Providers</a></h2> <h2 id="saml-mapping-providers"><a class="header" href="#saml-mapping-providers">SAML Mapping Providers</a></h2>
<p>The SAML mapping provider can be customized by editing the <p>The SAML mapping provider can be customized by editing the
<a href="docs/usage/configuration/config_documentation.html#saml2_config"><code>saml2_config.user_mapping_provider.module</code></a> <a href="usage/configuration/config_documentation.html#saml2_config"><code>saml2_config.user_mapping_provider.module</code></a>
config option.</p> config option.</p>
<p><code>saml2_config.user_mapping_provider.config</code> allows you to provide custom <p><code>saml2_config.user_mapping_provider.config</code> allows you to provide custom
configuration options to the module. Check with the module's documentation for configuration options to the module. Check with the module's documentation for

View file

@ -791,8 +791,8 @@ federation requests.</p>
<a href="https://matrix-org.github.io/synapse/latest/admin_api/rooms.html#delete-room-api">Delete Room API</a>.</p> <a href="https://matrix-org.github.io/synapse/latest/admin_api/rooms.html#delete-room-api">Delete Room API</a>.</p>
<h2 id="user-interactive-authentication-fallback-templates-can-now-display-errors"><a class="header" href="#user-interactive-authentication-fallback-templates-can-now-display-errors">User-interactive authentication fallback templates can now display errors</a></h2> <h2 id="user-interactive-authentication-fallback-templates-can-now-display-errors"><a class="header" href="#user-interactive-authentication-fallback-templates-can-now-display-errors">User-interactive authentication fallback templates can now display errors</a></h2>
<p>This may affect you if you make use of custom HTML templates for the <p>This may affect you if you make use of custom HTML templates for the
<a href="../synapse/res/templates/recaptcha.html">reCAPTCHA</a> or <a href="https://github.com/matrix-org/synapse/tree/develop/synapse/res/templates/recaptcha.html">reCAPTCHA (<code>synapse/res/templates/recaptcha.html</code>)</a> or
<a href="../synapse/res/templates/terms.html">terms</a> fallback pages.</p> <a href="https://github.com/matrix-org/synapse/tree/develop/synapse/res/templates/terms.html">terms (<code>synapse/res/templates/terms.html</code>)</a> fallback pages.</p>
<p>The template is now provided an <code>error</code> variable if the authentication <p>The template is now provided an <code>error</code> variable if the authentication
process failed. See the default templates linked above for an example.</p> process failed. See the default templates linked above for an example.</p>
<h2 id="removal-of-out-of-date-email-pushers"><a class="header" href="#removal-of-out-of-date-email-pushers">Removal of out-of-date email pushers</a></h2> <h2 id="removal-of-out-of-date-email-pushers"><a class="header" href="#removal-of-out-of-date-email-pushers">Removal of out-of-date email pushers</a></h2>
@ -1256,7 +1256,7 @@ INSERT INTO background_updates (update_name, progress_json, depends_on) VALUES
is configured to use SSO and a custom is configured to use SSO and a custom
<code>sso_redirect_confirm_template_dir</code> configuration then these templates <code>sso_redirect_confirm_template_dir</code> configuration then these templates
will need to be copied from will need to be copied from
<a href="synapse/res/templates">synapse/res/templates</a> into that directory.</p> <a href="https://github.com/matrix-org/synapse/tree/develop/synapse/res/templates"><code>synapse/res/templates</code></a> into that directory.</p>
<h2 id="synapse-sso-plugins-method-deprecation"><a class="header" href="#synapse-sso-plugins-method-deprecation">Synapse SSO Plugins Method Deprecation</a></h2> <h2 id="synapse-sso-plugins-method-deprecation"><a class="header" href="#synapse-sso-plugins-method-deprecation">Synapse SSO Plugins Method Deprecation</a></h2>
<p>Plugins using the <code>complete_sso_login</code> method of <p>Plugins using the <code>complete_sso_login</code> method of
<code>synapse.module_api.ModuleApi</code> should update to using the async/await <code>synapse.module_api.ModuleApi</code> should update to using the async/await

View file

@ -215,7 +215,7 @@ the remote server before trying again, in ms. This is <code>0</code> if no furth
<li><code>failure_ts</code> - nullable integer - The first time Synapse tried and failed to reach the <li><code>failure_ts</code> - nullable integer - The first time Synapse tried and failed to reach the
remote server, in ms. This is <code>null</code> if communication with the remote server has never failed.</li> remote server, in ms. This is <code>null</code> if communication with the remote server has never failed.</li>
<li><code>last_successful_stream_ordering</code> - nullable integer - The stream ordering of the most <li><code>last_successful_stream_ordering</code> - nullable integer - The stream ordering of the most
recent successfully-sent <a href="understanding_synapse_through_grafana_graphs.html#federation">PDU</a> recent successfully-sent <a href="../understanding_synapse_through_grafana_graphs.html#federation">PDU</a>
to this destination, or <code>null</code> if this information has not been tracked yet.</li> to this destination, or <code>null</code> if this information has not been tracked yet.</li>
</ul> </ul>
</li> </li>
@ -288,7 +288,7 @@ Room objects contain the following fields:
<ul> <ul>
<li><code>room_id</code> - string - The ID of the room.</li> <li><code>room_id</code> - string - The ID of the room.</li>
<li><code>stream_ordering</code> - integer - The stream ordering of the most recent <li><code>stream_ordering</code> - integer - The stream ordering of the most recent
successfully-sent <a href="understanding_synapse_through_grafana_graphs.html#federation">PDU</a> successfully-sent <a href="../understanding_synapse_through_grafana_graphs.html#federation">PDU</a>
to this destination in this room.</li> to this destination in this room.</li>
</ul> </ul>
</li> </li>

View file

@ -151,7 +151,7 @@
<p>Many of the API calls in the admin api will require an <code>access_token</code> for a <p>Many of the API calls in the admin api will require an <code>access_token</code> for a
server admin. (Note that a server admin is distinct from a room admin.)</p> server admin. (Note that a server admin is distinct from a room admin.)</p>
<p>An existing user can be marked as a server admin by updating the database directly.</p> <p>An existing user can be marked as a server admin by updating the database directly.</p>
<p>Check your <a href="config_documentation.html#database">database settings</a> in the configuration file, connect to the correct database using either <code>psql [database name]</code> (if using PostgreSQL) or <code>sqlite3 path/to/your/database.db</code> (if using SQLite) and elevate the user <code>@foo:bar.com</code> to administrator.</p> <p>Check your <a href="../../configuration/config_documentation.html#database">database settings</a> in the configuration file, connect to the correct database using either <code>psql [database name]</code> (if using PostgreSQL) or <code>sqlite3 path/to/your/database.db</code> (if using SQLite) and elevate the user <code>@foo:bar.com</code> to administrator.</p>
<pre><code class="language-sql">UPDATE users SET admin = 1 WHERE name = '@foo:bar.com'; <pre><code class="language-sql">UPDATE users SET admin = 1 WHERE name = '@foo:bar.com';
</code></pre> </code></pre>
<p>A new server admin user can also be created using the <code>register_new_matrix_user</code> <p>A new server admin user can also be created using the <code>register_new_matrix_user</code>
@ -168,10 +168,10 @@ providing the token as either a query parameter or a request header. To add it a
<pre><code class="language-sh">curl --header &quot;Authorization: Bearer &lt;access_token&gt;&quot; &lt;the_rest_of_your_API_request&gt; <pre><code class="language-sh">curl --header &quot;Authorization: Bearer &lt;access_token&gt;&quot; &lt;the_rest_of_your_API_request&gt;
</code></pre> </code></pre>
<p>For example, suppose we want to <p>For example, suppose we want to
<a href="user_admin_api.html#query-user-account">query the account</a> of the user <a href="../../../admin_api/user_admin_api.html#query-user-account">query the account</a> of the user
<code>@foo:bar.com</code>. We need an admin access token (e.g. <code>@foo:bar.com</code>. We need an admin access token (e.g.
<code>syt_AjfVef2_L33JNpafeif_0feKJfeaf0CQpoZk</code>), and we need to know which port <code>syt_AjfVef2_L33JNpafeif_0feKJfeaf0CQpoZk</code>), and we need to know which port
Synapse's <a href="config_documentation.html#listeners"><code>client</code> listener</a> is listening Synapse's <a href="../../configuration/config_documentation.html#listeners"><code>client</code> listener</a> is listening
on (e.g. <code>8008</code>). Then we can use the following command to request the account on (e.g. <code>8008</code>). Then we can use the following command to request the account
information from the Admin API.</p> information from the Admin API.</p>
<pre><code class="language-sh">curl --header &quot;Authorization: Bearer syt_AjfVef2_L33JNpafeif_0feKJfeaf0CQpoZk&quot; -X GET http://127.0.0.1:8008/_synapse/admin/v2/users/@foo:bar.com <pre><code class="language-sh">curl --header &quot;Authorization: Bearer syt_AjfVef2_L33JNpafeif_0feKJfeaf0CQpoZk&quot; -X GET http://127.0.0.1:8008/_synapse/admin/v2/users/@foo:bar.com

View file

@ -153,7 +153,7 @@ registration requests, as proposed in
and stabilised in version 1.2 of the Matrix specification. and stabilised in version 1.2 of the Matrix specification.
To use it, you will need to enable the <code>registration_requires_token</code> config To use it, you will need to enable the <code>registration_requires_token</code> config
option, and authenticate by providing an <code>access_token</code> for a server admin: option, and authenticate by providing an <code>access_token</code> for a server admin:
see <a href="../admin_api">Admin API</a>.</p> see <a href="../admin_api/">Admin API</a>.</p>
<h2 id="registration-token-objects"><a class="header" href="#registration-token-objects">Registration token objects</a></h2> <h2 id="registration-token-objects"><a class="header" href="#registration-token-objects">Registration token objects</a></h2>
<p>Most endpoints make use of JSON objects that contain details about tokens. <p>Most endpoints make use of JSON objects that contain details about tokens.
These objects have the following fields:</p> These objects have the following fields:</p>

View file

@ -148,7 +148,7 @@
<h2 id="admin-faq"><a class="header" href="#admin-faq">Admin FAQ</a></h2> <h2 id="admin-faq"><a class="header" href="#admin-faq">Admin FAQ</a></h2>
<h2 id="how-do-i-become-a-server-admin"><a class="header" href="#how-do-i-become-a-server-admin">How do I become a server admin?</a></h2> <h2 id="how-do-i-become-a-server-admin"><a class="header" href="#how-do-i-become-a-server-admin">How do I become a server admin?</a></h2>
<p>If your server already has an admin account you should use the <a href="../../admin_api/user_admin_api.html#Change-whether-a-user-is-a-server-administrator-or-not">User Admin API</a> to promote other accounts to become admins.</p> <p>If your server already has an admin account you should use the <a href="../../admin_api/user_admin_api.html#change-whether-a-user-is-a-server-administrator-or-not">User Admin API</a> to promote other accounts to become admins.</p>
<p>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.</p> <p>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.</p>
<pre><code class="language-sql">UPDATE users SET admin = 1 WHERE name = '@foo:bar.com'; <pre><code class="language-sql">UPDATE users SET admin = 1 WHERE name = '@foo:bar.com';
</code></pre> </code></pre>
@ -216,7 +216,7 @@ error (typically along the lines of &quot;Invalid signature&quot;). They might s
something like the following in their logs:</p> something like the following in their logs:</p>
<pre><code>2019-09-11 19:32:04,271 - synapse.federation.transport.server - 288 - WARNING - GET-11752 - authenticate_request failed: 401: Invalid signature for server &lt;server&gt; with key ed25519:a_EqML: Unable to verify signature for &lt;server&gt; <pre><code>2019-09-11 19:32:04,271 - synapse.federation.transport.server - 288 - WARNING - GET-11752 - authenticate_request failed: 401: Invalid signature for server &lt;server&gt; with key ed25519:a_EqML: Unable to verify signature for &lt;server&gt;
</code></pre> </code></pre>
<p>This is normally caused by a misconfiguration in your reverse-proxy. See <a href="docs/reverse_proxy.html">the reverse proxy docs</a> and double-check that your settings are correct.</p> <p>This is normally caused by a misconfiguration in your reverse-proxy. See <a href="../../reverse_proxy.html">the reverse proxy docs</a> and double-check that your settings are correct.</p>
<h2 id="help-synapse-is-slow-and-eats-all-my-ramcpu"><a class="header" href="#help-synapse-is-slow-and-eats-all-my-ramcpu">Help!! Synapse is slow and eats all my RAM/CPU!</a></h2> <h2 id="help-synapse-is-slow-and-eats-all-my-ramcpu"><a class="header" href="#help-synapse-is-slow-and-eats-all-my-ramcpu">Help!! Synapse is slow and eats all my RAM/CPU!</a></h2>
<p>First, ensure you are running the latest version of Synapse, using Python 3 <p>First, ensure you are running the latest version of Synapse, using Python 3
with a <a href="../../postgres.html">PostgreSQL database</a>.</p> with a <a href="../../postgres.html">PostgreSQL database</a>.</p>

View file

@ -218,7 +218,7 @@ option. By default, statistics are sent to Matrix.org.</p>
consider using one of the following known implementations:</p> consider using one of the following known implementations:</p>
<ul> <ul>
<li><a href="https://github.com/matrix-org/panopticon">Matrix.org's Panopticon</a></li> <li><a href="https://github.com/matrix-org/panopticon">Matrix.org's Panopticon</a></li>
<li><a href="https://gitlab.com/famedly/company/devops/services/barad-dur">Famedly's Barad-dûr</a></li> <li><a href="https://gitlab.com/famedly/infra/services/barad-dur">Famedly's Barad-dûr</a></li>
</ul> </ul>
</main> </main>

View file

@ -147,7 +147,7 @@
</div> </div>
<h1 id="request-log-format"><a class="header" href="#request-log-format">Request log format</a></h1> <h1 id="request-log-format"><a class="header" href="#request-log-format">Request log format</a></h1>
<p>HTTP request logs are written by synapse (see <a href="../synapse/http/site.py"><code>site.py</code></a> for details).</p> <p>HTTP request logs are written by synapse (see <a href="https://github.com/matrix-org/synapse/tree/develop/synapse/http/site.py"><code>synapse/http/site.py</code></a> for details).</p>
<p>See the following for how to decode the dense data available from the default logging configuration.</p> <p>See the following for how to decode the dense data available from the default logging configuration.</p>
<pre><code>2020-10-01 12:00:00,000 - synapse.access.http.8008 - 311 - INFO - PUT-1000- 192.168.0.1 - 8008 - {another-matrix-server.com} Processed request: 0.100sec/-0.000sec (0.000sec, 0.000sec) (0.001sec/0.090sec/3) 11B !200 &quot;PUT /_matrix/federation/v1/send/1600000000000 HTTP/1.1&quot; &quot;Synapse/1.20.1&quot; [0 dbevts] <pre><code>2020-10-01 12:00:00,000 - synapse.access.http.8008 - 311 - INFO - PUT-1000- 192.168.0.1 - 8008 - {another-matrix-server.com} Processed request: 0.100sec/-0.000sec (0.000sec, 0.000sec) (0.001sec/0.090sec/3) 11B !200 &quot;PUT /_matrix/federation/v1/send/1600000000000 HTTP/1.1&quot; &quot;Synapse/1.20.1&quot; [0 dbevts]
-AAAAAAAAAAAAAAAAAAAAA- -BBBBBBBBBBBBBBBBBBBBBB- -C- -DD- -EEEEEE- -FFFFFFFFF- -GG- -HHHHHHHHHHHHHHHHHHHHHHH- -IIIIII- -JJJJJJJ- -KKKKKK-, -LLLLLL- -MMMMMMM- -NNNNNN- O -P- -QQ- -RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR- -SSSSSSSSSSSS- -TTTTTT- -AAAAAAAAAAAAAAAAAAAAA- -BBBBBBBBBBBBBBBBBBBBBB- -C- -DD- -EEEEEE- -FFFFFFFFF- -GG- -HHHHHHHHHHHHHHHHHHHHHHH- -IIIIII- -JJJJJJJ- -KKKKKK-, -LLLLLL- -MMMMMMM- -NNNNNN- O -P- -QQ- -RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR- -SSSSSSSSSSSS- -TTTTTT-

View file

@ -1276,7 +1276,7 @@ connection pool. For a reference to valid arguments, see:</p>
<ul> <ul>
<li>for <a href="https://docs.python.org/3/library/sqlite3.html#sqlite3.connect">sqlite</a></li> <li>for <a href="https://docs.python.org/3/library/sqlite3.html#sqlite3.connect">sqlite</a></li>
<li>for <a href="https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS">postgres</a></li> <li>for <a href="https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS">postgres</a></li>
<li>for <a href="https://twistedmatrix.com/documents/current/api/twisted.enterprise.adbapi.ConnectionPool.html#__init__">the connection pool</a></li> <li>for <a href="https://docs.twistedmatrix.com/en/stable/api/twisted.enterprise.adbapi.ConnectionPool.html#__init__">the connection pool</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -3545,7 +3545,7 @@ other workers.</p>
<hr /> <hr />
<h3 id="worker_daemonize"><a class="header" href="#worker_daemonize"><code>worker_daemonize</code></a></h3> <h3 id="worker_daemonize"><a class="header" href="#worker_daemonize"><code>worker_daemonize</code></a></h3>
<p>Specifies whether the worker should be started as a daemon process. <p>Specifies whether the worker should be started as a daemon process.
If Synapse is being managed by <a href="../../systemd-with-workers/README.html">systemd</a>, this option If Synapse is being managed by <a href="../../systemd-with-workers/">systemd</a>, this option
must be omitted or set to <code>false</code>.</p> must be omitted or set to <code>false</code>.</p>
<p>Defaults to <code>false</code>.</p> <p>Defaults to <code>false</code>.</p>
<p>Example configuration:</p> <p>Example configuration:</p>

View file

@ -283,7 +283,7 @@ endpoints to the worker (<code>localhost:8083</code> in the above example).</p>
<code>synctl</code> or your distribution's preferred service manager such as <code>systemd</code>. We <code>synctl</code> or your distribution's preferred service manager such as <code>systemd</code>. We
recommend the use of <code>systemd</code> where available: for information on setting up recommend the use of <code>systemd</code> where available: for information on setting up
<code>systemd</code> to start synapse workers, see <code>systemd</code> to start synapse workers, see
<a href="systemd-with-workers">Systemd with Workers</a>. To use <code>synctl</code>, see <a href="systemd-with-workers/">Systemd with Workers</a>. To use <code>synctl</code>, see
<a href="synctl_workers.html">Using synctl with Workers</a>.</p> <a href="synctl_workers.html">Using synctl with Workers</a>.</p>
<h2 id="available-worker-applications"><a class="header" href="#available-worker-applications">Available worker applications</a></h2> <h2 id="available-worker-applications"><a class="header" href="#available-worker-applications">Available worker applications</a></h2>
<h3 id="synapseappgeneric_worker"><a class="header" href="#synapseappgeneric_worker"><code>synapse.app.generic_worker</code></a></h3> <h3 id="synapseappgeneric_worker"><a class="header" href="#synapseappgeneric_worker"><code>synapse.app.generic_worker</code></a></h3>
@ -504,7 +504,7 @@ An <code>event_creator</code> listens for requests from clients to create new ev
so. It will then pass those events over HTTP replication to any configured event so. It will then pass those events over HTTP replication to any configured event
persisters (or the main process if none are configured).</p> persisters (or the main process if none are configured).</p>
<p>Note that <code>event_creator</code>s and <code>event_persister</code>s are implemented using the same <p>Note that <code>event_creator</code>s and <code>event_persister</code>s are implemented using the same
<a href="#synapse.app.generic_worker"><code>synapse.app.generic_worker</code></a>.</p> <a href="#synapseappgeneric_worker"><code>synapse.app.generic_worker</code></a>.</p>
<p>An example <a href="usage/configuration/config_documentation.html#stream_writers"><code>stream_writers</code></a> <p>An example <a href="usage/configuration/config_documentation.html#stream_writers"><code>stream_writers</code></a>
configuration with multiple writers:</p> configuration with multiple writers:</p>
<pre><code class="language-yaml">stream_writers: <pre><code class="language-yaml">stream_writers: