installation.html 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633
  1. <!DOCTYPE HTML>
  2. <html lang="en" class="sidebar-visible no-js light">
  3. <head>
  4. <!-- Book generated using mdBook -->
  5. <meta charset="UTF-8">
  6. <title>Installation - Synapse</title>
  7. <!-- Custom HTML head -->
  8. <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  9. <meta name="description" content="">
  10. <meta name="viewport" content="width=device-width, initial-scale=1">
  11. <meta name="theme-color" content="#ffffff" />
  12. <link rel="icon" href="../favicon.svg">
  13. <link rel="shortcut icon" href="../favicon.png">
  14. <link rel="stylesheet" href="../css/variables.css">
  15. <link rel="stylesheet" href="../css/general.css">
  16. <link rel="stylesheet" href="../css/chrome.css">
  17. <link rel="stylesheet" href="../css/print.css" media="print">
  18. <!-- Fonts -->
  19. <link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
  20. <link rel="stylesheet" href="../fonts/fonts.css">
  21. <!-- Highlight.js Stylesheets -->
  22. <link rel="stylesheet" href="../highlight.css">
  23. <link rel="stylesheet" href="../tomorrow-night.css">
  24. <link rel="stylesheet" href="../ayu-highlight.css">
  25. <!-- Custom theme stylesheets -->
  26. <link rel="stylesheet" href="../docs/website_files/table-of-contents.css">
  27. <link rel="stylesheet" href="../docs/website_files/remove-nav-buttons.css">
  28. <link rel="stylesheet" href="../docs/website_files/indent-section-headers.css">
  29. <link rel="stylesheet" href="../docs/website_files/version-picker.css">
  30. </head>
  31. <body>
  32. <!-- Provide site root to javascript -->
  33. <script type="text/javascript">
  34. var path_to_root = "../";
  35. var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
  36. </script>
  37. <!-- Work around some values being stored in localStorage wrapped in quotes -->
  38. <script type="text/javascript">
  39. try {
  40. var theme = localStorage.getItem('mdbook-theme');
  41. var sidebar = localStorage.getItem('mdbook-sidebar');
  42. if (theme.startsWith('"') && theme.endsWith('"')) {
  43. localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
  44. }
  45. if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
  46. localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
  47. }
  48. } catch (e) { }
  49. </script>
  50. <!-- Set the theme before any content is loaded, prevents flash -->
  51. <script type="text/javascript">
  52. var theme;
  53. try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
  54. if (theme === null || theme === undefined) { theme = default_theme; }
  55. var html = document.querySelector('html');
  56. html.classList.remove('no-js')
  57. html.classList.remove('light')
  58. html.classList.add(theme);
  59. html.classList.add('js');
  60. </script>
  61. <!-- Hide / unhide sidebar before it is displayed -->
  62. <script type="text/javascript">
  63. var html = document.querySelector('html');
  64. var sidebar = 'hidden';
  65. if (document.body.clientWidth >= 1080) {
  66. try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
  67. sidebar = sidebar || 'visible';
  68. }
  69. html.classList.remove('sidebar-visible');
  70. html.classList.add("sidebar-" + sidebar);
  71. </script>
  72. <nav id="sidebar" class="sidebar" aria-label="Table of contents">
  73. <div class="sidebar-scrollbox">
  74. <ol class="chapter"><li class="chapter-item expanded affix "><li class="part-title">Introduction</li><li class="chapter-item expanded "><a href="../welcome_and_overview.html">Welcome and Overview</a></li><li class="chapter-item expanded affix "><li class="part-title">Setup</li><li class="chapter-item expanded "><a href="../setup/installation.html" class="active">Installation</a></li><li class="chapter-item expanded "><a href="../postgres.html">Using Postgres</a></li><li class="chapter-item expanded "><a href="../reverse_proxy.html">Configuring a Reverse Proxy</a></li><li class="chapter-item expanded "><a href="../setup/forward_proxy.html">Configuring a Forward/Outbound Proxy</a></li><li class="chapter-item expanded "><a href="../turn-howto.html">Configuring a Turn Server</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../setup/turn/coturn.html">coturn TURN server</a></li><li class="chapter-item expanded "><a href="../setup/turn/eturnal.html">eturnal TURN server</a></li></ol></li><li class="chapter-item expanded "><a href="../delegate.html">Delegation</a></li><li class="chapter-item expanded affix "><li class="part-title">Upgrading</li><li class="chapter-item expanded "><a href="../upgrade.html">Upgrading between Synapse Versions</a></li><li class="chapter-item expanded affix "><li class="part-title">Usage</li><li class="chapter-item expanded "><a href="../federate.html">Federation</a></li><li class="chapter-item expanded "><a href="../usage/configuration/index.html">Configuration</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../usage/configuration/config_documentation.html">Configuration Manual</a></li><li class="chapter-item expanded "><a href="../usage/configuration/homeserver_sample_config.html">Homeserver Sample Config File</a></li><li class="chapter-item expanded "><a href="../usage/configuration/logging_sample_config.html">Logging Sample Config File</a></li><li class="chapter-item expanded "><a href="../structured_logging.html">Structured Logging</a></li><li class="chapter-item expanded "><a href="../templates.html">Templates</a></li><li class="chapter-item expanded "><a href="../usage/configuration/user_authentication/index.html">User Authentication</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../usage/configuration/user_authentication/single_sign_on/index.html">Single-Sign On</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../openid.html">OpenID Connect</a></li><li class="chapter-item expanded "><a href="../usage/configuration/user_authentication/single_sign_on/saml.html">SAML</a></li><li class="chapter-item expanded "><a href="../usage/configuration/user_authentication/single_sign_on/cas.html">CAS</a></li><li class="chapter-item expanded "><a href="../sso_mapping_providers.html">SSO Mapping Providers</a></li></ol></li><li class="chapter-item expanded "><a href="../password_auth_providers.html">Password Auth Providers</a></li><li class="chapter-item expanded "><a href="../jwt.html">JSON Web Tokens</a></li><li class="chapter-item expanded "><a href="../usage/configuration/user_authentication/refresh_tokens.html">Refresh Tokens</a></li></ol></li><li class="chapter-item expanded "><a href="../CAPTCHA_SETUP.html">Registration Captcha</a></li><li class="chapter-item expanded "><a href="../application_services.html">Application Services</a></li><li class="chapter-item expanded "><a href="../server_notices.html">Server Notices</a></li><li class="chapter-item expanded "><a href="../consent_tracking.html">Consent Tracking</a></li><li class="chapter-item expanded "><a href="../user_directory.html">User Directory</a></li><li class="chapter-item expanded "><a href="../message_retention_policies.html">Message Retention Policies</a></li><li class="chapter-item expanded "><a href="../modules/index.html">Pluggable Modules</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../modules/writing_a_module.html">Writing a module</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../modules/spam_checker_callbacks.html">Spam checker callbacks</a></li><li class="chapter-item expanded "><a href="../modules/third_party_rules_callbacks.html">Third-party rules callbacks</a></li><li class="chapter-item expanded "><a href="../modules/presence_router_callbacks.html">Presence router callbacks</a></li><li class="chapter-item expanded "><a href="../modules/account_validity_callbacks.html">Account validity callbacks</a></li><li class="chapter-item expanded "><a href="../modules/password_auth_provider_callbacks.html">Password auth provider callbacks</a></li><li class="chapter-item expanded "><a href="../modules/background_update_controller_callbacks.html">Background update controller callbacks</a></li><li class="chapter-item expanded "><a href="../modules/account_data_callbacks.html">Account data callbacks</a></li><li class="chapter-item expanded "><a href="../modules/porting_legacy_module.html">Porting a legacy module to the new interface</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../workers.html">Workers</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../synctl_workers.html">Using synctl with Workers</a></li><li class="chapter-item expanded "><a href="../systemd-with-workers/index.html">Systemd</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../usage/administration/index.html">Administration</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../usage/administration/admin_api/index.html">Admin API</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../admin_api/account_validity.html">Account Validity</a></li><li class="chapter-item expanded "><a href="../usage/administration/admin_api/background_updates.html">Background Updates</a></li><li class="chapter-item expanded "><a href="../admin_api/event_reports.html">Event Reports</a></li><li class="chapter-item expanded "><a href="../admin_api/experimental_features.html">Experimental Features</a></li><li class="chapter-item expanded "><a href="../admin_api/media_admin_api.html">Media</a></li><li class="chapter-item expanded "><a href="../admin_api/purge_history_api.html">Purge History</a></li><li class="chapter-item expanded "><a href="../admin_api/register_api.html">Register Users</a></li><li class="chapter-item expanded "><a href="../usage/administration/admin_api/registration_tokens.html">Registration Tokens</a></li><li class="chapter-item expanded "><a href="../admin_api/room_membership.html">Manipulate Room Membership</a></li><li class="chapter-item expanded "><a href="../admin_api/rooms.html">Rooms</a></li><li class="chapter-item expanded "><a href="../admin_api/server_notices.html">Server Notices</a></li><li class="chapter-item expanded "><a href="../admin_api/statistics.html">Statistics</a></li><li class="chapter-item expanded "><a href="../admin_api/user_admin_api.html">Users</a></li><li class="chapter-item expanded "><a href="../admin_api/version_api.html">Server Version</a></li><li class="chapter-item expanded "><a href="../usage/administration/admin_api/federation.html">Federation</a></li></ol></li><li class="chapter-item expanded "><a href="../manhole.html">Manhole</a></li><li class="chapter-item expanded "><a href="../metrics-howto.html">Monitoring</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../usage/administration/monitoring/reporting_homeserver_usage_statistics.html">Reporting Homeserver Usage Statistics</a></li></ol></li><li class="chapter-item expanded "><a href="../usage/administration/monthly_active_users.html">Monthly Active Users</a></li><li class="chapter-item expanded "><a href="../usage/administration/understanding_synapse_through_grafana_graphs.html">Understanding Synapse Through Grafana Graphs</a></li><li class="chapter-item expanded "><a href="../usage/administration/useful_sql_for_admins.html">Useful SQL for Admins</a></li><li class="chapter-item expanded "><a href="../usage/administration/database_maintenance_tools.html">Database Maintenance Tools</a></li><li class="chapter-item expanded "><a href="../usage/administration/state_groups.html">State Groups</a></li><li class="chapter-item expanded "><a href="../usage/administration/request_log.html">Request log format</a></li><li class="chapter-item expanded "><a href="../usage/administration/admin_faq.html">Admin FAQ</a></li><li class="chapter-item expanded "><div>Scripts</div></li></ol></li><li class="chapter-item expanded "><li class="part-title">Development</li><li class="chapter-item expanded "><a href="../development/contributing_guide.html">Contributing Guide</a></li><li class="chapter-item expanded "><a href="../code_style.html">Code Style</a></li><li class="chapter-item expanded "><a href="../development/reviews.html">Reviewing Code</a></li><li class="chapter-item expanded "><a href="../development/releases.html">Release Cycle</a></li><li class="chapter-item expanded "><a href="../development/git.html">Git Usage</a></li><li class="chapter-item expanded "><div>Testing</div></li><li><ol class="section"><li class="chapter-item expanded "><a href="../development/demo.html">Demo scripts</a></li></ol></li><li class="chapter-item expanded "><a href="../opentracing.html">OpenTracing</a></li><li class="chapter-item expanded "><a href="../development/database_schema.html">Database Schemas</a></li><li class="chapter-item expanded "><a href="../development/experimental_features.html">Experimental features</a></li><li class="chapter-item expanded "><a href="../development/dependencies.html">Dependency management</a></li><li class="chapter-item expanded "><div>Synapse Architecture</div></li><li><ol class="section"><li class="chapter-item expanded "><a href="../development/synapse_architecture/cancellation.html">Cancellation</a></li><li class="chapter-item expanded "><a href="../log_contexts.html">Log Contexts</a></li><li class="chapter-item expanded "><a href="../replication.html">Replication</a></li><li class="chapter-item expanded "><a href="../development/synapse_architecture/streams.html">Streams</a></li><li class="chapter-item expanded "><a href="../tcp_replication.html">TCP Replication</a></li><li class="chapter-item expanded "><a href="../development/synapse_architecture/faster_joins.html">Faster remote joins</a></li></ol></li><li class="chapter-item expanded "><a href="../development/internal_documentation/index.html">Internal Documentation</a></li><li><ol class="section"><li class="chapter-item expanded "><div>Single Sign-On</div></li><li><ol class="section"><li class="chapter-item expanded "><a href="../development/saml.html">SAML</a></li><li class="chapter-item expanded "><a href="../development/cas.html">CAS</a></li></ol></li><li class="chapter-item expanded "><a href="../development/room-dag-concepts.html">Room DAG concepts</a></li><li class="chapter-item expanded "><div>State Resolution</div></li><li><ol class="section"><li class="chapter-item expanded "><a href="../auth_chain_difference_algorithm.html">The Auth Chain Difference Algorithm</a></li></ol></li><li class="chapter-item expanded "><a href="../media_repository.html">Media Repository</a></li><li class="chapter-item expanded "><a href="../room_and_user_statistics.html">Room and User Statistics</a></li></ol></li><li class="chapter-item expanded "><div>Scripts</div></li><li class="chapter-item expanded affix "><li class="part-title">Other</li><li class="chapter-item expanded "><a href="../deprecation_policy.html">Dependency Deprecation Policy</a></li><li class="chapter-item expanded "><a href="../other/running_synapse_on_single_board_computers.html">Running Synapse on a Single-Board Computer</a></li></ol>
  75. </div>
  76. <div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
  77. </nav>
  78. <div id="page-wrapper" class="page-wrapper">
  79. <div class="page">
  80. <div id="menu-bar-hover-placeholder"></div>
  81. <div id="menu-bar" class="menu-bar sticky bordered">
  82. <div class="left-buttons">
  83. <button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
  84. <i class="fa fa-bars"></i>
  85. </button>
  86. <button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
  87. <i class="fa fa-paint-brush"></i>
  88. </button>
  89. <ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
  90. <li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
  91. <li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
  92. <li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
  93. <li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
  94. <li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
  95. </ul>
  96. <button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
  97. <i class="fa fa-search"></i>
  98. </button>
  99. <div class="version-picker">
  100. <div class="dropdown">
  101. <div class="select">
  102. <span></span>
  103. <i class="fa fa-chevron-down"></i>
  104. </div>
  105. <input type="hidden" name="version">
  106. <ul class="dropdown-menu">
  107. <!-- Versions will be added dynamically in version-picker.js -->
  108. </ul>
  109. </div>
  110. </div>
  111. </div>
  112. <h1 class="menu-title">Synapse</h1>
  113. <div class="right-buttons">
  114. <a href="../print.html" title="Print this book" aria-label="Print this book">
  115. <i id="print-button" class="fa fa-print"></i>
  116. </a>
  117. <a href="https://github.com/matrix-org/synapse" title="Git repository" aria-label="Git repository">
  118. <i id="git-repository-button" class="fa fa-github"></i>
  119. </a>
  120. <a href="https://github.com/matrix-org/synapse/edit/develop/docs/setup/installation.md" title="Suggest an edit" aria-label="Suggest an edit">
  121. <i id="git-edit-button" class="fa fa-edit"></i>
  122. </a>
  123. </div>
  124. </div>
  125. <div id="search-wrapper" class="hidden">
  126. <form id="searchbar-outer" class="searchbar-outer">
  127. <input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
  128. </form>
  129. <div id="searchresults-outer" class="searchresults-outer hidden">
  130. <div id="searchresults-header" class="searchresults-header"></div>
  131. <ul id="searchresults">
  132. </ul>
  133. </div>
  134. </div>
  135. <!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
  136. <script type="text/javascript">
  137. document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
  138. document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
  139. Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
  140. link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
  141. });
  142. </script>
  143. <div id="content" class="content">
  144. <main>
  145. <!-- Page table of contents -->
  146. <div class="sidetoc">
  147. <nav class="pagetoc"></nav>
  148. </div>
  149. <h1 id="installation-instructions"><a class="header" href="#installation-instructions">Installation Instructions</a></h1>
  150. <h2 id="choosing-your-server-name"><a class="header" href="#choosing-your-server-name">Choosing your server name</a></h2>
  151. <p>It is important to choose the name for your server before you install Synapse,
  152. because it cannot be changed later.</p>
  153. <p>The server name determines the &quot;domain&quot; part of user-ids for users on your
  154. server: these will all be of the format <code>@user:my.domain.name</code>. It also
  155. determines how other matrix servers will reach yours for federation.</p>
  156. <p>For a test configuration, set this to the hostname of your server. For a more
  157. production-ready setup, you will probably want to specify your domain
  158. (<code>example.com</code>) rather than a matrix-specific hostname here (in the same way
  159. that your email address is probably <code>user@example.com</code> rather than
  160. <code>user@email.example.com</code>) - but doing so may require more advanced setup: see
  161. <a href="../federate.html">Setting up Federation</a>.</p>
  162. <h2 id="installing-synapse"><a class="header" href="#installing-synapse">Installing Synapse</a></h2>
  163. <h3 id="prebuilt-packages"><a class="header" href="#prebuilt-packages">Prebuilt packages</a></h3>
  164. <p>Prebuilt packages are available for a number of platforms. These are recommended
  165. for most users.</p>
  166. <h4 id="docker-images-and-ansible-playbooks"><a class="header" href="#docker-images-and-ansible-playbooks">Docker images and Ansible playbooks</a></h4>
  167. <p>There is an official synapse image available at
  168. <a href="https://hub.docker.com/r/matrixdotorg/synapse">https://hub.docker.com/r/matrixdotorg/synapse</a> or at <a href="https://ghcr.io/matrix-org/synapse"><code>ghcr.io/matrix-org/synapse</code></a>
  169. which can be used with the docker-compose file available at
  170. <a href="https://github.com/matrix-org/synapse/tree/develop/contrib/docker">contrib/docker</a>.
  171. Further information on this including configuration options is available in the README
  172. on hub.docker.com.</p>
  173. <p>Alternatively, Andreas Peters (previously Silvio Fricke) has contributed a
  174. Dockerfile to automate a synapse server in a single Docker image, at
  175. <a href="https://hub.docker.com/r/avhost/docker-matrix/tags/">https://hub.docker.com/r/avhost/docker-matrix/tags/</a></p>
  176. <p>Slavi Pantaleev has created an Ansible playbook,
  177. which installs the official Docker image of Matrix Synapse
  178. along with many other Matrix-related services (Postgres database, Element, coturn,
  179. ma1sd, SSL support, etc.).
  180. For more details, see
  181. <a href="https://github.com/spantaleev/matrix-docker-ansible-deploy">https://github.com/spantaleev/matrix-docker-ansible-deploy</a></p>
  182. <h4 id="debianubuntu"><a class="header" href="#debianubuntu">Debian/Ubuntu</a></h4>
  183. <h5 id="matrixorg-packages"><a class="header" href="#matrixorg-packages">Matrix.org packages</a></h5>
  184. <p>Matrix.org provides Debian/Ubuntu packages of Synapse, for the amd64
  185. architecture via <a href="https://packages.matrix.org/debian/">https://packages.matrix.org/debian/</a>.</p>
  186. <p>To install the latest release:</p>
  187. <pre><code class="language-sh">sudo apt install -y lsb-release wget apt-transport-https
  188. sudo wget -O /usr/share/keyrings/matrix-org-archive-keyring.gpg https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg
  189. echo &quot;deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian/ $(lsb_release -cs) main&quot; |
  190. sudo tee /etc/apt/sources.list.d/matrix-org.list
  191. sudo apt update
  192. sudo apt install matrix-synapse-py3
  193. </code></pre>
  194. <p>Packages are also published for release candidates. To enable the prerelease
  195. channel, add <code>prerelease</code> to the <code>sources.list</code> line. For example:</p>
  196. <pre><code class="language-sh">sudo wget -O /usr/share/keyrings/matrix-org-archive-keyring.gpg https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg
  197. echo &quot;deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian/ $(lsb_release -cs) main prerelease&quot; |
  198. sudo tee /etc/apt/sources.list.d/matrix-org.list
  199. sudo apt update
  200. sudo apt install matrix-synapse-py3
  201. </code></pre>
  202. <p>The fingerprint of the repository signing key (as shown by <code>gpg /usr/share/keyrings/matrix-org-archive-keyring.gpg</code>) is
  203. <code>AAF9AE843A7584B5A3E4CD2BCF45A512DE2DA058</code>.</p>
  204. <p>When installing with Debian packages, you might prefer to place files in
  205. <code>/etc/matrix-synapse/conf.d/</code> to override your configuration without editing
  206. the main configuration file at <code>/etc/matrix-synapse/homeserver.yaml</code>.
  207. By doing that, you won't be asked if you want to replace your configuration
  208. file when you upgrade the Debian package to a later version.</p>
  209. <h5 id="downstream-debian-packages"><a class="header" href="#downstream-debian-packages">Downstream Debian packages</a></h5>
  210. <p>Andrej Shadura maintains a
  211. <a href="https://packages.debian.org/sid/matrix-synapse"><code>matrix-synapse</code></a> package in
  212. the Debian repositories.
  213. For <code>bookworm</code> and <code>sid</code>, it can be installed simply with:</p>
  214. <pre><code class="language-sh">sudo apt install matrix-synapse
  215. </code></pre>
  216. <p>Synapse is also available in <code>bullseye-backports</code>. Please
  217. see the <a href="https://backports.debian.org/Instructions/">Debian documentation</a>
  218. for information on how to use backports.</p>
  219. <p><code>matrix-synapse</code> is no longer maintained for <code>buster</code> and older.</p>
  220. <h5 id="downstream-ubuntu-packages"><a class="header" href="#downstream-ubuntu-packages">Downstream Ubuntu packages</a></h5>
  221. <p>We do not recommend using the packages in the default Ubuntu repository
  222. at this time, as they are <a href="https://bugs.launchpad.net/ubuntu/+source/matrix-synapse/+bug/1848709">old and suffer from known security vulnerabilities</a>.
  223. The latest version of Synapse can be installed from <a href="#matrixorg-packages">our repository</a>.</p>
  224. <h4 id="fedora"><a class="header" href="#fedora">Fedora</a></h4>
  225. <p>Synapse is in the Fedora repositories as
  226. <a href="https://src.fedoraproject.org/rpms/matrix-synapse"><code>matrix-synapse</code></a>:</p>
  227. <pre><code class="language-sh">sudo dnf install matrix-synapse
  228. </code></pre>
  229. <p>Additionally, Oleg Girko provides Fedora RPMs at
  230. <a href="https://obs.infoserver.lv/project/monitor/matrix-synapse">https://obs.infoserver.lv/project/monitor/matrix-synapse</a></p>
  231. <h4 id="opensuse"><a class="header" href="#opensuse">OpenSUSE</a></h4>
  232. <p>Synapse is in the OpenSUSE repositories as
  233. <a href="https://software.opensuse.org/package/matrix-synapse"><code>matrix-synapse</code></a>:</p>
  234. <pre><code class="language-sh">sudo zypper install matrix-synapse
  235. </code></pre>
  236. <h4 id="suse-linux-enterprise-server"><a class="header" href="#suse-linux-enterprise-server">SUSE Linux Enterprise Server</a></h4>
  237. <p>Unofficial package are built for SLES 15 in the openSUSE:Backports:SLE-15 repository at
  238. <a href="https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15/standard/">https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15/standard/</a></p>
  239. <h4 id="archlinux"><a class="header" href="#archlinux">ArchLinux</a></h4>
  240. <p>The quickest way to get up and running with ArchLinux is probably with the package provided by ArchLinux
  241. <a href="https://archlinux.org/packages/extra/x86_64/matrix-synapse/">https://archlinux.org/packages/extra/x86_64/matrix-synapse/</a>, which should pull in most of
  242. the necessary dependencies.</p>
  243. <p>pip may be outdated (6.0.7-1 and needs to be upgraded to 6.0.8-1 ):</p>
  244. <pre><code class="language-sh">sudo pip install --upgrade pip
  245. </code></pre>
  246. <p>If you encounter an error with lib bcrypt causing an Wrong ELF Class:
  247. ELFCLASS32 (x64 Systems), you may need to reinstall py-bcrypt to correctly
  248. compile it under the right architecture. (This should not be needed if
  249. installing under virtualenv):</p>
  250. <pre><code class="language-sh">sudo pip uninstall py-bcrypt
  251. sudo pip install py-bcrypt
  252. </code></pre>
  253. <h4 id="alpine-linux"><a class="header" href="#alpine-linux">Alpine Linux</a></h4>
  254. <p>6543 maintains <a href="https://pkgs.alpinelinux.org/packages?name=synapse&amp;branch=edge">Synapse packages for Alpine Linux</a> in the community repository. Install with:</p>
  255. <pre><code class="language-sh">sudo apk add synapse
  256. </code></pre>
  257. <h4 id="void-linux"><a class="header" href="#void-linux">Void Linux</a></h4>
  258. <p>Synapse can be found in the void repositories as
  259. <a href="https://github.com/void-linux/void-packages/tree/master/srcpkgs/synapse">'synapse'</a>:</p>
  260. <pre><code class="language-sh">xbps-install -Su
  261. xbps-install -S synapse
  262. </code></pre>
  263. <h4 id="freebsd"><a class="header" href="#freebsd">FreeBSD</a></h4>
  264. <p>Synapse can be installed via FreeBSD Ports or Packages contributed by Brendan Molloy from:</p>
  265. <ul>
  266. <li>Ports: <code>cd /usr/ports/net-im/py-matrix-synapse &amp;&amp; make install clean</code></li>
  267. <li>Packages: <code>pkg install py38-matrix-synapse</code></li>
  268. </ul>
  269. <h4 id="openbsd"><a class="header" href="#openbsd">OpenBSD</a></h4>
  270. <p>As of OpenBSD 6.7 Synapse is available as a pre-compiled binary. The filesystem
  271. underlying the homeserver directory (defaults to <code>/var/synapse</code>) has to be
  272. mounted with <code>wxallowed</code> (cf. <code>mount(8)</code>), so creating a separate filesystem
  273. and mounting it to <code>/var/synapse</code> should be taken into consideration.</p>
  274. <p>Installing Synapse:</p>
  275. <pre><code class="language-sh">doas pkg_add synapse
  276. </code></pre>
  277. <h4 id="nixos"><a class="header" href="#nixos">NixOS</a></h4>
  278. <p>Robin Lambertz has packaged Synapse for NixOS at:
  279. <a href="https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix">https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix</a></p>
  280. <h3 id="installing-as-a-python-module-from-pypi"><a class="header" href="#installing-as-a-python-module-from-pypi">Installing as a Python module from PyPI</a></h3>
  281. <p>It's also possible to install Synapse as a Python module from PyPI.</p>
  282. <p>When following this route please make sure that the <a href="#platform-specific-prerequisites">Platform-specific prerequisites</a> are already installed.</p>
  283. <p>System requirements:</p>
  284. <ul>
  285. <li>POSIX-compliant system (tested on Linux &amp; OS X)</li>
  286. <li>Python 3.8 or later, up to Python 3.11.</li>
  287. <li>At least 1GB of free RAM if you want to join large public rooms like #matrix:matrix.org</li>
  288. </ul>
  289. <p>If building on an uncommon architecture for which pre-built wheels are
  290. unavailable, you will need to have a recent Rust compiler installed. The easiest
  291. way of installing the latest version is to use <a href="https://rustup.rs/">rustup</a>.</p>
  292. <p>To install the Synapse homeserver run:</p>
  293. <pre><code class="language-sh">mkdir -p ~/synapse
  294. virtualenv -p python3 ~/synapse/env
  295. source ~/synapse/env/bin/activate
  296. pip install --upgrade pip
  297. pip install --upgrade setuptools
  298. pip install matrix-synapse
  299. </code></pre>
  300. <p>This will download Synapse from <a href="https://pypi.org/project/matrix-synapse">PyPI</a>
  301. and install it, along with the python libraries it uses, into a virtual environment
  302. under <code>~/synapse/env</code>. Feel free to pick a different directory if you
  303. prefer.</p>
  304. <p>This Synapse installation can then be later upgraded by using pip again with the
  305. update flag:</p>
  306. <pre><code class="language-sh">source ~/synapse/env/bin/activate
  307. pip install -U matrix-synapse
  308. </code></pre>
  309. <p>Before you can start Synapse, you will need to generate a configuration
  310. file. To do this, run (in your virtualenv, as before):</p>
  311. <pre><code class="language-sh">cd ~/synapse
  312. python -m synapse.app.homeserver \
  313. --server-name my.domain.name \
  314. --config-path homeserver.yaml \
  315. --generate-config \
  316. --report-stats=[yes|no]
  317. </code></pre>
  318. <p>... substituting an appropriate value for <code>--server-name</code> and choosing whether
  319. or not to report usage statistics (hostname, Synapse version, uptime, total
  320. users, etc.) to the developers via the <code>--report-stats</code> argument.</p>
  321. <p>This command will generate you a config file that you can then customise, but it will
  322. also generate a set of keys for you. These keys will allow your homeserver to
  323. identify itself to other homeserver, so don't lose or delete them. It would be
  324. wise to back them up somewhere safe. (If, for whatever reason, you do need to
  325. change your homeserver's keys, you may find that other homeserver have the
  326. old key cached. If you update the signing key, you should change the name of the
  327. key in the <code>&lt;server name&gt;.signing.key</code> file (the second word) to something
  328. different. See the <a href="https://matrix.org/docs/spec/server_server/latest.html#retrieving-server-keys">spec</a> for more information on key management).</p>
  329. <p>To actually run your new homeserver, pick a working directory for Synapse to
  330. run (e.g. <code>~/synapse</code>), and:</p>
  331. <pre><code class="language-sh">cd ~/synapse
  332. source env/bin/activate
  333. synctl start
  334. </code></pre>
  335. <h4 id="platform-specific-prerequisites"><a class="header" href="#platform-specific-prerequisites">Platform-specific prerequisites</a></h4>
  336. <p>Synapse is written in Python but some of the libraries it uses are written in
  337. C. So before we can install Synapse itself we need a working C compiler and the
  338. header files for Python C extensions.</p>
  339. <h5 id="debianubunturaspbian"><a class="header" href="#debianubunturaspbian">Debian/Ubuntu/Raspbian</a></h5>
  340. <p>Installing prerequisites on Ubuntu or Debian:</p>
  341. <pre><code class="language-sh">sudo apt install build-essential python3-dev libffi-dev \
  342. python3-pip python3-setuptools sqlite3 \
  343. libssl-dev virtualenv libjpeg-dev libxslt1-dev libicu-dev
  344. </code></pre>
  345. <h5 id="archlinux-1"><a class="header" href="#archlinux-1">ArchLinux</a></h5>
  346. <p>Installing prerequisites on ArchLinux:</p>
  347. <pre><code class="language-sh">sudo pacman -S base-devel python python-pip \
  348. python-setuptools python-virtualenv sqlite3 icu
  349. </code></pre>
  350. <h5 id="centosfedora"><a class="header" href="#centosfedora">CentOS/Fedora</a></h5>
  351. <p>Installing prerequisites on CentOS or Fedora Linux:</p>
  352. <pre><code class="language-sh">sudo dnf install libtiff-devel libjpeg-devel libzip-devel freetype-devel \
  353. libwebp-devel libxml2-devel libxslt-devel libpq-devel \
  354. python3-virtualenv libffi-devel openssl-devel python3-devel \
  355. libicu-devel
  356. sudo dnf groupinstall &quot;Development Tools&quot;
  357. </code></pre>
  358. <h5 id="macos"><a class="header" href="#macos">macOS</a></h5>
  359. <p>Installing prerequisites on macOS:</p>
  360. <p>You may need to install the latest Xcode developer tools:</p>
  361. <pre><code class="language-sh">xcode-select --install
  362. </code></pre>
  363. <p>Some extra dependencies may be needed. You can use Homebrew (https://brew.sh) for them.</p>
  364. <p>You may need to install icu, and make the icu binaries and libraries accessible.
  365. Please follow <a href="https://pypi.org/project/PyICU/">the official instructions of PyICU</a> to do so.</p>
  366. <p>On ARM-based Macs you may also need to install libjpeg and libpq:</p>
  367. <pre><code class="language-sh"> brew install jpeg libpq
  368. </code></pre>
  369. <p>On macOS Catalina (10.15) you may need to explicitly install OpenSSL
  370. via brew and inform <code>pip</code> about it so that <code>psycopg2</code> builds:</p>
  371. <pre><code class="language-sh">brew install openssl@1.1
  372. export LDFLAGS=&quot;-L/usr/local/opt/openssl/lib&quot;
  373. export CPPFLAGS=&quot;-I/usr/local/opt/openssl/include&quot;
  374. </code></pre>
  375. <h5 id="opensuse-1"><a class="header" href="#opensuse-1">OpenSUSE</a></h5>
  376. <p>Installing prerequisites on openSUSE:</p>
  377. <pre><code class="language-sh">sudo zypper in -t pattern devel_basis
  378. sudo zypper in python-pip python-setuptools sqlite3 python-virtualenv \
  379. python-devel libffi-devel libopenssl-devel libjpeg62-devel \
  380. libicu-devel
  381. </code></pre>
  382. <h5 id="openbsd-1"><a class="header" href="#openbsd-1">OpenBSD</a></h5>
  383. <p>A port of Synapse is available under <code>net/synapse</code>. The filesystem
  384. underlying the homeserver directory (defaults to <code>/var/synapse</code>) has to be
  385. mounted with <code>wxallowed</code> (cf. <code>mount(8)</code>), so creating a separate filesystem
  386. and mounting it to <code>/var/synapse</code> should be taken into consideration.</p>
  387. <p>To be able to build Synapse's dependency on python the <code>WRKOBJDIR</code>
  388. (cf. <code>bsd.port.mk(5)</code>) for building python, too, needs to be on a filesystem
  389. mounted with <code>wxallowed</code> (cf. <code>mount(8)</code>).</p>
  390. <p>Creating a <code>WRKOBJDIR</code> for building python under <code>/usr/local</code> (which on a
  391. default OpenBSD installation is mounted with <code>wxallowed</code>):</p>
  392. <pre><code class="language-sh">doas mkdir /usr/local/pobj_wxallowed
  393. </code></pre>
  394. <p>Assuming <code>PORTS_PRIVSEP=Yes</code> (cf. <code>bsd.port.mk(5)</code>) and <code>SUDO=doas</code> are
  395. configured in <code>/etc/mk.conf</code>:</p>
  396. <pre><code class="language-sh">doas chown _pbuild:_pbuild /usr/local/pobj_wxallowed
  397. </code></pre>
  398. <p>Setting the <code>WRKOBJDIR</code> for building python:</p>
  399. <pre><code class="language-sh">echo WRKOBJDIR_lang/python/3.7=/usr/local/pobj_wxallowed \\nWRKOBJDIR_lang/python/2.7=/usr/local/pobj_wxallowed &gt;&gt; /etc/mk.conf
  400. </code></pre>
  401. <p>Building Synapse:</p>
  402. <pre><code class="language-sh">cd /usr/ports/net/synapse
  403. make install
  404. </code></pre>
  405. <h5 id="windows"><a class="header" href="#windows">Windows</a></h5>
  406. <p>Running Synapse natively on Windows is not officially supported.</p>
  407. <p>If you wish to run or develop Synapse on Windows, the Windows Subsystem for
  408. Linux provides a Linux environment which is capable of using the Debian, Fedora,
  409. or source installation methods. More information about WSL can be found at
  410. <a href="https://docs.microsoft.com/en-us/windows/wsl/install">https://docs.microsoft.com/en-us/windows/wsl/install</a> for Windows 10/11 and
  411. <a href="https://docs.microsoft.com/en-us/windows/wsl/install-on-server">https://docs.microsoft.com/en-us/windows/wsl/install-on-server</a> for
  412. Windows Server.</p>
  413. <h2 id="setting-up-synapse"><a class="header" href="#setting-up-synapse">Setting up Synapse</a></h2>
  414. <p>Once you have installed synapse as above, you will need to configure it.</p>
  415. <h3 id="using-postgresql"><a class="header" href="#using-postgresql">Using PostgreSQL</a></h3>
  416. <p>By default Synapse uses an <a href="https://sqlite.org/">SQLite</a> database and in doing so trades
  417. performance for convenience. Almost all installations should opt to use <a href="https://www.postgresql.org">PostgreSQL</a>
  418. instead. Advantages include:</p>
  419. <ul>
  420. <li>significant performance improvements due to the superior threading and
  421. caching model, smarter query optimiser</li>
  422. <li>allowing the DB to be run on separate hardware</li>
  423. </ul>
  424. <p>For information on how to install and use PostgreSQL in Synapse, please see
  425. <a href="../postgres.html">Using Postgres</a></p>
  426. <p>SQLite is only acceptable for testing purposes. SQLite should not be used in
  427. a production server. Synapse will perform poorly when using
  428. SQLite, especially when participating in large rooms.</p>
  429. <h3 id="tls-certificates"><a class="header" href="#tls-certificates">TLS certificates</a></h3>
  430. <p>The default configuration exposes a single HTTP port on the local
  431. interface: <code>http://localhost:8008</code>. It is suitable for local testing,
  432. but for any practical use, you will need Synapse's APIs to be served
  433. over HTTPS.</p>
  434. <p>The recommended way to do so is to set up a reverse proxy on port
  435. <code>8448</code>. You can find documentation on doing so in
  436. <a href="../reverse_proxy.html">the reverse proxy documentation</a>.</p>
  437. <p>Alternatively, you can configure Synapse to expose an HTTPS port. To do
  438. so, you will need to edit <code>homeserver.yaml</code>, as follows:</p>
  439. <ul>
  440. <li>First, under the <code>listeners</code> option, add the configuration for the
  441. TLS-enabled listener like so:</li>
  442. </ul>
  443. <pre><code class="language-yaml">listeners:
  444. - port: 8448
  445. type: http
  446. tls: true
  447. resources:
  448. - names: [client, federation]
  449. </code></pre>
  450. <ul>
  451. <li>
  452. <p>You will also need to add the options <code>tls_certificate_path</code> and
  453. <code>tls_private_key_path</code>. to your configuration file. You will need to manage provisioning of
  454. these certificates yourself.</p>
  455. </li>
  456. <li>
  457. <p>You can find more information about these options as well as how to configure synapse in the
  458. <a href="../usage/configuration/config_documentation.html">configuration manual</a>.</p>
  459. <p>If you are using your own certificate, be sure to use a <code>.pem</code> file that
  460. includes the full certificate chain including any intermediate certificates
  461. (for instance, if using certbot, use <code>fullchain.pem</code> as your certificate, not
  462. <code>cert.pem</code>).</p>
  463. </li>
  464. </ul>
  465. <p>For a more detailed guide to configuring your server for federation, see
  466. <a href="../federate.html">Federation</a>.</p>
  467. <h3 id="client-well-known-uri"><a class="header" href="#client-well-known-uri">Client Well-Known URI</a></h3>
  468. <p>Setting up the client Well-Known URI is optional but if you set it up, it will
  469. allow users to enter their full username (e.g. <code>@user:&lt;server_name&gt;</code>) into clients
  470. which support well-known lookup to automatically configure the homeserver and
  471. identity server URLs. This is useful so that users don't have to memorize or think
  472. about the actual homeserver URL you are using.</p>
  473. <p>The URL <code>https://&lt;server_name&gt;/.well-known/matrix/client</code> should return JSON in
  474. the following format.</p>
  475. <pre><code class="language-json">{
  476. &quot;m.homeserver&quot;: {
  477. &quot;base_url&quot;: &quot;https://&lt;matrix.example.com&gt;&quot;
  478. }
  479. }
  480. </code></pre>
  481. <p>It can optionally contain identity server information as well.</p>
  482. <pre><code class="language-json">{
  483. &quot;m.homeserver&quot;: {
  484. &quot;base_url&quot;: &quot;https://&lt;matrix.example.com&gt;&quot;
  485. },
  486. &quot;m.identity_server&quot;: {
  487. &quot;base_url&quot;: &quot;https://&lt;identity.example.com&gt;&quot;
  488. }
  489. }
  490. </code></pre>
  491. <p>To work in browser based clients, the file must be served with the appropriate
  492. Cross-Origin Resource Sharing (CORS) headers. A recommended value would be
  493. <code>Access-Control-Allow-Origin: *</code> which would allow all browser based clients to
  494. view it.</p>
  495. <p>In nginx this would be something like:</p>
  496. <pre><code class="language-nginx">location /.well-known/matrix/client {
  497. return 200 '{&quot;m.homeserver&quot;: {&quot;base_url&quot;: &quot;https://&lt;matrix.example.com&gt;&quot;}}';
  498. default_type application/json;
  499. add_header Access-Control-Allow-Origin *;
  500. }
  501. </code></pre>
  502. <p>You should also ensure the <code>public_baseurl</code> option in <code>homeserver.yaml</code> is set
  503. correctly. <code>public_baseurl</code> should be set to the URL that clients will use to
  504. connect to your server. This is the same URL you put for the <code>m.homeserver</code>
  505. <code>base_url</code> above.</p>
  506. <pre><code class="language-yaml">public_baseurl: &quot;https://&lt;matrix.example.com&gt;&quot;
  507. </code></pre>
  508. <h3 id="email"><a class="header" href="#email">Email</a></h3>
  509. <p>It is desirable for Synapse to have the capability to send email. This allows
  510. Synapse to send password reset emails, send verifications when an email address
  511. is added to a user's account, and send email notifications to users when they
  512. receive new messages.</p>
  513. <p>To configure an SMTP server for Synapse, modify the configuration section
  514. headed <code>email</code>, and be sure to have at least the <code>smtp_host</code>, <code>smtp_port</code>
  515. and <code>notif_from</code> fields filled out. You may also need to set <code>smtp_user</code>,
  516. <code>smtp_pass</code>, and <code>require_transport_security</code>.</p>
  517. <p>If email is not configured, password reset, registration and notifications via
  518. email will be disabled.</p>
  519. <h3 id="registering-a-user"><a class="header" href="#registering-a-user">Registering a user</a></h3>
  520. <p>One way to create a new user is to do so from a client like
  521. <a href="https://element.io/">Element</a>. This requires registration to be enabled via
  522. the
  523. <a href="../usage/configuration/config_documentation.html#enable_registration"><code>enable_registration</code></a>
  524. setting.</p>
  525. <p>Alternatively, you can create new users from the command line. This can be done as follows:</p>
  526. <ol>
  527. <li>If synapse was installed via pip, activate the virtualenv as follows (if Synapse was
  528. installed via a prebuilt package, <code>register_new_matrix_user</code> should already be
  529. on the search path):
  530. <pre><code class="language-sh">cd ~/synapse
  531. source env/bin/activate
  532. synctl start # if not already running
  533. </code></pre>
  534. </li>
  535. <li>Run the following command:
  536. <pre><code class="language-sh">register_new_matrix_user -c homeserver.yaml
  537. </code></pre>
  538. </li>
  539. </ol>
  540. <p>This will prompt you to add details for the new user, and will then connect to
  541. the running Synapse to create the new user. For example:</p>
  542. <pre><code>New user localpart: erikj
  543. Password:
  544. Confirm password:
  545. Make admin [no]:
  546. Success!
  547. </code></pre>
  548. <p>This process uses a setting
  549. <a href="../usage/configuration/config_documentation.html#registration_shared_secret"><code>registration_shared_secret</code></a>,
  550. which is shared between Synapse itself and the <code>register_new_matrix_user</code>
  551. script. It doesn't matter what it is (a random value is generated by
  552. <code>--generate-config</code>), but it should be kept secret, as anyone with knowledge of
  553. it can register users, including admin accounts, on your server even if
  554. <code>enable_registration</code> is <code>false</code>.</p>
  555. <h3 id="setting-up-a-turn-server"><a class="header" href="#setting-up-a-turn-server">Setting up a TURN server</a></h3>
  556. <p>For reliable VoIP calls to be routed via this homeserver, you MUST configure
  557. a TURN server. See <a href="../turn-howto.html">TURN setup</a> for details.</p>
  558. <h3 id="url-previews"><a class="header" href="#url-previews">URL previews</a></h3>
  559. <p>Synapse includes support for previewing URLs, which is disabled by default. To
  560. turn it on you must enable the <code>url_preview_enabled: True</code> config parameter
  561. and explicitly specify the IP ranges that Synapse is not allowed to spider for
  562. previewing in the <code>url_preview_ip_range_blacklist</code> configuration parameter.
  563. This is critical from a security perspective to stop arbitrary Matrix users
  564. spidering 'internal' URLs on your network. At the very least we recommend that
  565. your loopback and RFC1918 IP addresses are blacklisted.</p>
  566. <p>This also requires the optional <code>lxml</code> python dependency to be installed. This
  567. in turn requires the <code>libxml2</code> library to be available - on Debian/Ubuntu this
  568. means <code>apt-get install libxml2-dev</code>, or equivalent for your OS.</p>
  569. <h3 id="troubleshooting-installation"><a class="header" href="#troubleshooting-installation">Troubleshooting Installation</a></h3>
  570. <p><code>pip</code> seems to leak <em>lots</em> of memory during installation. For instance, a Linux
  571. host with 512MB of RAM may run out of memory whilst installing Twisted. If this
  572. happens, you will have to individually install the dependencies which are
  573. failing, e.g.:</p>
  574. <pre><code class="language-sh">pip install twisted
  575. </code></pre>
  576. <p>If you have any other problems, feel free to ask in
  577. <a href="https://matrix.to/#/#synapse:matrix.org">#synapse:matrix.org</a>.</p>
  578. </main>
  579. <nav class="nav-wrapper" aria-label="Page navigation">
  580. <!-- Mobile navigation buttons -->
  581. <a rel="prev" href="../welcome_and_overview.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
  582. <i class="fa fa-angle-left"></i>
  583. </a>
  584. <a rel="next" href="../postgres.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
  585. <i class="fa fa-angle-right"></i>
  586. </a>
  587. <div style="clear: both"></div>
  588. </nav>
  589. </div>
  590. </div>
  591. <nav class="nav-wide-wrapper" aria-label="Page navigation">
  592. <a rel="prev" href="../welcome_and_overview.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
  593. <i class="fa fa-angle-left"></i>
  594. </a>
  595. <a rel="next" href="../postgres.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
  596. <i class="fa fa-angle-right"></i>
  597. </a>
  598. </nav>
  599. </div>
  600. <script type="text/javascript">
  601. window.playground_copyable = true;
  602. </script>
  603. <script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
  604. <script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
  605. <script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
  606. <script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
  607. <script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
  608. <script src="../book.js" type="text/javascript" charset="utf-8"></script>
  609. <!-- Custom JS scripts -->
  610. <script type="text/javascript" src="../docs/website_files/table-of-contents.js"></script>
  611. <script type="text/javascript" src="../docs/website_files/version-picker.js"></script>
  612. <script type="text/javascript" src="../docs/website_files/version.js"></script>
  613. </body>
  614. </html>