homeserver_sample_config.html 119 KB

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