homeserver_sample_config.html 115 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863
  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>Homeserver Sample Config File - 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">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 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 "><a href="../../MSC1711_certificates_FAQ.html">Upgrading from pre-Synapse 1.0</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/homeserver_sample_config.html" class="active">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 "><div>Single-Sign On</div></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../openid.html">OpenID Connect</a></li><li class="chapter-item expanded "><div>SAML</div></li><li class="chapter-item expanded "><div>CAS</div></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></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="../../development/url_previews.html">URL Previews</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/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="../../admin_api/delete_group.html">Delete Group</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/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></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 class="chapter-item expanded "><a href="../../usage/administration/request_log.html">Request log format</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/git.html">Git Usage</a></li><li class="chapter-item expanded "><div>Testing</div></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 "><div>Synapse Architecture</div></li><li><ol class="section"><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="../../tcp_replication.html">TCP Replication</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></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/usage/configuration/homeserver_sample_config.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="homeserver-sample-configuration-file"><a class="header" href="#homeserver-sample-configuration-file">Homeserver Sample Configuration File</a></h1>
  150. <p>Below is a sample homeserver configuration file. The homeserver configuration file
  151. can be tweaked to change the behaviour of your homeserver. A restart of the server is
  152. generally required to apply any changes made to this file.</p>
  153. <p>Note that the contents below are <em>not</em> intended to be copied and used as the basis for
  154. a real homeserver.yaml. Instead, if you are starting from scratch, please generate
  155. a fresh config using Synapse by following the instructions in
  156. <a href="../../setup/installation.html">Installation</a>.</p>
  157. <pre><code class="language-yaml"># This file is maintained as an up-to-date snapshot of the default
  158. # homeserver.yaml configuration generated by Synapse.
  159. #
  160. # It is intended to act as a reference for the default configuration,
  161. # helping admins keep track of new options and other changes, and compare
  162. # their configs with the current default. As such, many of the actual
  163. # config values shown are placeholders.
  164. #
  165. # It is *not* intended to be copied and used as the basis for a real
  166. # homeserver.yaml. Instead, if you are starting from scratch, please generate
  167. # a fresh config using Synapse by following the instructions in
  168. # https://matrix-org.github.io/synapse/latest/setup/installation.html.
  169. # Configuration options that take a time period can be set using a number
  170. # followed by a letter. Letters have the following meanings:
  171. # s = second
  172. # m = minute
  173. # h = hour
  174. # d = day
  175. # w = week
  176. # y = year
  177. # For example, setting redaction_retention_period: 5m would remove redacted
  178. # messages from the database after 5 minutes, rather than 5 months.
  179. ################################################################################
  180. # Configuration file for Synapse.
  181. #
  182. # This is a YAML file: see [1] for a quick introduction. Note in particular
  183. # that *indentation is important*: all the elements of a list or dictionary
  184. # should have the same indentation.
  185. #
  186. # [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
  187. ## Modules ##
  188. # Server admins can expand Synapse's functionality with external modules.
  189. #
  190. # See https://matrix-org.github.io/synapse/latest/modules.html for more
  191. # documentation on how to configure or create custom modules for Synapse.
  192. #
  193. modules:
  194. # - module: my_super_module.MySuperClass
  195. # config:
  196. # do_thing: true
  197. # - module: my_other_super_module.SomeClass
  198. # config: {}
  199. ## Server ##
  200. # The public-facing domain of the server
  201. #
  202. # The server_name name will appear at the end of usernames and room addresses
  203. # created on this server. For example if the server_name was example.com,
  204. # usernames on this server would be in the format @user:example.com
  205. #
  206. # In most cases you should avoid using a matrix specific subdomain such as
  207. # matrix.example.com or synapse.example.com as the server_name for the same
  208. # reasons you wouldn't use user@email.example.com as your email address.
  209. # See https://matrix-org.github.io/synapse/latest/delegate.html
  210. # for information on how to host Synapse on a subdomain while preserving
  211. # a clean server_name.
  212. #
  213. # The server_name cannot be changed later so it is important to
  214. # configure this correctly before you start Synapse. It should be all
  215. # lowercase and may contain an explicit port.
  216. # Examples: matrix.org, localhost:8080
  217. #
  218. server_name: &quot;SERVERNAME&quot;
  219. # When running as a daemon, the file to store the pid in
  220. #
  221. pid_file: DATADIR/homeserver.pid
  222. # The absolute URL to the web client which /_matrix/client will redirect
  223. # to if 'webclient' is configured under the 'listeners' configuration.
  224. #
  225. # This option can be also set to the filesystem path to the web client
  226. # which will be served at /_matrix/client/ if 'webclient' is configured
  227. # under the 'listeners' configuration, however this is a security risk:
  228. # https://github.com/matrix-org/synapse#security-note
  229. #
  230. #web_client_location: https://riot.example.com/
  231. # The public-facing base URL that clients use to access this Homeserver (not
  232. # including _matrix/...). This is the same URL a user might enter into the
  233. # 'Custom Homeserver URL' field on their client. If you use Synapse with a
  234. # reverse proxy, this should be the URL to reach Synapse via the proxy.
  235. # Otherwise, it should be the URL to reach Synapse's client HTTP listener (see
  236. # 'listeners' below).
  237. #
  238. #public_baseurl: https://example.com/
  239. # Set the soft limit on the number of file descriptors synapse can use
  240. # Zero is used to indicate synapse should set the soft limit to the
  241. # hard limit.
  242. #
  243. #soft_file_limit: 0
  244. # Presence tracking allows users to see the state (e.g online/offline)
  245. # of other local and remote users.
  246. #
  247. presence:
  248. # Uncomment to disable presence tracking on this homeserver. This option
  249. # replaces the previous top-level 'use_presence' option.
  250. #
  251. #enabled: false
  252. # Whether to require authentication to retrieve profile data (avatars,
  253. # display names) of other users through the client API. Defaults to
  254. # 'false'. Note that profile data is also available via the federation
  255. # API, unless allow_profile_lookup_over_federation is set to false.
  256. #
  257. #require_auth_for_profile_requests: true
  258. # Uncomment to require a user to share a room with another user in order
  259. # to retrieve their profile information. Only checked on Client-Server
  260. # requests. Profile requests from other servers should be checked by the
  261. # requesting server. Defaults to 'false'.
  262. #
  263. #limit_profile_requests_to_users_who_share_rooms: true
  264. # Uncomment to prevent a user's profile data from being retrieved and
  265. # displayed in a room until they have joined it. By default, a user's
  266. # profile data is included in an invite event, regardless of the values
  267. # of the above two settings, and whether or not the users share a server.
  268. # Defaults to 'true'.
  269. #
  270. #include_profile_data_on_invite: false
  271. # If set to 'true', removes the need for authentication to access the server's
  272. # public rooms directory through the client API, meaning that anyone can
  273. # query the room directory. Defaults to 'false'.
  274. #
  275. #allow_public_rooms_without_auth: true
  276. # If set to 'true', allows any other homeserver to fetch the server's public
  277. # rooms directory via federation. Defaults to 'false'.
  278. #
  279. #allow_public_rooms_over_federation: true
  280. # The default room version for newly created rooms.
  281. #
  282. # Known room versions are listed here:
  283. # https://matrix.org/docs/spec/#complete-list-of-room-versions
  284. #
  285. # For example, for room version 1, default_room_version should be set
  286. # to &quot;1&quot;.
  287. #
  288. #default_room_version: &quot;6&quot;
  289. # The GC threshold parameters to pass to `gc.set_threshold`, if defined
  290. #
  291. #gc_thresholds: [700, 10, 10]
  292. # The minimum time in seconds between each GC for a generation, regardless of
  293. # the GC thresholds. This ensures that we don't do GC too frequently.
  294. #
  295. # A value of `[1s, 10s, 30s]` indicates that a second must pass between consecutive
  296. # generation 0 GCs, etc.
  297. #
  298. # Defaults to `[1s, 10s, 30s]`.
  299. #
  300. #gc_min_interval: [0.5s, 30s, 1m]
  301. # Set the limit on the returned events in the timeline in the get
  302. # and sync operations. The default value is 100. -1 means no upper limit.
  303. #
  304. # Uncomment the following to increase the limit to 5000.
  305. #
  306. #filter_timeline_limit: 5000
  307. # Whether room invites to users on this server should be blocked
  308. # (except those sent by local server admins). The default is False.
  309. #
  310. #block_non_admin_invites: true
  311. # Room searching
  312. #
  313. # If disabled, new messages will not be indexed for searching and users
  314. # will receive errors when searching for messages. Defaults to enabled.
  315. #
  316. #enable_search: false
  317. # Prevent outgoing requests from being sent to the following blacklisted IP address
  318. # CIDR ranges. If this option is not specified then it defaults to private IP
  319. # address ranges (see the example below).
  320. #
  321. # The blacklist applies to the outbound requests for federation, identity servers,
  322. # push servers, and for checking key validity for third-party invite events.
  323. #
  324. # (0.0.0.0 and :: are always blacklisted, whether or not they are explicitly
  325. # listed here, since they correspond to unroutable addresses.)
  326. #
  327. # This option replaces federation_ip_range_blacklist in Synapse v1.25.0.
  328. #
  329. # Note: The value is ignored when an HTTP proxy is in use
  330. #
  331. #ip_range_blacklist:
  332. # - '127.0.0.0/8'
  333. # - '10.0.0.0/8'
  334. # - '172.16.0.0/12'
  335. # - '192.168.0.0/16'
  336. # - '100.64.0.0/10'
  337. # - '192.0.0.0/24'
  338. # - '169.254.0.0/16'
  339. # - '192.88.99.0/24'
  340. # - '198.18.0.0/15'
  341. # - '192.0.2.0/24'
  342. # - '198.51.100.0/24'
  343. # - '203.0.113.0/24'
  344. # - '224.0.0.0/4'
  345. # - '::1/128'
  346. # - 'fe80::/10'
  347. # - 'fc00::/7'
  348. # - '2001:db8::/32'
  349. # - 'ff00::/8'
  350. # - 'fec0::/10'
  351. # List of IP address CIDR ranges that should be allowed for federation,
  352. # identity servers, push servers, and for checking key validity for
  353. # third-party invite events. This is useful for specifying exceptions to
  354. # wide-ranging blacklisted target IP ranges - e.g. for communication with
  355. # a push server only visible in your network.
  356. #
  357. # This whitelist overrides ip_range_blacklist and defaults to an empty
  358. # list.
  359. #
  360. #ip_range_whitelist:
  361. # - '192.168.1.1'
  362. # List of ports that Synapse should listen on, their purpose and their
  363. # configuration.
  364. #
  365. # Options for each listener include:
  366. #
  367. # port: the TCP port to bind to
  368. #
  369. # bind_addresses: a list of local addresses to listen on. The default is
  370. # 'all local interfaces'.
  371. #
  372. # type: the type of listener. Normally 'http', but other valid options are:
  373. # 'manhole' (see https://matrix-org.github.io/synapse/latest/manhole.html),
  374. # 'metrics' (see https://matrix-org.github.io/synapse/latest/metrics-howto.html),
  375. # 'replication' (see https://matrix-org.github.io/synapse/latest/workers.html).
  376. #
  377. # tls: set to true to enable TLS for this listener. Will use the TLS
  378. # key/cert specified in tls_private_key_path / tls_certificate_path.
  379. #
  380. # x_forwarded: Only valid for an 'http' listener. Set to true to use the
  381. # X-Forwarded-For header as the client IP. Useful when Synapse is
  382. # behind a reverse-proxy.
  383. #
  384. # resources: Only valid for an 'http' listener. A list of resources to host
  385. # on this port. Options for each resource are:
  386. #
  387. # names: a list of names of HTTP resources. See below for a list of
  388. # valid resource names.
  389. #
  390. # compress: set to true to enable HTTP compression for this resource.
  391. #
  392. # additional_resources: Only valid for an 'http' listener. A map of
  393. # additional endpoints which should be loaded via dynamic modules.
  394. #
  395. # Valid resource names are:
  396. #
  397. # client: the client-server API (/_matrix/client), and the synapse admin
  398. # API (/_synapse/admin). Also implies 'media' and 'static'.
  399. #
  400. # consent: user consent forms (/_matrix/consent).
  401. # See https://matrix-org.github.io/synapse/latest/consent_tracking.html.
  402. #
  403. # federation: the server-server API (/_matrix/federation). Also implies
  404. # 'media', 'keys', 'openid'
  405. #
  406. # keys: the key discovery API (/_matrix/keys).
  407. #
  408. # media: the media API (/_matrix/media).
  409. #
  410. # metrics: the metrics interface.
  411. # See https://matrix-org.github.io/synapse/latest/metrics-howto.html.
  412. #
  413. # openid: OpenID authentication.
  414. #
  415. # replication: the HTTP replication API (/_synapse/replication).
  416. # See https://matrix-org.github.io/synapse/latest/workers.html.
  417. #
  418. # static: static resources under synapse/static (/_matrix/static). (Mostly
  419. # useful for 'fallback authentication'.)
  420. #
  421. # webclient: A web client. Requires web_client_location to be set.
  422. #
  423. listeners:
  424. # TLS-enabled listener: for when matrix traffic is sent directly to synapse.
  425. #
  426. # Disabled by default. To enable it, uncomment the following. (Note that you
  427. # will also need to give Synapse a TLS key and certificate: see the TLS section
  428. # below.)
  429. #
  430. #- port: 8448
  431. # type: http
  432. # tls: true
  433. # resources:
  434. # - names: [client, federation]
  435. # Unsecure HTTP listener: for when matrix traffic passes through a reverse proxy
  436. # that unwraps TLS.
  437. #
  438. # If you plan to use a reverse proxy, please see
  439. # https://matrix-org.github.io/synapse/latest/reverse_proxy.html.
  440. #
  441. - port: 8008
  442. tls: false
  443. type: http
  444. x_forwarded: true
  445. bind_addresses: ['::1', '127.0.0.1']
  446. resources:
  447. - names: [client, federation]
  448. compress: false
  449. # example additional_resources:
  450. #
  451. #additional_resources:
  452. # &quot;/_matrix/my/custom/endpoint&quot;:
  453. # module: my_module.CustomRequestHandler
  454. # config: {}
  455. # Turn on the twisted ssh manhole service on localhost on the given
  456. # port.
  457. #
  458. #- port: 9000
  459. # bind_addresses: ['::1', '127.0.0.1']
  460. # type: manhole
  461. # Connection settings for the manhole
  462. #
  463. manhole_settings:
  464. # The username for the manhole. This defaults to 'matrix'.
  465. #
  466. #username: manhole
  467. # The password for the manhole. This defaults to 'rabbithole'.
  468. #
  469. #password: mypassword
  470. # The private and public SSH key pair used to encrypt the manhole traffic.
  471. # If these are left unset, then hardcoded and non-secret keys are used,
  472. # which could allow traffic to be intercepted if sent over a public network.
  473. #
  474. #ssh_priv_key_path: CONFDIR/id_rsa
  475. #ssh_pub_key_path: CONFDIR/id_rsa.pub
  476. # Forward extremities can build up in a room due to networking delays between
  477. # homeservers. Once this happens in a large room, calculation of the state of
  478. # that room can become quite expensive. To mitigate this, once the number of
  479. # forward extremities reaches a given threshold, Synapse will send an
  480. # org.matrix.dummy_event event, which will reduce the forward extremities
  481. # in the room.
  482. #
  483. # This setting defines the threshold (i.e. number of forward extremities in the
  484. # room) at which dummy events are sent. The default value is 10.
  485. #
  486. #dummy_events_threshold: 5
  487. ## Homeserver blocking ##
  488. # How to reach the server admin, used in ResourceLimitError
  489. #
  490. #admin_contact: 'mailto:admin@server.com'
  491. # Global blocking
  492. #
  493. #hs_disabled: false
  494. #hs_disabled_message: 'Human readable reason for why the HS is blocked'
  495. # Monthly Active User Blocking
  496. #
  497. # Used in cases where the admin or server owner wants to limit to the
  498. # number of monthly active users.
  499. #
  500. # 'limit_usage_by_mau' disables/enables monthly active user blocking. When
  501. # enabled and a limit is reached the server returns a 'ResourceLimitError'
  502. # with error type Codes.RESOURCE_LIMIT_EXCEEDED
  503. #
  504. # 'max_mau_value' is the hard limit of monthly active users above which
  505. # the server will start blocking user actions.
  506. #
  507. # 'mau_trial_days' is a means to add a grace period for active users. It
  508. # means that users must be active for this number of days before they
  509. # can be considered active and guards against the case where lots of users
  510. # sign up in a short space of time never to return after their initial
  511. # session.
  512. #
  513. # 'mau_limit_alerting' is a means of limiting client side alerting
  514. # should the mau limit be reached. This is useful for small instances
  515. # where the admin has 5 mau seats (say) for 5 specific people and no
  516. # interest increasing the mau limit further. Defaults to True, which
  517. # means that alerting is enabled
  518. #
  519. #limit_usage_by_mau: false
  520. #max_mau_value: 50
  521. #mau_trial_days: 2
  522. #mau_limit_alerting: false
  523. # If enabled, the metrics for the number of monthly active users will
  524. # be populated, however no one will be limited. If limit_usage_by_mau
  525. # is true, this is implied to be true.
  526. #
  527. #mau_stats_only: false
  528. # Sometimes the server admin will want to ensure certain accounts are
  529. # never blocked by mau checking. These accounts are specified here.
  530. #
  531. #mau_limit_reserved_threepids:
  532. # - medium: 'email'
  533. # address: 'reserved_user@example.com'
  534. # Used by phonehome stats to group together related servers.
  535. #server_context: context
  536. # Resource-constrained homeserver settings
  537. #
  538. # When this is enabled, the room &quot;complexity&quot; will be checked before a user
  539. # joins a new remote room. If it is above the complexity limit, the server will
  540. # disallow joining, or will instantly leave.
  541. #
  542. # Room complexity is an arbitrary measure based on factors such as the number of
  543. # users in the room.
  544. #
  545. limit_remote_rooms:
  546. # Uncomment to enable room complexity checking.
  547. #
  548. #enabled: true
  549. # the limit above which rooms cannot be joined. The default is 1.0.
  550. #
  551. #complexity: 0.5
  552. # override the error which is returned when the room is too complex.
  553. #
  554. #complexity_error: &quot;This room is too complex.&quot;
  555. # allow server admins to join complex rooms. Default is false.
  556. #
  557. #admins_can_join: true
  558. # Whether to require a user to be in the room to add an alias to it.
  559. # Defaults to 'true'.
  560. #
  561. #require_membership_for_aliases: false
  562. # Whether to allow per-room membership profiles through the send of membership
  563. # events with profile information that differ from the target's global profile.
  564. # Defaults to 'true'.
  565. #
  566. #allow_per_room_profiles: false
  567. # How long to keep redacted events in unredacted form in the database. After
  568. # this period redacted events get replaced with their redacted form in the DB.
  569. #
  570. # Defaults to `7d`. Set to `null` to disable.
  571. #
  572. #redaction_retention_period: 28d
  573. # How long to track users' last seen time and IPs in the database.
  574. #
  575. # Defaults to `28d`. Set to `null` to disable clearing out of old rows.
  576. #
  577. #user_ips_max_age: 14d
  578. # Message retention policy at the server level.
  579. #
  580. # Room admins and mods can define a retention period for their rooms using the
  581. # 'm.room.retention' state event, and server admins can cap this period by setting
  582. # the 'allowed_lifetime_min' and 'allowed_lifetime_max' config options.
  583. #
  584. # If this feature is enabled, Synapse will regularly look for and purge events
  585. # which are older than the room's maximum retention period. Synapse will also
  586. # filter events received over federation so that events that should have been
  587. # purged are ignored and not stored again.
  588. #
  589. retention:
  590. # The message retention policies feature is disabled by default. Uncomment the
  591. # following line to enable it.
  592. #
  593. #enabled: true
  594. # Default retention policy. If set, Synapse will apply it to rooms that lack the
  595. # 'm.room.retention' state event. Currently, the value of 'min_lifetime' doesn't
  596. # matter much because Synapse doesn't take it into account yet.
  597. #
  598. #default_policy:
  599. # min_lifetime: 1d
  600. # max_lifetime: 1y
  601. # Retention policy limits. If set, and the state of a room contains a
  602. # 'm.room.retention' event in its state which contains a 'min_lifetime' or a
  603. # 'max_lifetime' that's out of these bounds, Synapse will cap the room's policy
  604. # to these limits when running purge jobs.
  605. #
  606. #allowed_lifetime_min: 1d
  607. #allowed_lifetime_max: 1y
  608. # Server admins can define the settings of the background jobs purging the
  609. # events which lifetime has expired under the 'purge_jobs' section.
  610. #
  611. # If no configuration is provided, a single job will be set up to delete expired
  612. # events in every room daily.
  613. #
  614. # Each job's configuration defines which range of message lifetimes the job
  615. # takes care of. For example, if 'shortest_max_lifetime' is '2d' and
  616. # 'longest_max_lifetime' is '3d', the job will handle purging expired events in
  617. # rooms whose state defines a 'max_lifetime' that's both higher than 2 days, and
  618. # lower than or equal to 3 days. Both the minimum and the maximum value of a
  619. # range are optional, e.g. a job with no 'shortest_max_lifetime' and a
  620. # 'longest_max_lifetime' of '3d' will handle every room with a retention policy
  621. # which 'max_lifetime' is lower than or equal to three days.
  622. #
  623. # The rationale for this per-job configuration is that some rooms might have a
  624. # retention policy with a low 'max_lifetime', where history needs to be purged
  625. # of outdated messages on a more frequent basis than for the rest of the rooms
  626. # (e.g. every 12h), but not want that purge to be performed by a job that's
  627. # iterating over every room it knows, which could be heavy on the server.
  628. #
  629. # If any purge job is configured, it is strongly recommended to have at least
  630. # a single job with neither 'shortest_max_lifetime' nor 'longest_max_lifetime'
  631. # set, or one job without 'shortest_max_lifetime' and one job without
  632. # 'longest_max_lifetime' set. Otherwise some rooms might be ignored, even if
  633. # 'allowed_lifetime_min' and 'allowed_lifetime_max' are set, because capping a
  634. # room's policy to these values is done after the policies are retrieved from
  635. # Synapse's database (which is done using the range specified in a purge job's
  636. # configuration).
  637. #
  638. #purge_jobs:
  639. # - longest_max_lifetime: 3d
  640. # interval: 12h
  641. # - shortest_max_lifetime: 3d
  642. # interval: 1d
  643. # Inhibits the /requestToken endpoints from returning an error that might leak
  644. # information about whether an e-mail address is in use or not on this
  645. # homeserver.
  646. # Note that for some endpoints the error situation is the e-mail already being
  647. # used, and for others the error is entering the e-mail being unused.
  648. # If this option is enabled, instead of returning an error, these endpoints will
  649. # act as if no error happened and return a fake session ID ('sid') to clients.
  650. #
  651. #request_token_inhibit_3pid_errors: true
  652. # A list of domains that the domain portion of 'next_link' parameters
  653. # must match.
  654. #
  655. # This parameter is optionally provided by clients while requesting
  656. # validation of an email or phone number, and maps to a link that
  657. # users will be automatically redirected to after validation
  658. # succeeds. Clients can make use this parameter to aid the validation
  659. # process.
  660. #
  661. # The whitelist is applied whether the homeserver or an
  662. # identity server is handling validation.
  663. #
  664. # The default value is no whitelist functionality; all domains are
  665. # allowed. Setting this value to an empty list will instead disallow
  666. # all domains.
  667. #
  668. #next_link_domain_whitelist: [&quot;matrix.org&quot;]
  669. # Templates to use when generating email or HTML page contents.
  670. #
  671. templates:
  672. # Directory in which Synapse will try to find template files to use to generate
  673. # email or HTML page contents.
  674. # If not set, or a file is not found within the template directory, a default
  675. # template from within the Synapse package will be used.
  676. #
  677. # See https://matrix-org.github.io/synapse/latest/templates.html for more
  678. # information about using custom templates.
  679. #
  680. #custom_template_directory: /path/to/custom/templates/
  681. ## TLS ##
  682. # PEM-encoded X509 certificate for TLS.
  683. # This certificate, as of Synapse 1.0, will need to be a valid and verifiable
  684. # certificate, signed by a recognised Certificate Authority.
  685. #
  686. # Be sure to use a `.pem` file that includes the full certificate chain including
  687. # any intermediate certificates (for instance, if using certbot, use
  688. # `fullchain.pem` as your certificate, not `cert.pem`).
  689. #
  690. #tls_certificate_path: &quot;CONFDIR/SERVERNAME.tls.crt&quot;
  691. # PEM-encoded private key for TLS
  692. #
  693. #tls_private_key_path: &quot;CONFDIR/SERVERNAME.tls.key&quot;
  694. # Whether to verify TLS server certificates for outbound federation requests.
  695. #
  696. # Defaults to `true`. To disable certificate verification, uncomment the
  697. # following line.
  698. #
  699. #federation_verify_certificates: false
  700. # The minimum TLS version that will be used for outbound federation requests.
  701. #
  702. # Defaults to `1`. Configurable to `1`, `1.1`, `1.2`, or `1.3`. Note
  703. # that setting this value higher than `1.2` will prevent federation to most
  704. # of the public Matrix network: only configure it to `1.3` if you have an
  705. # entirely private federation setup and you can ensure TLS 1.3 support.
  706. #
  707. #federation_client_minimum_tls_version: 1.2
  708. # Skip federation certificate verification on the following whitelist
  709. # of domains.
  710. #
  711. # This setting should only be used in very specific cases, such as
  712. # federation over Tor hidden services and similar. For private networks
  713. # of homeservers, you likely want to use a private CA instead.
  714. #
  715. # Only effective if federation_verify_certicates is `true`.
  716. #
  717. #federation_certificate_verification_whitelist:
  718. # - lon.example.com
  719. # - *.domain.com
  720. # - *.onion
  721. # List of custom certificate authorities for federation traffic.
  722. #
  723. # This setting should only normally be used within a private network of
  724. # homeservers.
  725. #
  726. # Note that this list will replace those that are provided by your
  727. # operating environment. Certificates must be in PEM format.
  728. #
  729. #federation_custom_ca_list:
  730. # - myCA1.pem
  731. # - myCA2.pem
  732. # - myCA3.pem
  733. ## Federation ##
  734. # Restrict federation to the following whitelist of domains.
  735. # N.B. we recommend also firewalling your federation listener to limit
  736. # inbound federation traffic as early as possible, rather than relying
  737. # purely on this application-layer restriction. If not specified, the
  738. # default is to whitelist everything.
  739. #
  740. #federation_domain_whitelist:
  741. # - lon.example.com
  742. # - nyc.example.com
  743. # - syd.example.com
  744. # Report prometheus metrics on the age of PDUs being sent to and received from
  745. # the following domains. This can be used to give an idea of &quot;delay&quot; on inbound
  746. # and outbound federation, though be aware that any delay can be due to problems
  747. # at either end or with the intermediate network.
  748. #
  749. # By default, no domains are monitored in this way.
  750. #
  751. #federation_metrics_domains:
  752. # - matrix.org
  753. # - example.com
  754. # Uncomment to disable profile lookup over federation. By default, the
  755. # Federation API allows other homeservers to obtain profile data of any user
  756. # on this homeserver. Defaults to 'true'.
  757. #
  758. #allow_profile_lookup_over_federation: false
  759. # Uncomment to disable device display name lookup over federation. By default, the
  760. # Federation API allows other homeservers to obtain device display names of any user
  761. # on this homeserver. Defaults to 'true'.
  762. #
  763. #allow_device_name_lookup_over_federation: false
  764. ## Caching ##
  765. # Caching can be configured through the following options.
  766. #
  767. # A cache 'factor' is a multiplier that can be applied to each of
  768. # Synapse's caches in order to increase or decrease the maximum
  769. # number of entries that can be stored.
  770. # The number of events to cache in memory. Not affected by
  771. # caches.global_factor.
  772. #
  773. #event_cache_size: 10K
  774. caches:
  775. # Controls the global cache factor, which is the default cache factor
  776. # for all caches if a specific factor for that cache is not otherwise
  777. # set.
  778. #
  779. # This can also be set by the &quot;SYNAPSE_CACHE_FACTOR&quot; environment
  780. # variable. Setting by environment variable takes priority over
  781. # setting through the config file.
  782. #
  783. # Defaults to 0.5, which will half the size of all caches.
  784. #
  785. #global_factor: 1.0
  786. # A dictionary of cache name to cache factor for that individual
  787. # cache. Overrides the global cache factor for a given cache.
  788. #
  789. # These can also be set through environment variables comprised
  790. # of &quot;SYNAPSE_CACHE_FACTOR_&quot; + the name of the cache in capital
  791. # letters and underscores. Setting by environment variable
  792. # takes priority over setting through the config file.
  793. # Ex. SYNAPSE_CACHE_FACTOR_GET_USERS_WHO_SHARE_ROOM_WITH_USER=2.0
  794. #
  795. # Some caches have '*' and other characters that are not
  796. # alphanumeric or underscores. These caches can be named with or
  797. # without the special characters stripped. For example, to specify
  798. # the cache factor for `*stateGroupCache*` via an environment
  799. # variable would be `SYNAPSE_CACHE_FACTOR_STATEGROUPCACHE=2.0`.
  800. #
  801. per_cache_factors:
  802. #get_users_who_share_room_with_user: 2.0
  803. # Controls how long an entry can be in a cache without having been
  804. # accessed before being evicted. Defaults to None, which means
  805. # entries are never evicted based on time.
  806. #
  807. #expiry_time: 30m
  808. # Controls how long the results of a /sync request are cached for after
  809. # a successful response is returned. A higher duration can help clients with
  810. # intermittent connections, at the cost of higher memory usage.
  811. #
  812. # By default, this is zero, which means that sync responses are not cached
  813. # at all.
  814. #
  815. #sync_response_cache_duration: 2m
  816. ## Database ##
  817. # The 'database' setting defines the database that synapse uses to store all of
  818. # its data.
  819. #
  820. # 'name' gives the database engine to use: either 'sqlite3' (for SQLite) or
  821. # 'psycopg2' (for PostgreSQL).
  822. #
  823. # 'txn_limit' gives the maximum number of transactions to run per connection
  824. # before reconnecting. Defaults to 0, which means no limit.
  825. #
  826. # 'args' gives options which are passed through to the database engine,
  827. # except for options starting 'cp_', which are used to configure the Twisted
  828. # connection pool. For a reference to valid arguments, see:
  829. # * for sqlite: https://docs.python.org/3/library/sqlite3.html#sqlite3.connect
  830. # * for postgres: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
  831. # * for the connection pool: https://twistedmatrix.com/documents/current/api/twisted.enterprise.adbapi.ConnectionPool.html#__init__
  832. #
  833. #
  834. # Example SQLite configuration:
  835. #
  836. #database:
  837. # name: sqlite3
  838. # args:
  839. # database: /path/to/homeserver.db
  840. #
  841. #
  842. # Example Postgres configuration:
  843. #
  844. #database:
  845. # name: psycopg2
  846. # txn_limit: 10000
  847. # args:
  848. # user: synapse_user
  849. # password: secretpassword
  850. # database: synapse
  851. # host: localhost
  852. # port: 5432
  853. # cp_min: 5
  854. # cp_max: 10
  855. #
  856. # For more information on using Synapse with Postgres,
  857. # see https://matrix-org.github.io/synapse/latest/postgres.html.
  858. #
  859. database:
  860. name: sqlite3
  861. args:
  862. database: DATADIR/homeserver.db
  863. ## Logging ##
  864. # A yaml python logging config file as described by
  865. # https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema
  866. #
  867. log_config: &quot;CONFDIR/SERVERNAME.log.config&quot;
  868. ## Ratelimiting ##
  869. # Ratelimiting settings for client actions (registration, login, messaging).
  870. #
  871. # Each ratelimiting configuration is made of two parameters:
  872. # - per_second: number of requests a client can send per second.
  873. # - burst_count: number of requests a client can send before being throttled.
  874. #
  875. # Synapse currently uses the following configurations:
  876. # - one for messages that ratelimits sending based on the account the client
  877. # is using
  878. # - one for registration that ratelimits registration requests based on the
  879. # client's IP address.
  880. # - one for checking the validity of registration tokens that ratelimits
  881. # requests based on the client's IP address.
  882. # - one for login that ratelimits login requests based on the client's IP
  883. # address.
  884. # - one for login that ratelimits login requests based on the account the
  885. # client is attempting to log into.
  886. # - one for login that ratelimits login requests based on the account the
  887. # client is attempting to log into, based on the amount of failed login
  888. # attempts for this account.
  889. # - one for ratelimiting redactions by room admins. If this is not explicitly
  890. # set then it uses the same ratelimiting as per rc_message. This is useful
  891. # to allow room admins to deal with abuse quickly.
  892. # - two for ratelimiting number of rooms a user can join, &quot;local&quot; for when
  893. # users are joining rooms the server is already in (this is cheap) vs
  894. # &quot;remote&quot; for when users are trying to join rooms not on the server (which
  895. # can be more expensive)
  896. # - one for ratelimiting how often a user or IP can attempt to validate a 3PID.
  897. # - two for ratelimiting how often invites can be sent in a room or to a
  898. # specific user.
  899. #
  900. # The defaults are as shown below.
  901. #
  902. #rc_message:
  903. # per_second: 0.2
  904. # burst_count: 10
  905. #
  906. #rc_registration:
  907. # per_second: 0.17
  908. # burst_count: 3
  909. #
  910. #rc_registration_token_validity:
  911. # per_second: 0.1
  912. # burst_count: 5
  913. #
  914. #rc_login:
  915. # address:
  916. # per_second: 0.17
  917. # burst_count: 3
  918. # account:
  919. # per_second: 0.17
  920. # burst_count: 3
  921. # failed_attempts:
  922. # per_second: 0.17
  923. # burst_count: 3
  924. #
  925. #rc_admin_redaction:
  926. # per_second: 1
  927. # burst_count: 50
  928. #
  929. #rc_joins:
  930. # local:
  931. # per_second: 0.1
  932. # burst_count: 10
  933. # remote:
  934. # per_second: 0.01
  935. # burst_count: 10
  936. #
  937. #rc_3pid_validation:
  938. # per_second: 0.003
  939. # burst_count: 5
  940. #
  941. #rc_invites:
  942. # per_room:
  943. # per_second: 0.3
  944. # burst_count: 10
  945. # per_user:
  946. # per_second: 0.003
  947. # burst_count: 5
  948. # Ratelimiting settings for incoming federation
  949. #
  950. # The rc_federation configuration is made up of the following settings:
  951. # - window_size: window size in milliseconds
  952. # - sleep_limit: number of federation requests from a single server in
  953. # a window before the server will delay processing the request.
  954. # - sleep_delay: duration in milliseconds to delay processing events
  955. # from remote servers by if they go over the sleep limit.
  956. # - reject_limit: maximum number of concurrent federation requests
  957. # allowed from a single server
  958. # - concurrent: number of federation requests to concurrently process
  959. # from a single server
  960. #
  961. # The defaults are as shown below.
  962. #
  963. #rc_federation:
  964. # window_size: 1000
  965. # sleep_limit: 10
  966. # sleep_delay: 500
  967. # reject_limit: 50
  968. # concurrent: 3
  969. # Target outgoing federation transaction frequency for sending read-receipts,
  970. # per-room.
  971. #
  972. # If we end up trying to send out more read-receipts, they will get buffered up
  973. # into fewer transactions.
  974. #
  975. #federation_rr_transactions_per_room_per_second: 50
  976. ## Media Store ##
  977. # Enable the media store service in the Synapse master. Uncomment the
  978. # following if you are using a separate media store worker.
  979. #
  980. #enable_media_repo: false
  981. # Directory where uploaded images and attachments are stored.
  982. #
  983. media_store_path: &quot;DATADIR/media_store&quot;
  984. # Media storage providers allow media to be stored in different
  985. # locations.
  986. #
  987. #media_storage_providers:
  988. # - module: file_system
  989. # # Whether to store newly uploaded local files
  990. # store_local: false
  991. # # Whether to store newly downloaded remote files
  992. # store_remote: false
  993. # # Whether to wait for successful storage for local uploads
  994. # store_synchronous: false
  995. # config:
  996. # directory: /mnt/some/other/directory
  997. # The largest allowed upload size in bytes
  998. #
  999. # If you are using a reverse proxy you may also need to set this value in
  1000. # your reverse proxy's config. Notably Nginx has a small max body size by default.
  1001. # See https://matrix-org.github.io/synapse/latest/reverse_proxy.html.
  1002. #
  1003. #max_upload_size: 50M
  1004. # Maximum number of pixels that will be thumbnailed
  1005. #
  1006. #max_image_pixels: 32M
  1007. # Whether to generate new thumbnails on the fly to precisely match
  1008. # the resolution requested by the client. If true then whenever
  1009. # a new resolution is requested by the client the server will
  1010. # generate a new thumbnail. If false the server will pick a thumbnail
  1011. # from a precalculated list.
  1012. #
  1013. #dynamic_thumbnails: false
  1014. # List of thumbnails to precalculate when an image is uploaded.
  1015. #
  1016. #thumbnail_sizes:
  1017. # - width: 32
  1018. # height: 32
  1019. # method: crop
  1020. # - width: 96
  1021. # height: 96
  1022. # method: crop
  1023. # - width: 320
  1024. # height: 240
  1025. # method: scale
  1026. # - width: 640
  1027. # height: 480
  1028. # method: scale
  1029. # - width: 800
  1030. # height: 600
  1031. # method: scale
  1032. # Is the preview URL API enabled?
  1033. #
  1034. # 'false' by default: uncomment the following to enable it (and specify a
  1035. # url_preview_ip_range_blacklist blacklist).
  1036. #
  1037. #url_preview_enabled: true
  1038. # List of IP address CIDR ranges that the URL preview spider is denied
  1039. # from accessing. There are no defaults: you must explicitly
  1040. # specify a list for URL previewing to work. You should specify any
  1041. # internal services in your network that you do not want synapse to try
  1042. # to connect to, otherwise anyone in any Matrix room could cause your
  1043. # synapse to issue arbitrary GET requests to your internal services,
  1044. # causing serious security issues.
  1045. #
  1046. # (0.0.0.0 and :: are always blacklisted, whether or not they are explicitly
  1047. # listed here, since they correspond to unroutable addresses.)
  1048. #
  1049. # This must be specified if url_preview_enabled is set. It is recommended that
  1050. # you uncomment the following list as a starting point.
  1051. #
  1052. # Note: The value is ignored when an HTTP proxy is in use
  1053. #
  1054. #url_preview_ip_range_blacklist:
  1055. # - '127.0.0.0/8'
  1056. # - '10.0.0.0/8'
  1057. # - '172.16.0.0/12'
  1058. # - '192.168.0.0/16'
  1059. # - '100.64.0.0/10'
  1060. # - '192.0.0.0/24'
  1061. # - '169.254.0.0/16'
  1062. # - '192.88.99.0/24'
  1063. # - '198.18.0.0/15'
  1064. # - '192.0.2.0/24'
  1065. # - '198.51.100.0/24'
  1066. # - '203.0.113.0/24'
  1067. # - '224.0.0.0/4'
  1068. # - '::1/128'
  1069. # - 'fe80::/10'
  1070. # - 'fc00::/7'
  1071. # - '2001:db8::/32'
  1072. # - 'ff00::/8'
  1073. # - 'fec0::/10'
  1074. # List of IP address CIDR ranges that the URL preview spider is allowed
  1075. # to access even if they are specified in url_preview_ip_range_blacklist.
  1076. # This is useful for specifying exceptions to wide-ranging blacklisted
  1077. # target IP ranges - e.g. for enabling URL previews for a specific private
  1078. # website only visible in your network.
  1079. #
  1080. #url_preview_ip_range_whitelist:
  1081. # - '192.168.1.1'
  1082. # Optional list of URL matches that the URL preview spider is
  1083. # denied from accessing. You should use url_preview_ip_range_blacklist
  1084. # in preference to this, otherwise someone could define a public DNS
  1085. # entry that points to a private IP address and circumvent the blacklist.
  1086. # This is more useful if you know there is an entire shape of URL that
  1087. # you know that will never want synapse to try to spider.
  1088. #
  1089. # Each list entry is a dictionary of url component attributes as returned
  1090. # by urlparse.urlsplit as applied to the absolute form of the URL. See
  1091. # https://docs.python.org/2/library/urlparse.html#urlparse.urlsplit
  1092. # The values of the dictionary are treated as an filename match pattern
  1093. # applied to that component of URLs, unless they start with a ^ in which
  1094. # case they are treated as a regular expression match. If all the
  1095. # specified component matches for a given list item succeed, the URL is
  1096. # blacklisted.
  1097. #
  1098. #url_preview_url_blacklist:
  1099. # # blacklist any URL with a username in its URI
  1100. # - username: '*'
  1101. #
  1102. # # blacklist all *.google.com URLs
  1103. # - netloc: 'google.com'
  1104. # - netloc: '*.google.com'
  1105. #
  1106. # # blacklist all plain HTTP URLs
  1107. # - scheme: 'http'
  1108. #
  1109. # # blacklist http(s)://www.acme.com/foo
  1110. # - netloc: 'www.acme.com'
  1111. # path: '/foo'
  1112. #
  1113. # # blacklist any URL with a literal IPv4 address
  1114. # - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
  1115. # The largest allowed URL preview spidering size in bytes
  1116. #
  1117. #max_spider_size: 10M
  1118. # A list of values for the Accept-Language HTTP header used when
  1119. # downloading webpages during URL preview generation. This allows
  1120. # Synapse to specify the preferred languages that URL previews should
  1121. # be in when communicating with remote servers.
  1122. #
  1123. # Each value is a IETF language tag; a 2-3 letter identifier for a
  1124. # language, optionally followed by subtags separated by '-', specifying
  1125. # a country or region variant.
  1126. #
  1127. # Multiple values can be provided, and a weight can be added to each by
  1128. # using quality value syntax (;q=). '*' translates to any language.
  1129. #
  1130. # Defaults to &quot;en&quot;.
  1131. #
  1132. # Example:
  1133. #
  1134. # url_preview_accept_language:
  1135. # - en-UK
  1136. # - en-US;q=0.9
  1137. # - fr;q=0.8
  1138. # - *;q=0.7
  1139. #
  1140. url_preview_accept_language:
  1141. # - en
  1142. # oEmbed allows for easier embedding content from a website. It can be
  1143. # used for generating URLs previews of services which support it.
  1144. #
  1145. oembed:
  1146. # A default list of oEmbed providers is included with Synapse.
  1147. #
  1148. # Uncomment the following to disable using these default oEmbed URLs.
  1149. # Defaults to 'false'.
  1150. #
  1151. #disable_default_providers: true
  1152. # Additional files with oEmbed configuration (each should be in the
  1153. # form of providers.json).
  1154. #
  1155. # By default, this list is empty (so only the default providers.json
  1156. # is used).
  1157. #
  1158. #additional_providers:
  1159. # - oembed/my_providers.json
  1160. ## Captcha ##
  1161. # See docs/CAPTCHA_SETUP.md for full details of configuring this.
  1162. # This homeserver's ReCAPTCHA public key. Must be specified if
  1163. # enable_registration_captcha is enabled.
  1164. #
  1165. #recaptcha_public_key: &quot;YOUR_PUBLIC_KEY&quot;
  1166. # This homeserver's ReCAPTCHA private key. Must be specified if
  1167. # enable_registration_captcha is enabled.
  1168. #
  1169. #recaptcha_private_key: &quot;YOUR_PRIVATE_KEY&quot;
  1170. # Uncomment to enable ReCaptcha checks when registering, preventing signup
  1171. # unless a captcha is answered. Requires a valid ReCaptcha
  1172. # public/private key. Defaults to 'false'.
  1173. #
  1174. #enable_registration_captcha: true
  1175. # The API endpoint to use for verifying m.login.recaptcha responses.
  1176. # Defaults to &quot;https://www.recaptcha.net/recaptcha/api/siteverify&quot;.
  1177. #
  1178. #recaptcha_siteverify_api: &quot;https://my.recaptcha.site&quot;
  1179. ## TURN ##
  1180. # The public URIs of the TURN server to give to clients
  1181. #
  1182. #turn_uris: []
  1183. # The shared secret used to compute passwords for the TURN server
  1184. #
  1185. #turn_shared_secret: &quot;YOUR_SHARED_SECRET&quot;
  1186. # The Username and password if the TURN server needs them and
  1187. # does not use a token
  1188. #
  1189. #turn_username: &quot;TURNSERVER_USERNAME&quot;
  1190. #turn_password: &quot;TURNSERVER_PASSWORD&quot;
  1191. # How long generated TURN credentials last
  1192. #
  1193. #turn_user_lifetime: 1h
  1194. # Whether guests should be allowed to use the TURN server.
  1195. # This defaults to True, otherwise VoIP will be unreliable for guests.
  1196. # However, it does introduce a slight security risk as it allows users to
  1197. # connect to arbitrary endpoints without having first signed up for a
  1198. # valid account (e.g. by passing a CAPTCHA).
  1199. #
  1200. #turn_allow_guests: true
  1201. ## Registration ##
  1202. #
  1203. # Registration can be rate-limited using the parameters in the &quot;Ratelimiting&quot;
  1204. # section of this file.
  1205. # Enable registration for new users.
  1206. #
  1207. #enable_registration: false
  1208. # Time that a user's session remains valid for, after they log in.
  1209. #
  1210. # Note that this is not currently compatible with guest logins.
  1211. #
  1212. # Note also that this is calculated at login time: changes are not applied
  1213. # retrospectively to users who have already logged in.
  1214. #
  1215. # By default, this is infinite.
  1216. #
  1217. #session_lifetime: 24h
  1218. # The user must provide all of the below types of 3PID when registering.
  1219. #
  1220. #registrations_require_3pid:
  1221. # - email
  1222. # - msisdn
  1223. # Explicitly disable asking for MSISDNs from the registration
  1224. # flow (overrides registrations_require_3pid if MSISDNs are set as required)
  1225. #
  1226. #disable_msisdn_registration: true
  1227. # Mandate that users are only allowed to associate certain formats of
  1228. # 3PIDs with accounts on this server.
  1229. #
  1230. #allowed_local_3pids:
  1231. # - medium: email
  1232. # pattern: '^[^@]+@matrix\.org$'
  1233. # - medium: email
  1234. # pattern: '^[^@]+@vector\.im$'
  1235. # - medium: msisdn
  1236. # pattern: '\+44'
  1237. # Enable 3PIDs lookup requests to identity servers from this server.
  1238. #
  1239. #enable_3pid_lookup: true
  1240. # Require users to submit a token during registration.
  1241. # Tokens can be managed using the admin API:
  1242. # https://matrix-org.github.io/synapse/latest/usage/administration/admin_api/registration_tokens.html
  1243. # Note that `enable_registration` must be set to `true`.
  1244. # Disabling this option will not delete any tokens previously generated.
  1245. # Defaults to false. Uncomment the following to require tokens:
  1246. #
  1247. #registration_requires_token: true
  1248. # If set, allows registration of standard or admin accounts by anyone who
  1249. # has the shared secret, even if registration is otherwise disabled.
  1250. #
  1251. #registration_shared_secret: &lt;PRIVATE STRING&gt;
  1252. # Set the number of bcrypt rounds used to generate password hash.
  1253. # Larger numbers increase the work factor needed to generate the hash.
  1254. # The default number is 12 (which equates to 2^12 rounds).
  1255. # N.B. that increasing this will exponentially increase the time required
  1256. # to register or login - e.g. 24 =&gt; 2^24 rounds which will take &gt;20 mins.
  1257. #
  1258. #bcrypt_rounds: 12
  1259. # Allows users to register as guests without a password/email/etc, and
  1260. # participate in rooms hosted on this server which have been made
  1261. # accessible to anonymous users.
  1262. #
  1263. #allow_guest_access: false
  1264. # The identity server which we suggest that clients should use when users log
  1265. # in on this server.
  1266. #
  1267. # (By default, no suggestion is made, so it is left up to the client.
  1268. # This setting is ignored unless public_baseurl is also set.)
  1269. #
  1270. #default_identity_server: https://matrix.org
  1271. # Handle threepid (email/phone etc) registration and password resets through a set of
  1272. # *trusted* identity servers. Note that this allows the configured identity server to
  1273. # reset passwords for accounts!
  1274. #
  1275. # Be aware that if `email` is not set, and SMTP options have not been
  1276. # configured in the email config block, registration and user password resets via
  1277. # email will be globally disabled.
  1278. #
  1279. # Additionally, if `msisdn` is not set, registration and password resets via msisdn
  1280. # will be disabled regardless, and users will not be able to associate an msisdn
  1281. # identifier to their account. This is due to Synapse currently not supporting
  1282. # any method of sending SMS messages on its own.
  1283. #
  1284. # To enable using an identity server for operations regarding a particular third-party
  1285. # identifier type, set the value to the URL of that identity server as shown in the
  1286. # examples below.
  1287. #
  1288. # Servers handling the these requests must answer the `/requestToken` endpoints defined
  1289. # by the Matrix Identity Service API specification:
  1290. # https://matrix.org/docs/spec/identity_service/latest
  1291. #
  1292. # If a delegate is specified, the config option public_baseurl must also be filled out.
  1293. #
  1294. account_threepid_delegates:
  1295. #email: https://example.com # Delegate email sending to example.com
  1296. #msisdn: http://localhost:8090 # Delegate SMS sending to this local process
  1297. # Whether users are allowed to change their displayname after it has
  1298. # been initially set. Useful when provisioning users based on the
  1299. # contents of a third-party directory.
  1300. #
  1301. # Does not apply to server administrators. Defaults to 'true'
  1302. #
  1303. #enable_set_displayname: false
  1304. # Whether users are allowed to change their avatar after it has been
  1305. # initially set. Useful when provisioning users based on the contents
  1306. # of a third-party directory.
  1307. #
  1308. # Does not apply to server administrators. Defaults to 'true'
  1309. #
  1310. #enable_set_avatar_url: false
  1311. # Whether users can change the 3PIDs associated with their accounts
  1312. # (email address and msisdn).
  1313. #
  1314. # Defaults to 'true'
  1315. #
  1316. #enable_3pid_changes: false
  1317. # Users who register on this homeserver will automatically be joined
  1318. # to these rooms.
  1319. #
  1320. # By default, any room aliases included in this list will be created
  1321. # as a publicly joinable room when the first user registers for the
  1322. # homeserver. This behaviour can be customised with the settings below.
  1323. # If the room already exists, make certain it is a publicly joinable
  1324. # room. The join rule of the room must be set to 'public'.
  1325. #
  1326. #auto_join_rooms:
  1327. # - &quot;#example:example.com&quot;
  1328. # Where auto_join_rooms are specified, setting this flag ensures that the
  1329. # the rooms exist by creating them when the first user on the
  1330. # homeserver registers.
  1331. #
  1332. # By default the auto-created rooms are publicly joinable from any federated
  1333. # server. Use the autocreate_auto_join_rooms_federated and
  1334. # autocreate_auto_join_room_preset settings below to customise this behaviour.
  1335. #
  1336. # Setting to false means that if the rooms are not manually created,
  1337. # users cannot be auto-joined since they do not exist.
  1338. #
  1339. # Defaults to true. Uncomment the following line to disable automatically
  1340. # creating auto-join rooms.
  1341. #
  1342. #autocreate_auto_join_rooms: false
  1343. # Whether the auto_join_rooms that are auto-created are available via
  1344. # federation. Only has an effect if autocreate_auto_join_rooms is true.
  1345. #
  1346. # Note that whether a room is federated cannot be modified after
  1347. # creation.
  1348. #
  1349. # Defaults to true: the room will be joinable from other servers.
  1350. # Uncomment the following to prevent users from other homeservers from
  1351. # joining these rooms.
  1352. #
  1353. #autocreate_auto_join_rooms_federated: false
  1354. # The room preset to use when auto-creating one of auto_join_rooms. Only has an
  1355. # effect if autocreate_auto_join_rooms is true.
  1356. #
  1357. # This can be one of &quot;public_chat&quot;, &quot;private_chat&quot;, or &quot;trusted_private_chat&quot;.
  1358. # If a value of &quot;private_chat&quot; or &quot;trusted_private_chat&quot; is used then
  1359. # auto_join_mxid_localpart must also be configured.
  1360. #
  1361. # Defaults to &quot;public_chat&quot;, meaning that the room is joinable by anyone, including
  1362. # federated servers if autocreate_auto_join_rooms_federated is true (the default).
  1363. # Uncomment the following to require an invitation to join these rooms.
  1364. #
  1365. #autocreate_auto_join_room_preset: private_chat
  1366. # The local part of the user id which is used to create auto_join_rooms if
  1367. # autocreate_auto_join_rooms is true. If this is not provided then the
  1368. # initial user account that registers will be used to create the rooms.
  1369. #
  1370. # The user id is also used to invite new users to any auto-join rooms which
  1371. # are set to invite-only.
  1372. #
  1373. # It *must* be configured if autocreate_auto_join_room_preset is set to
  1374. # &quot;private_chat&quot; or &quot;trusted_private_chat&quot;.
  1375. #
  1376. # Note that this must be specified in order for new users to be correctly
  1377. # invited to any auto-join rooms which have been set to invite-only (either
  1378. # at the time of creation or subsequently).
  1379. #
  1380. # Note that, if the room already exists, this user must be joined and
  1381. # have the appropriate permissions to invite new members.
  1382. #
  1383. #auto_join_mxid_localpart: system
  1384. # When auto_join_rooms is specified, setting this flag to false prevents
  1385. # guest accounts from being automatically joined to the rooms.
  1386. #
  1387. # Defaults to true.
  1388. #
  1389. #auto_join_rooms_for_guests: false
  1390. ## Metrics ###
  1391. # Enable collection and rendering of performance metrics
  1392. #
  1393. #enable_metrics: false
  1394. # Enable sentry integration
  1395. # NOTE: While attempts are made to ensure that the logs don't contain
  1396. # any sensitive information, this cannot be guaranteed. By enabling
  1397. # this option the sentry server may therefore receive sensitive
  1398. # information, and it in turn may then diseminate sensitive information
  1399. # through insecure notification channels if so configured.
  1400. #
  1401. #sentry:
  1402. # dsn: &quot;...&quot;
  1403. # Flags to enable Prometheus metrics which are not suitable to be
  1404. # enabled by default, either for performance reasons or limited use.
  1405. #
  1406. metrics_flags:
  1407. # Publish synapse_federation_known_servers, a gauge of the number of
  1408. # servers this homeserver knows about, including itself. May cause
  1409. # performance problems on large homeservers.
  1410. #
  1411. #known_servers: true
  1412. # Whether or not to report anonymized homeserver usage statistics.
  1413. #
  1414. #report_stats: true|false
  1415. # The endpoint to report the anonymized homeserver usage statistics to.
  1416. # Defaults to https://matrix.org/report-usage-stats/push
  1417. #
  1418. #report_stats_endpoint: https://example.com/report-usage-stats/push
  1419. ## API Configuration ##
  1420. # Controls for the state that is shared with users who receive an invite
  1421. # to a room
  1422. #
  1423. room_prejoin_state:
  1424. # By default, the following state event types are shared with users who
  1425. # receive invites to the room:
  1426. #
  1427. # - m.room.join_rules
  1428. # - m.room.canonical_alias
  1429. # - m.room.avatar
  1430. # - m.room.encryption
  1431. # - m.room.name
  1432. # - m.room.create
  1433. #
  1434. # Uncomment the following to disable these defaults (so that only the event
  1435. # types listed in 'additional_event_types' are shared). Defaults to 'false'.
  1436. #
  1437. #disable_default_event_types: true
  1438. # Additional state event types to share with users when they are invited
  1439. # to a room.
  1440. #
  1441. # By default, this list is empty (so only the default event types are shared).
  1442. #
  1443. #additional_event_types:
  1444. # - org.example.custom.event.type
  1445. # A list of application service config files to use
  1446. #
  1447. #app_service_config_files:
  1448. # - app_service_1.yaml
  1449. # - app_service_2.yaml
  1450. # Uncomment to enable tracking of application service IP addresses. Implicitly
  1451. # enables MAU tracking for application service users.
  1452. #
  1453. #track_appservice_user_ips: true
  1454. # a secret which is used to sign access tokens. If none is specified,
  1455. # the registration_shared_secret is used, if one is given; otherwise,
  1456. # a secret key is derived from the signing key.
  1457. #
  1458. #macaroon_secret_key: &lt;PRIVATE STRING&gt;
  1459. # a secret which is used to calculate HMACs for form values, to stop
  1460. # falsification of values. Must be specified for the User Consent
  1461. # forms to work.
  1462. #
  1463. #form_secret: &lt;PRIVATE STRING&gt;
  1464. ## Signing Keys ##
  1465. # Path to the signing key to sign messages with
  1466. #
  1467. signing_key_path: &quot;CONFDIR/SERVERNAME.signing.key&quot;
  1468. # The keys that the server used to sign messages with but won't use
  1469. # to sign new messages.
  1470. #
  1471. old_signing_keys:
  1472. # For each key, `key` should be the base64-encoded public key, and
  1473. # `expired_ts`should be the time (in milliseconds since the unix epoch) that
  1474. # it was last used.
  1475. #
  1476. # It is possible to build an entry from an old signing.key file using the
  1477. # `export_signing_key` script which is provided with synapse.
  1478. #
  1479. # For example:
  1480. #
  1481. #&quot;ed25519:id&quot;: { key: &quot;base64string&quot;, expired_ts: 123456789123 }
  1482. # How long key response published by this server is valid for.
  1483. # Used to set the valid_until_ts in /key/v2 APIs.
  1484. # Determines how quickly servers will query to check which keys
  1485. # are still valid.
  1486. #
  1487. #key_refresh_interval: 1d
  1488. # The trusted servers to download signing keys from.
  1489. #
  1490. # When we need to fetch a signing key, each server is tried in parallel.
  1491. #
  1492. # Normally, the connection to the key server is validated via TLS certificates.
  1493. # Additional security can be provided by configuring a `verify key`, which
  1494. # will make synapse check that the response is signed by that key.
  1495. #
  1496. # This setting supercedes an older setting named `perspectives`. The old format
  1497. # is still supported for backwards-compatibility, but it is deprecated.
  1498. #
  1499. # 'trusted_key_servers' defaults to matrix.org, but using it will generate a
  1500. # warning on start-up. To suppress this warning, set
  1501. # 'suppress_key_server_warning' to true.
  1502. #
  1503. # Options for each entry in the list include:
  1504. #
  1505. # server_name: the name of the server. required.
  1506. #
  1507. # verify_keys: an optional map from key id to base64-encoded public key.
  1508. # If specified, we will check that the response is signed by at least
  1509. # one of the given keys.
  1510. #
  1511. # accept_keys_insecurely: a boolean. Normally, if `verify_keys` is unset,
  1512. # and federation_verify_certificates is not `true`, synapse will refuse
  1513. # to start, because this would allow anyone who can spoof DNS responses
  1514. # to masquerade as the trusted key server. If you know what you are doing
  1515. # and are sure that your network environment provides a secure connection
  1516. # to the key server, you can set this to `true` to override this
  1517. # behaviour.
  1518. #
  1519. # An example configuration might look like:
  1520. #
  1521. #trusted_key_servers:
  1522. # - server_name: &quot;my_trusted_server.example.com&quot;
  1523. # verify_keys:
  1524. # &quot;ed25519:auto&quot;: &quot;abcdefghijklmnopqrstuvwxyzabcdefghijklmopqr&quot;
  1525. # - server_name: &quot;my_other_trusted_server.example.com&quot;
  1526. #
  1527. trusted_key_servers:
  1528. - server_name: &quot;matrix.org&quot;
  1529. # Uncomment the following to disable the warning that is emitted when the
  1530. # trusted_key_servers include 'matrix.org'. See above.
  1531. #
  1532. #suppress_key_server_warning: true
  1533. # The signing keys to use when acting as a trusted key server. If not specified
  1534. # defaults to the server signing key.
  1535. #
  1536. # Can contain multiple keys, one per line.
  1537. #
  1538. #key_server_signing_keys_path: &quot;key_server_signing_keys.key&quot;
  1539. ## Single sign-on integration ##
  1540. # The following settings can be used to make Synapse use a single sign-on
  1541. # provider for authentication, instead of its internal password database.
  1542. #
  1543. # You will probably also want to set the following options to `false` to
  1544. # disable the regular login/registration flows:
  1545. # * enable_registration
  1546. # * password_config.enabled
  1547. #
  1548. # You will also want to investigate the settings under the &quot;sso&quot; configuration
  1549. # section below.
  1550. # Enable SAML2 for registration and login. Uses pysaml2.
  1551. #
  1552. # At least one of `sp_config` or `config_path` must be set in this section to
  1553. # enable SAML login.
  1554. #
  1555. # Once SAML support is enabled, a metadata file will be exposed at
  1556. # https://&lt;server&gt;:&lt;port&gt;/_synapse/client/saml2/metadata.xml, which you may be able to
  1557. # use to configure your SAML IdP with. Alternatively, you can manually configure
  1558. # the IdP to use an ACS location of
  1559. # https://&lt;server&gt;:&lt;port&gt;/_synapse/client/saml2/authn_response.
  1560. #
  1561. saml2_config:
  1562. # `sp_config` is the configuration for the pysaml2 Service Provider.
  1563. # See pysaml2 docs for format of config.
  1564. #
  1565. # Default values will be used for the 'entityid' and 'service' settings,
  1566. # so it is not normally necessary to specify them unless you need to
  1567. # override them.
  1568. #
  1569. sp_config:
  1570. # Point this to the IdP's metadata. You must provide either a local
  1571. # file via the `local` attribute or (preferably) a URL via the
  1572. # `remote` attribute.
  1573. #
  1574. #metadata:
  1575. # local: [&quot;saml2/idp.xml&quot;]
  1576. # remote:
  1577. # - url: https://our_idp/metadata.xml
  1578. # Allowed clock difference in seconds between the homeserver and IdP.
  1579. #
  1580. # Uncomment the below to increase the accepted time difference from 0 to 3 seconds.
  1581. #
  1582. #accepted_time_diff: 3
  1583. # By default, the user has to go to our login page first. If you'd like
  1584. # to allow IdP-initiated login, set 'allow_unsolicited: true' in a
  1585. # 'service.sp' section:
  1586. #
  1587. #service:
  1588. # sp:
  1589. # allow_unsolicited: true
  1590. # The examples below are just used to generate our metadata xml, and you
  1591. # may well not need them, depending on your setup. Alternatively you
  1592. # may need a whole lot more detail - see the pysaml2 docs!
  1593. #description: [&quot;My awesome SP&quot;, &quot;en&quot;]
  1594. #name: [&quot;Test SP&quot;, &quot;en&quot;]
  1595. #ui_info:
  1596. # display_name:
  1597. # - lang: en
  1598. # text: &quot;Display Name is the descriptive name of your service.&quot;
  1599. # description:
  1600. # - lang: en
  1601. # text: &quot;Description should be a short paragraph explaining the purpose of the service.&quot;
  1602. # information_url:
  1603. # - lang: en
  1604. # text: &quot;https://example.com/terms-of-service&quot;
  1605. # privacy_statement_url:
  1606. # - lang: en
  1607. # text: &quot;https://example.com/privacy-policy&quot;
  1608. # keywords:
  1609. # - lang: en
  1610. # text: [&quot;Matrix&quot;, &quot;Element&quot;]
  1611. # logo:
  1612. # - lang: en
  1613. # text: &quot;https://example.com/logo.svg&quot;
  1614. # width: &quot;200&quot;
  1615. # height: &quot;80&quot;
  1616. #organization:
  1617. # name: Example com
  1618. # display_name:
  1619. # - [&quot;Example co&quot;, &quot;en&quot;]
  1620. # url: &quot;http://example.com&quot;
  1621. #contact_person:
  1622. # - given_name: Bob
  1623. # sur_name: &quot;the Sysadmin&quot;
  1624. # email_address&quot;: [&quot;admin@example.com&quot;]
  1625. # contact_type&quot;: technical
  1626. # Instead of putting the config inline as above, you can specify a
  1627. # separate pysaml2 configuration file:
  1628. #
  1629. #config_path: &quot;CONFDIR/sp_conf.py&quot;
  1630. # The lifetime of a SAML session. This defines how long a user has to
  1631. # complete the authentication process, if allow_unsolicited is unset.
  1632. # The default is 15 minutes.
  1633. #
  1634. #saml_session_lifetime: 5m
  1635. # An external module can be provided here as a custom solution to
  1636. # mapping attributes returned from a saml provider onto a matrix user.
  1637. #
  1638. user_mapping_provider:
  1639. # The custom module's class. Uncomment to use a custom module.
  1640. #
  1641. #module: mapping_provider.SamlMappingProvider
  1642. # Custom configuration values for the module. Below options are
  1643. # intended for the built-in provider, they should be changed if
  1644. # using a custom module. This section will be passed as a Python
  1645. # dictionary to the module's `parse_config` method.
  1646. #
  1647. config:
  1648. # The SAML attribute (after mapping via the attribute maps) to use
  1649. # to derive the Matrix ID from. 'uid' by default.
  1650. #
  1651. # Note: This used to be configured by the
  1652. # saml2_config.mxid_source_attribute option. If that is still
  1653. # defined, its value will be used instead.
  1654. #
  1655. #mxid_source_attribute: displayName
  1656. # The mapping system to use for mapping the saml attribute onto a
  1657. # matrix ID.
  1658. #
  1659. # Options include:
  1660. # * 'hexencode' (which maps unpermitted characters to '=xx')
  1661. # * 'dotreplace' (which replaces unpermitted characters with
  1662. # '.').
  1663. # The default is 'hexencode'.
  1664. #
  1665. # Note: This used to be configured by the
  1666. # saml2_config.mxid_mapping option. If that is still defined, its
  1667. # value will be used instead.
  1668. #
  1669. #mxid_mapping: dotreplace
  1670. # In previous versions of synapse, the mapping from SAML attribute to
  1671. # MXID was always calculated dynamically rather than stored in a
  1672. # table. For backwards- compatibility, we will look for user_ids
  1673. # matching such a pattern before creating a new account.
  1674. #
  1675. # This setting controls the SAML attribute which will be used for this
  1676. # backwards-compatibility lookup. Typically it should be 'uid', but if
  1677. # the attribute maps are changed, it may be necessary to change it.
  1678. #
  1679. # The default is 'uid'.
  1680. #
  1681. #grandfathered_mxid_source_attribute: upn
  1682. # It is possible to configure Synapse to only allow logins if SAML attributes
  1683. # match particular values. The requirements can be listed under
  1684. # `attribute_requirements` as shown below. All of the listed attributes must
  1685. # match for the login to be permitted.
  1686. #
  1687. #attribute_requirements:
  1688. # - attribute: userGroup
  1689. # value: &quot;staff&quot;
  1690. # - attribute: department
  1691. # value: &quot;sales&quot;
  1692. # If the metadata XML contains multiple IdP entities then the `idp_entityid`
  1693. # option must be set to the entity to redirect users to.
  1694. #
  1695. # Most deployments only have a single IdP entity and so should omit this
  1696. # option.
  1697. #
  1698. #idp_entityid: 'https://our_idp/entityid'
  1699. # List of OpenID Connect (OIDC) / OAuth 2.0 identity providers, for registration
  1700. # and login.
  1701. #
  1702. # Options for each entry include:
  1703. #
  1704. # idp_id: a unique identifier for this identity provider. Used internally
  1705. # by Synapse; should be a single word such as 'github'.
  1706. #
  1707. # Note that, if this is changed, users authenticating via that provider
  1708. # will no longer be recognised as the same user!
  1709. #
  1710. # (Use &quot;oidc&quot; here if you are migrating from an old &quot;oidc_config&quot;
  1711. # configuration.)
  1712. #
  1713. # idp_name: A user-facing name for this identity provider, which is used to
  1714. # offer the user a choice of login mechanisms.
  1715. #
  1716. # idp_icon: An optional icon for this identity provider, which is presented
  1717. # by clients and Synapse's own IdP picker page. If given, must be an
  1718. # MXC URI of the format mxc://&lt;server-name&gt;/&lt;media-id&gt;. (An easy way to
  1719. # obtain such an MXC URI is to upload an image to an (unencrypted) room
  1720. # and then copy the &quot;url&quot; from the source of the event.)
  1721. #
  1722. # idp_brand: An optional brand for this identity provider, allowing clients
  1723. # to style the login flow according to the identity provider in question.
  1724. # See the spec for possible options here.
  1725. #
  1726. # discover: set to 'false' to disable the use of the OIDC discovery mechanism
  1727. # to discover endpoints. Defaults to true.
  1728. #
  1729. # issuer: Required. The OIDC issuer. Used to validate tokens and (if discovery
  1730. # is enabled) to discover the provider's endpoints.
  1731. #
  1732. # client_id: Required. oauth2 client id to use.
  1733. #
  1734. # client_secret: oauth2 client secret to use. May be omitted if
  1735. # client_secret_jwt_key is given, or if client_auth_method is 'none'.
  1736. #
  1737. # client_secret_jwt_key: Alternative to client_secret: details of a key used
  1738. # to create a JSON Web Token to be used as an OAuth2 client secret. If
  1739. # given, must be a dictionary with the following properties:
  1740. #
  1741. # key: a pem-encoded signing key. Must be a suitable key for the
  1742. # algorithm specified. Required unless 'key_file' is given.
  1743. #
  1744. # key_file: the path to file containing a pem-encoded signing key file.
  1745. # Required unless 'key' is given.
  1746. #
  1747. # jwt_header: a dictionary giving properties to include in the JWT
  1748. # header. Must include the key 'alg', giving the algorithm used to
  1749. # sign the JWT, such as &quot;ES256&quot;, using the JWA identifiers in
  1750. # RFC7518.
  1751. #
  1752. # jwt_payload: an optional dictionary giving properties to include in
  1753. # the JWT payload. Normally this should include an 'iss' key.
  1754. #
  1755. # client_auth_method: auth method to use when exchanging the token. Valid
  1756. # values are 'client_secret_basic' (default), 'client_secret_post' and
  1757. # 'none'.
  1758. #
  1759. # scopes: list of scopes to request. This should normally include the &quot;openid&quot;
  1760. # scope. Defaults to [&quot;openid&quot;].
  1761. #
  1762. # authorization_endpoint: the oauth2 authorization endpoint. Required if
  1763. # provider discovery is disabled.
  1764. #
  1765. # token_endpoint: the oauth2 token endpoint. Required if provider discovery is
  1766. # disabled.
  1767. #
  1768. # userinfo_endpoint: the OIDC userinfo endpoint. Required if discovery is
  1769. # disabled and the 'openid' scope is not requested.
  1770. #
  1771. # jwks_uri: URI where to fetch the JWKS. Required if discovery is disabled and
  1772. # the 'openid' scope is used.
  1773. #
  1774. # skip_verification: set to 'true' to skip metadata verification. Use this if
  1775. # you are connecting to a provider that is not OpenID Connect compliant.
  1776. # Defaults to false. Avoid this in production.
  1777. #
  1778. # user_profile_method: Whether to fetch the user profile from the userinfo
  1779. # endpoint. Valid values are: 'auto' or 'userinfo_endpoint'.
  1780. #
  1781. # Defaults to 'auto', which fetches the userinfo endpoint if 'openid' is
  1782. # included in 'scopes'. Set to 'userinfo_endpoint' to always fetch the
  1783. # userinfo endpoint.
  1784. #
  1785. # allow_existing_users: set to 'true' to allow a user logging in via OIDC to
  1786. # match a pre-existing account instead of failing. This could be used if
  1787. # switching from password logins to OIDC. Defaults to false.
  1788. #
  1789. # user_mapping_provider: Configuration for how attributes returned from a OIDC
  1790. # provider are mapped onto a matrix user. This setting has the following
  1791. # sub-properties:
  1792. #
  1793. # module: The class name of a custom mapping module. Default is
  1794. # 'synapse.handlers.oidc.JinjaOidcMappingProvider'.
  1795. # See https://matrix-org.github.io/synapse/latest/sso_mapping_providers.html#openid-mapping-providers
  1796. # for information on implementing a custom mapping provider.
  1797. #
  1798. # config: Configuration for the mapping provider module. This section will
  1799. # be passed as a Python dictionary to the user mapping provider
  1800. # module's `parse_config` method.
  1801. #
  1802. # For the default provider, the following settings are available:
  1803. #
  1804. # subject_claim: name of the claim containing a unique identifier
  1805. # for the user. Defaults to 'sub', which OpenID Connect
  1806. # compliant providers should provide.
  1807. #
  1808. # localpart_template: Jinja2 template for the localpart of the MXID.
  1809. # If this is not set, the user will be prompted to choose their
  1810. # own username (see 'sso_auth_account_details.html' in the 'sso'
  1811. # section of this file).
  1812. #
  1813. # display_name_template: Jinja2 template for the display name to set
  1814. # on first login. If unset, no displayname will be set.
  1815. #
  1816. # email_template: Jinja2 template for the email address of the user.
  1817. # If unset, no email address will be added to the account.
  1818. #
  1819. # extra_attributes: a map of Jinja2 templates for extra attributes
  1820. # to send back to the client during login.
  1821. # Note that these are non-standard and clients will ignore them
  1822. # without modifications.
  1823. #
  1824. # When rendering, the Jinja2 templates are given a 'user' variable,
  1825. # which is set to the claims returned by the UserInfo Endpoint and/or
  1826. # in the ID Token.
  1827. #
  1828. # It is possible to configure Synapse to only allow logins if certain attributes
  1829. # match particular values in the OIDC userinfo. The requirements can be listed under
  1830. # `attribute_requirements` as shown below. All of the listed attributes must
  1831. # match for the login to be permitted. Additional attributes can be added to
  1832. # userinfo by expanding the `scopes` section of the OIDC config to retrieve
  1833. # additional information from the OIDC provider.
  1834. #
  1835. # If the OIDC claim is a list, then the attribute must match any value in the list.
  1836. # Otherwise, it must exactly match the value of the claim. Using the example
  1837. # below, the `family_name` claim MUST be &quot;Stephensson&quot;, but the `groups`
  1838. # claim MUST contain &quot;admin&quot;.
  1839. #
  1840. # attribute_requirements:
  1841. # - attribute: family_name
  1842. # value: &quot;Stephensson&quot;
  1843. # - attribute: groups
  1844. # value: &quot;admin&quot;
  1845. #
  1846. # See https://matrix-org.github.io/synapse/latest/openid.html
  1847. # for information on how to configure these options.
  1848. #
  1849. # For backwards compatibility, it is also possible to configure a single OIDC
  1850. # provider via an 'oidc_config' setting. This is now deprecated and admins are
  1851. # advised to migrate to the 'oidc_providers' format. (When doing that migration,
  1852. # use 'oidc' for the idp_id to ensure that existing users continue to be
  1853. # recognised.)
  1854. #
  1855. oidc_providers:
  1856. # Generic example
  1857. #
  1858. #- idp_id: my_idp
  1859. # idp_name: &quot;My OpenID provider&quot;
  1860. # idp_icon: &quot;mxc://example.com/mediaid&quot;
  1861. # discover: false
  1862. # issuer: &quot;https://accounts.example.com/&quot;
  1863. # client_id: &quot;provided-by-your-issuer&quot;
  1864. # client_secret: &quot;provided-by-your-issuer&quot;
  1865. # client_auth_method: client_secret_post
  1866. # scopes: [&quot;openid&quot;, &quot;profile&quot;]
  1867. # authorization_endpoint: &quot;https://accounts.example.com/oauth2/auth&quot;
  1868. # token_endpoint: &quot;https://accounts.example.com/oauth2/token&quot;
  1869. # userinfo_endpoint: &quot;https://accounts.example.com/userinfo&quot;
  1870. # jwks_uri: &quot;https://accounts.example.com/.well-known/jwks.json&quot;
  1871. # skip_verification: true
  1872. # user_mapping_provider:
  1873. # config:
  1874. # subject_claim: &quot;id&quot;
  1875. # localpart_template: &quot;{{ user.login }}&quot;
  1876. # display_name_template: &quot;{{ user.name }}&quot;
  1877. # email_template: &quot;{{ user.email }}&quot;
  1878. # attribute_requirements:
  1879. # - attribute: userGroup
  1880. # value: &quot;synapseUsers&quot;
  1881. # Enable Central Authentication Service (CAS) for registration and login.
  1882. #
  1883. cas_config:
  1884. # Uncomment the following to enable authorization against a CAS server.
  1885. # Defaults to false.
  1886. #
  1887. #enabled: true
  1888. # The URL of the CAS authorization endpoint.
  1889. #
  1890. #server_url: &quot;https://cas-server.com&quot;
  1891. # The attribute of the CAS response to use as the display name.
  1892. #
  1893. # If unset, no displayname will be set.
  1894. #
  1895. #displayname_attribute: name
  1896. # It is possible to configure Synapse to only allow logins if CAS attributes
  1897. # match particular values. All of the keys in the mapping below must exist
  1898. # and the values must match the given value. Alternately if the given value
  1899. # is None then any value is allowed (the attribute just must exist).
  1900. # All of the listed attributes must match for the login to be permitted.
  1901. #
  1902. #required_attributes:
  1903. # userGroup: &quot;staff&quot;
  1904. # department: None
  1905. # Additional settings to use with single-sign on systems such as OpenID Connect,
  1906. # SAML2 and CAS.
  1907. #
  1908. # Server admins can configure custom templates for pages related to SSO. See
  1909. # https://matrix-org.github.io/synapse/latest/templates.html for more information.
  1910. #
  1911. sso:
  1912. # A list of client URLs which are whitelisted so that the user does not
  1913. # have to confirm giving access to their account to the URL. Any client
  1914. # whose URL starts with an entry in the following list will not be subject
  1915. # to an additional confirmation step after the SSO login is completed.
  1916. #
  1917. # WARNING: An entry such as &quot;https://my.client&quot; is insecure, because it
  1918. # will also match &quot;https://my.client.evil.site&quot;, exposing your users to
  1919. # phishing attacks from evil.site. To avoid this, include a slash after the
  1920. # hostname: &quot;https://my.client/&quot;.
  1921. #
  1922. # If public_baseurl is set, then the login fallback page (used by clients
  1923. # that don't natively support the required login flows) is whitelisted in
  1924. # addition to any URLs in this list.
  1925. #
  1926. # By default, this list is empty.
  1927. #
  1928. #client_whitelist:
  1929. # - https://riot.im/develop
  1930. # - https://my.custom.client/
  1931. # Uncomment to keep a user's profile fields in sync with information from
  1932. # the identity provider. Currently only syncing the displayname is
  1933. # supported. Fields are checked on every SSO login, and are updated
  1934. # if necessary.
  1935. #
  1936. # Note that enabling this option will override user profile information,
  1937. # regardless of whether users have opted-out of syncing that
  1938. # information when first signing in. Defaults to false.
  1939. #
  1940. #update_profile_information: true
  1941. # JSON web token integration. The following settings can be used to make
  1942. # Synapse JSON web tokens for authentication, instead of its internal
  1943. # password database.
  1944. #
  1945. # Each JSON Web Token needs to contain a &quot;sub&quot; (subject) claim, which is
  1946. # used as the localpart of the mxid.
  1947. #
  1948. # Additionally, the expiration time (&quot;exp&quot;), not before time (&quot;nbf&quot;),
  1949. # and issued at (&quot;iat&quot;) claims are validated if present.
  1950. #
  1951. # Note that this is a non-standard login type and client support is
  1952. # expected to be non-existent.
  1953. #
  1954. # See https://matrix-org.github.io/synapse/latest/jwt.html.
  1955. #
  1956. #jwt_config:
  1957. # Uncomment the following to enable authorization using JSON web
  1958. # tokens. Defaults to false.
  1959. #
  1960. #enabled: true
  1961. # This is either the private shared secret or the public key used to
  1962. # decode the contents of the JSON web token.
  1963. #
  1964. # Required if 'enabled' is true.
  1965. #
  1966. #secret: &quot;provided-by-your-issuer&quot;
  1967. # The algorithm used to sign the JSON web token.
  1968. #
  1969. # Supported algorithms are listed at
  1970. # https://pyjwt.readthedocs.io/en/latest/algorithms.html
  1971. #
  1972. # Required if 'enabled' is true.
  1973. #
  1974. #algorithm: &quot;provided-by-your-issuer&quot;
  1975. # The issuer to validate the &quot;iss&quot; claim against.
  1976. #
  1977. # Optional, if provided the &quot;iss&quot; claim will be required and
  1978. # validated for all JSON web tokens.
  1979. #
  1980. #issuer: &quot;provided-by-your-issuer&quot;
  1981. # A list of audiences to validate the &quot;aud&quot; claim against.
  1982. #
  1983. # Optional, if provided the &quot;aud&quot; claim will be required and
  1984. # validated for all JSON web tokens.
  1985. #
  1986. # Note that if the &quot;aud&quot; claim is included in a JSON web token then
  1987. # validation will fail without configuring audiences.
  1988. #
  1989. #audiences:
  1990. # - &quot;provided-by-your-issuer&quot;
  1991. password_config:
  1992. # Uncomment to disable password login
  1993. #
  1994. #enabled: false
  1995. # Uncomment to disable authentication against the local password
  1996. # database. This is ignored if `enabled` is false, and is only useful
  1997. # if you have other password_providers.
  1998. #
  1999. #localdb_enabled: false
  2000. # Uncomment and change to a secret random string for extra security.
  2001. # DO NOT CHANGE THIS AFTER INITIAL SETUP!
  2002. #
  2003. #pepper: &quot;EVEN_MORE_SECRET&quot;
  2004. # Define and enforce a password policy. Each parameter is optional.
  2005. # This is an implementation of MSC2000.
  2006. #
  2007. policy:
  2008. # Whether to enforce the password policy.
  2009. # Defaults to 'false'.
  2010. #
  2011. #enabled: true
  2012. # Minimum accepted length for a password.
  2013. # Defaults to 0.
  2014. #
  2015. #minimum_length: 15
  2016. # Whether a password must contain at least one digit.
  2017. # Defaults to 'false'.
  2018. #
  2019. #require_digit: true
  2020. # Whether a password must contain at least one symbol.
  2021. # A symbol is any character that's not a number or a letter.
  2022. # Defaults to 'false'.
  2023. #
  2024. #require_symbol: true
  2025. # Whether a password must contain at least one lowercase letter.
  2026. # Defaults to 'false'.
  2027. #
  2028. #require_lowercase: true
  2029. # Whether a password must contain at least one uppercase letter.
  2030. # Defaults to 'false'.
  2031. #
  2032. #require_uppercase: true
  2033. ui_auth:
  2034. # The amount of time to allow a user-interactive authentication session
  2035. # to be active.
  2036. #
  2037. # This defaults to 0, meaning the user is queried for their credentials
  2038. # before every action, but this can be overridden to allow a single
  2039. # validation to be re-used. This weakens the protections afforded by
  2040. # the user-interactive authentication process, by allowing for multiple
  2041. # (and potentially different) operations to use the same validation session.
  2042. #
  2043. # This is ignored for potentially &quot;dangerous&quot; operations (including
  2044. # deactivating an account, modifying an account password, and
  2045. # adding a 3PID).
  2046. #
  2047. # Uncomment below to allow for credential validation to last for 15
  2048. # seconds.
  2049. #
  2050. #session_timeout: &quot;15s&quot;
  2051. # Configuration for sending emails from Synapse.
  2052. #
  2053. # Server admins can configure custom templates for email content. See
  2054. # https://matrix-org.github.io/synapse/latest/templates.html for more information.
  2055. #
  2056. email:
  2057. # The hostname of the outgoing SMTP server to use. Defaults to 'localhost'.
  2058. #
  2059. #smtp_host: mail.server
  2060. # The port on the mail server for outgoing SMTP. Defaults to 25.
  2061. #
  2062. #smtp_port: 587
  2063. # Username/password for authentication to the SMTP server. By default, no
  2064. # authentication is attempted.
  2065. #
  2066. #smtp_user: &quot;exampleusername&quot;
  2067. #smtp_pass: &quot;examplepassword&quot;
  2068. # Uncomment the following to require TLS transport security for SMTP.
  2069. # By default, Synapse will connect over plain text, and will then switch to
  2070. # TLS via STARTTLS *if the SMTP server supports it*. If this option is set,
  2071. # Synapse will refuse to connect unless the server supports STARTTLS.
  2072. #
  2073. #require_transport_security: true
  2074. # Uncomment the following to disable TLS for SMTP.
  2075. #
  2076. # By default, if the server supports TLS, it will be used, and the server
  2077. # must present a certificate that is valid for 'smtp_host'. If this option
  2078. # is set to false, TLS will not be used.
  2079. #
  2080. #enable_tls: false
  2081. # notif_from defines the &quot;From&quot; address to use when sending emails.
  2082. # It must be set if email sending is enabled.
  2083. #
  2084. # The placeholder '%(app)s' will be replaced by the application name,
  2085. # which is normally 'app_name' (below), but may be overridden by the
  2086. # Matrix client application.
  2087. #
  2088. # Note that the placeholder must be written '%(app)s', including the
  2089. # trailing 's'.
  2090. #
  2091. #notif_from: &quot;Your Friendly %(app)s homeserver &lt;noreply@example.com&gt;&quot;
  2092. # app_name defines the default value for '%(app)s' in notif_from and email
  2093. # subjects. It defaults to 'Matrix'.
  2094. #
  2095. #app_name: my_branded_matrix_server
  2096. # Uncomment the following to enable sending emails for messages that the user
  2097. # has missed. Disabled by default.
  2098. #
  2099. #enable_notifs: true
  2100. # Uncomment the following to disable automatic subscription to email
  2101. # notifications for new users. Enabled by default.
  2102. #
  2103. #notif_for_new_users: false
  2104. # Custom URL for client links within the email notifications. By default
  2105. # links will be based on &quot;https://matrix.to&quot;.
  2106. #
  2107. # (This setting used to be called riot_base_url; the old name is still
  2108. # supported for backwards-compatibility but is now deprecated.)
  2109. #
  2110. #client_base_url: &quot;http://localhost/riot&quot;
  2111. # Configure the time that a validation email will expire after sending.
  2112. # Defaults to 1h.
  2113. #
  2114. #validation_token_lifetime: 15m
  2115. # The web client location to direct users to during an invite. This is passed
  2116. # to the identity server as the org.matrix.web_client_location key. Defaults
  2117. # to unset, giving no guidance to the identity server.
  2118. #
  2119. #invite_client_location: https://app.element.io
  2120. # Subjects to use when sending emails from Synapse.
  2121. #
  2122. # The placeholder '%(app)s' will be replaced with the value of the 'app_name'
  2123. # setting above, or by a value dictated by the Matrix client application.
  2124. #
  2125. # If a subject isn't overridden in this configuration file, the value used as
  2126. # its example will be used.
  2127. #
  2128. #subjects:
  2129. # Subjects for notification emails.
  2130. #
  2131. # On top of the '%(app)s' placeholder, these can use the following
  2132. # placeholders:
  2133. #
  2134. # * '%(person)s', which will be replaced by the display name of the user(s)
  2135. # that sent the message(s), e.g. &quot;Alice and Bob&quot;.
  2136. # * '%(room)s', which will be replaced by the name of the room the
  2137. # message(s) have been sent to, e.g. &quot;My super room&quot;.
  2138. #
  2139. # See the example provided for each setting to see which placeholder can be
  2140. # used and how to use them.
  2141. #
  2142. # Subject to use to notify about one message from one or more user(s) in a
  2143. # room which has a name.
  2144. #message_from_person_in_room: &quot;[%(app)s] You have a message on %(app)s from %(person)s in the %(room)s room...&quot;
  2145. #
  2146. # Subject to use to notify about one message from one or more user(s) in a
  2147. # room which doesn't have a name.
  2148. #message_from_person: &quot;[%(app)s] You have a message on %(app)s from %(person)s...&quot;
  2149. #
  2150. # Subject to use to notify about multiple messages from one or more users in
  2151. # a room which doesn't have a name.
  2152. #messages_from_person: &quot;[%(app)s] You have messages on %(app)s from %(person)s...&quot;
  2153. #
  2154. # Subject to use to notify about multiple messages in a room which has a
  2155. # name.
  2156. #messages_in_room: &quot;[%(app)s] You have messages on %(app)s in the %(room)s room...&quot;
  2157. #
  2158. # Subject to use to notify about multiple messages in multiple rooms.
  2159. #messages_in_room_and_others: &quot;[%(app)s] You have messages on %(app)s in the %(room)s room and others...&quot;
  2160. #
  2161. # Subject to use to notify about multiple messages from multiple persons in
  2162. # multiple rooms. This is similar to the setting above except it's used when
  2163. # the room in which the notification was triggered has no name.
  2164. #messages_from_person_and_others: &quot;[%(app)s] You have messages on %(app)s from %(person)s and others...&quot;
  2165. #
  2166. # Subject to use to notify about an invite to a room which has a name.
  2167. #invite_from_person_to_room: &quot;[%(app)s] %(person)s has invited you to join the %(room)s room on %(app)s...&quot;
  2168. #
  2169. # Subject to use to notify about an invite to a room which doesn't have a
  2170. # name.
  2171. #invite_from_person: &quot;[%(app)s] %(person)s has invited you to chat on %(app)s...&quot;
  2172. # Subject for emails related to account administration.
  2173. #
  2174. # On top of the '%(app)s' placeholder, these one can use the
  2175. # '%(server_name)s' placeholder, which will be replaced by the value of the
  2176. # 'server_name' setting in your Synapse configuration.
  2177. #
  2178. # Subject to use when sending a password reset email.
  2179. #password_reset: &quot;[%(server_name)s] Password reset&quot;
  2180. #
  2181. # Subject to use when sending a verification email to assert an address's
  2182. # ownership.
  2183. #email_validation: &quot;[%(server_name)s] Validate your email&quot;
  2184. # Password providers allow homeserver administrators to integrate
  2185. # their Synapse installation with existing authentication methods
  2186. # ex. LDAP, external tokens, etc.
  2187. #
  2188. # For more information and known implementations, please see
  2189. # https://matrix-org.github.io/synapse/latest/password_auth_providers.html
  2190. #
  2191. # Note: instances wishing to use SAML or CAS authentication should
  2192. # instead use the `saml2_config` or `cas_config` options,
  2193. # respectively.
  2194. #
  2195. password_providers:
  2196. # # Example config for an LDAP auth provider
  2197. # - module: &quot;ldap_auth_provider.LdapAuthProvider&quot;
  2198. # config:
  2199. # enabled: true
  2200. # uri: &quot;ldap://ldap.example.com:389&quot;
  2201. # start_tls: true
  2202. # base: &quot;ou=users,dc=example,dc=com&quot;
  2203. # attributes:
  2204. # uid: &quot;cn&quot;
  2205. # mail: &quot;email&quot;
  2206. # name: &quot;givenName&quot;
  2207. # #bind_dn:
  2208. # #bind_password:
  2209. # #filter: &quot;(objectClass=posixAccount)&quot;
  2210. ## Push ##
  2211. push:
  2212. # Clients requesting push notifications can either have the body of
  2213. # the message sent in the notification poke along with other details
  2214. # like the sender, or just the event ID and room ID (`event_id_only`).
  2215. # If clients choose the former, this option controls whether the
  2216. # notification request includes the content of the event (other details
  2217. # like the sender are still included). For `event_id_only` push, it
  2218. # has no effect.
  2219. #
  2220. # For modern android devices the notification content will still appear
  2221. # because it is loaded by the app. iPhone, however will send a
  2222. # notification saying only that a message arrived and who it came from.
  2223. #
  2224. # The default value is &quot;true&quot; to include message details. Uncomment to only
  2225. # include the event ID and room ID in push notification payloads.
  2226. #
  2227. #include_content: false
  2228. # When a push notification is received, an unread count is also sent.
  2229. # This number can either be calculated as the number of unread messages
  2230. # for the user, or the number of *rooms* the user has unread messages in.
  2231. #
  2232. # The default value is &quot;true&quot;, meaning push clients will see the number of
  2233. # rooms with unread messages in them. Uncomment to instead send the number
  2234. # of unread messages.
  2235. #
  2236. #group_unread_count_by_room: false
  2237. ## Rooms ##
  2238. # Controls whether locally-created rooms should be end-to-end encrypted by
  2239. # default.
  2240. #
  2241. # Possible options are &quot;all&quot;, &quot;invite&quot;, and &quot;off&quot;. They are defined as:
  2242. #
  2243. # * &quot;all&quot;: any locally-created room
  2244. # * &quot;invite&quot;: any room created with the &quot;private_chat&quot; or &quot;trusted_private_chat&quot;
  2245. # room creation presets
  2246. # * &quot;off&quot;: this option will take no effect
  2247. #
  2248. # The default value is &quot;off&quot;.
  2249. #
  2250. # Note that this option will only affect rooms created after it is set. It
  2251. # will also not affect rooms created by other servers.
  2252. #
  2253. #encryption_enabled_by_default_for_room_type: invite
  2254. # Uncomment to allow non-server-admin users to create groups on this server
  2255. #
  2256. #enable_group_creation: true
  2257. # If enabled, non server admins can only create groups with local parts
  2258. # starting with this prefix
  2259. #
  2260. #group_creation_prefix: &quot;unofficial_&quot;
  2261. # User Directory configuration
  2262. #
  2263. user_directory:
  2264. # Defines whether users can search the user directory. If false then
  2265. # empty responses are returned to all queries. Defaults to true.
  2266. #
  2267. # Uncomment to disable the user directory.
  2268. #
  2269. #enabled: false
  2270. # Defines whether to search all users visible to your HS when searching
  2271. # the user directory. If false, search results will only contain users
  2272. # visible in public rooms and users sharing a room with the requester.
  2273. # Defaults to false.
  2274. #
  2275. # NB. If you set this to true, and the last time the user_directory search
  2276. # indexes were (re)built was before Synapse 1.44, you'll have to
  2277. # rebuild the indexes in order to search through all known users.
  2278. # These indexes are built the first time Synapse starts; admins can
  2279. # manually trigger a rebuild following the instructions at
  2280. # https://matrix-org.github.io/synapse/latest/user_directory.html
  2281. #
  2282. # Uncomment to return search results containing all known users, even if that
  2283. # user does not share a room with the requester.
  2284. #
  2285. #search_all_users: true
  2286. # Defines whether to prefer local users in search query results.
  2287. # If True, local users are more likely to appear above remote users
  2288. # when searching the user directory. Defaults to false.
  2289. #
  2290. # Uncomment to prefer local over remote users in user directory search
  2291. # results.
  2292. #
  2293. #prefer_local_users: true
  2294. # User Consent configuration
  2295. #
  2296. # for detailed instructions, see
  2297. # https://matrix-org.github.io/synapse/latest/consent_tracking.html
  2298. #
  2299. # Parts of this section are required if enabling the 'consent' resource under
  2300. # 'listeners', in particular 'template_dir' and 'version'.
  2301. #
  2302. # 'template_dir' gives the location of the templates for the HTML forms.
  2303. # This directory should contain one subdirectory per language (eg, 'en', 'fr'),
  2304. # and each language directory should contain the policy document (named as
  2305. # '&lt;version&gt;.html') and a success page (success.html).
  2306. #
  2307. # 'version' specifies the 'current' version of the policy document. It defines
  2308. # the version to be served by the consent resource if there is no 'v'
  2309. # parameter.
  2310. #
  2311. # 'server_notice_content', if enabled, will send a user a &quot;Server Notice&quot;
  2312. # asking them to consent to the privacy policy. The 'server_notices' section
  2313. # must also be configured for this to work. Notices will *not* be sent to
  2314. # guest users unless 'send_server_notice_to_guests' is set to true.
  2315. #
  2316. # 'block_events_error', if set, will block any attempts to send events
  2317. # until the user consents to the privacy policy. The value of the setting is
  2318. # used as the text of the error.
  2319. #
  2320. # 'require_at_registration', if enabled, will add a step to the registration
  2321. # process, similar to how captcha works. Users will be required to accept the
  2322. # policy before their account is created.
  2323. #
  2324. # 'policy_name' is the display name of the policy users will see when registering
  2325. # for an account. Has no effect unless `require_at_registration` is enabled.
  2326. # Defaults to &quot;Privacy Policy&quot;.
  2327. #
  2328. #user_consent:
  2329. # template_dir: res/templates/privacy
  2330. # version: 1.0
  2331. # server_notice_content:
  2332. # msgtype: m.text
  2333. # body: &gt;-
  2334. # To continue using this homeserver you must review and agree to the
  2335. # terms and conditions at %(consent_uri)s
  2336. # send_server_notice_to_guests: true
  2337. # block_events_error: &gt;-
  2338. # To continue using this homeserver you must review and agree to the
  2339. # terms and conditions at %(consent_uri)s
  2340. # require_at_registration: false
  2341. # policy_name: Privacy Policy
  2342. #
  2343. # Settings for local room and user statistics collection. See
  2344. # https://matrix-org.github.io/synapse/latest/room_and_user_statistics.html.
  2345. #
  2346. stats:
  2347. # Uncomment the following to disable room and user statistics. Note that doing
  2348. # so may cause certain features (such as the room directory) not to work
  2349. # correctly.
  2350. #
  2351. #enabled: false
  2352. # Server Notices room configuration
  2353. #
  2354. # Uncomment this section to enable a room which can be used to send notices
  2355. # from the server to users. It is a special room which cannot be left; notices
  2356. # come from a special &quot;notices&quot; user id.
  2357. #
  2358. # If you uncomment this section, you *must* define the system_mxid_localpart
  2359. # setting, which defines the id of the user which will be used to send the
  2360. # notices.
  2361. #
  2362. # It's also possible to override the room name, the display name of the
  2363. # &quot;notices&quot; user, and the avatar for the user.
  2364. #
  2365. #server_notices:
  2366. # system_mxid_localpart: notices
  2367. # system_mxid_display_name: &quot;Server Notices&quot;
  2368. # system_mxid_avatar_url: &quot;mxc://server.com/oumMVlgDnLYFaPVkExemNVVZ&quot;
  2369. # room_name: &quot;Server Notices&quot;
  2370. # Uncomment to disable searching the public room list. When disabled
  2371. # blocks searching local and remote room lists for local and remote
  2372. # users by always returning an empty list for all queries.
  2373. #
  2374. #enable_room_list_search: false
  2375. # The `alias_creation` option controls who's allowed to create aliases
  2376. # on this server.
  2377. #
  2378. # The format of this option is a list of rules that contain globs that
  2379. # match against user_id, room_id and the new alias (fully qualified with
  2380. # server name). The action in the first rule that matches is taken,
  2381. # which can currently either be &quot;allow&quot; or &quot;deny&quot;.
  2382. #
  2383. # Missing user_id/room_id/alias fields default to &quot;*&quot;.
  2384. #
  2385. # If no rules match the request is denied. An empty list means no one
  2386. # can create aliases.
  2387. #
  2388. # Options for the rules include:
  2389. #
  2390. # user_id: Matches against the creator of the alias
  2391. # alias: Matches against the alias being created
  2392. # room_id: Matches against the room ID the alias is being pointed at
  2393. # action: Whether to &quot;allow&quot; or &quot;deny&quot; the request if the rule matches
  2394. #
  2395. # The default is:
  2396. #
  2397. #alias_creation_rules:
  2398. # - user_id: &quot;*&quot;
  2399. # alias: &quot;*&quot;
  2400. # room_id: &quot;*&quot;
  2401. # action: allow
  2402. # The `room_list_publication_rules` option controls who can publish and
  2403. # which rooms can be published in the public room list.
  2404. #
  2405. # The format of this option is the same as that for
  2406. # `alias_creation_rules`.
  2407. #
  2408. # If the room has one or more aliases associated with it, only one of
  2409. # the aliases needs to match the alias rule. If there are no aliases
  2410. # then only rules with `alias: *` match.
  2411. #
  2412. # If no rules match the request is denied. An empty list means no one
  2413. # can publish rooms.
  2414. #
  2415. # Options for the rules include:
  2416. #
  2417. # user_id: Matches against the creator of the alias
  2418. # room_id: Matches against the room ID being published
  2419. # alias: Matches against any current local or canonical aliases
  2420. # associated with the room
  2421. # action: Whether to &quot;allow&quot; or &quot;deny&quot; the request if the rule matches
  2422. #
  2423. # The default is:
  2424. #
  2425. #room_list_publication_rules:
  2426. # - user_id: &quot;*&quot;
  2427. # alias: &quot;*&quot;
  2428. # room_id: &quot;*&quot;
  2429. # action: allow
  2430. ## Opentracing ##
  2431. # These settings enable opentracing, which implements distributed tracing.
  2432. # This allows you to observe the causal chains of events across servers
  2433. # including requests, key lookups etc., across any server running
  2434. # synapse or any other other services which supports opentracing
  2435. # (specifically those implemented with Jaeger).
  2436. #
  2437. opentracing:
  2438. # tracing is disabled by default. Uncomment the following line to enable it.
  2439. #
  2440. #enabled: true
  2441. # The list of homeservers we wish to send and receive span contexts and span baggage.
  2442. # See https://matrix-org.github.io/synapse/latest/opentracing.html.
  2443. #
  2444. # This is a list of regexes which are matched against the server_name of the
  2445. # homeserver.
  2446. #
  2447. # By default, it is empty, so no servers are matched.
  2448. #
  2449. #homeserver_whitelist:
  2450. # - &quot;.*&quot;
  2451. # A list of the matrix IDs of users whose requests will always be traced,
  2452. # even if the tracing system would otherwise drop the traces due to
  2453. # probabilistic sampling.
  2454. #
  2455. # By default, the list is empty.
  2456. #
  2457. #force_tracing_for_users:
  2458. # - &quot;@user1:server_name&quot;
  2459. # - &quot;@user2:server_name&quot;
  2460. # Jaeger can be configured to sample traces at different rates.
  2461. # All configuration options provided by Jaeger can be set here.
  2462. # Jaeger's configuration is mostly related to trace sampling which
  2463. # is documented here:
  2464. # https://www.jaegertracing.io/docs/latest/sampling/.
  2465. #
  2466. #jaeger_config:
  2467. # sampler:
  2468. # type: const
  2469. # param: 1
  2470. # logging:
  2471. # false
  2472. ## Workers ##
  2473. # Disables sending of outbound federation transactions on the main process.
  2474. # Uncomment if using a federation sender worker.
  2475. #
  2476. #send_federation: false
  2477. # It is possible to run multiple federation sender workers, in which case the
  2478. # work is balanced across them.
  2479. #
  2480. # This configuration must be shared between all federation sender workers, and if
  2481. # changed all federation sender workers must be stopped at the same time and then
  2482. # started, to ensure that all instances are running with the same config (otherwise
  2483. # events may be dropped).
  2484. #
  2485. #federation_sender_instances:
  2486. # - federation_sender1
  2487. # When using workers this should be a map from `worker_name` to the
  2488. # HTTP replication listener of the worker, if configured.
  2489. #
  2490. #instance_map:
  2491. # worker1:
  2492. # host: localhost
  2493. # port: 8034
  2494. # Experimental: When using workers you can define which workers should
  2495. # handle event persistence and typing notifications. Any worker
  2496. # specified here must also be in the `instance_map`.
  2497. #
  2498. #stream_writers:
  2499. # events: worker1
  2500. # typing: worker1
  2501. # The worker that is used to run background tasks (e.g. cleaning up expired
  2502. # data). If not provided this defaults to the main process.
  2503. #
  2504. #run_background_tasks_on: worker1
  2505. # A shared secret used by the replication APIs to authenticate HTTP requests
  2506. # from workers.
  2507. #
  2508. # By default this is unused and traffic is not authenticated.
  2509. #
  2510. #worker_replication_secret: &quot;&quot;
  2511. # Configuration for Redis when using workers. This *must* be enabled when
  2512. # using workers (unless using old style direct TCP configuration).
  2513. #
  2514. redis:
  2515. # Uncomment the below to enable Redis support.
  2516. #
  2517. #enabled: true
  2518. # Optional host and port to use to connect to redis. Defaults to
  2519. # localhost and 6379
  2520. #
  2521. #host: localhost
  2522. #port: 6379
  2523. # Optional password if configured on the Redis instance
  2524. #
  2525. #password: &lt;secret_password&gt;
  2526. </code></pre>
  2527. </main>
  2528. <nav class="nav-wrapper" aria-label="Page navigation">
  2529. <!-- Mobile navigation buttons -->
  2530. <a rel="prev" href="../../usage/configuration/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
  2531. <i class="fa fa-angle-left"></i>
  2532. </a>
  2533. <a rel="next" href="../../usage/configuration/logging_sample_config.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
  2534. <i class="fa fa-angle-right"></i>
  2535. </a>
  2536. <div style="clear: both"></div>
  2537. </nav>
  2538. </div>
  2539. </div>
  2540. <nav class="nav-wide-wrapper" aria-label="Page navigation">
  2541. <a rel="prev" href="../../usage/configuration/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
  2542. <i class="fa fa-angle-left"></i>
  2543. </a>
  2544. <a rel="next" href="../../usage/configuration/logging_sample_config.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
  2545. <i class="fa fa-angle-right"></i>
  2546. </a>
  2547. </nav>
  2548. </div>
  2549. <script type="text/javascript">
  2550. window.playground_copyable = true;
  2551. </script>
  2552. <script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
  2553. <script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
  2554. <script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
  2555. <script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
  2556. <script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
  2557. <script src="../../book.js" type="text/javascript" charset="utf-8"></script>
  2558. <!-- Custom JS scripts -->
  2559. <script type="text/javascript" src="../../docs/website_files/table-of-contents.js"></script>
  2560. <script type="text/javascript" src="../../docs/website_files/version-picker.js"></script>
  2561. <script type="text/javascript" src="../../docs/website_files/version.js"></script>
  2562. </body>
  2563. </html>