<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Matrix Authentication Service]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/matrix" aria-label="Profile: matrix">@<bdi>matrix</bdi></a> users</p>
<p dir="auto">I have looked into the <a href="https://github.com/element-hq/matrix-authentication-service" target="_blank" rel="noopener noreferrer nofollow ugc">Matrix Authentication Service</a> which is needed for the QR-Code device linking and more.<br />
Also related to these two forum topics: <a href="https://forum.cloudron.io/post/97697">https://forum.cloudron.io/post/97697</a> and <a href="https://forum.cloudron.io/post/105680">https://forum.cloudron.io/post/105680</a> and <a href="https://forum.cloudron.io/post/100138">https://forum.cloudron.io/post/100138</a></p>
<hr />
<h1><a href="https://github.com/element-hq/matrix-authentication-service" target="_blank" rel="noopener noreferrer nofollow ugc">Matrix Authentication Service</a> for Cloudron</h1>
<h2><strong>This will get complicated!</strong></h2>
<p dir="auto"><strong><img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=090c346130c" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ WARNING <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=090c346130c" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️</strong></p>
<blockquote>
<p dir="auto">You need Cloudron version 9.1 to follow this guide.</p>
<p dir="auto">If you are not comfortable with installing custom apps, tinkering with configurations this is nothing for you.</p>
</blockquote>
<p dir="auto"><strong><img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=090c346130c" class="not-responsive emoji emoji-android emoji--x" style="height:23px;width:auto;vertical-align:middle" title="❌" alt="❌" /> DANGER <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=090c346130c" class="not-responsive emoji emoji-android emoji--x" style="height:23px;width:auto;vertical-align:middle" title="❌" alt="❌" /></strong></p>
<blockquote>
<p dir="auto">Do not follow this guide with your production matrix synapse server!</p>
<p dir="auto">This could lead to a full failure of your synapse server where users will be unable to login.</p>
<p dir="auto">You should install an extra Element and Synapse app to follow this guide.</p>
</blockquote>
<p dir="auto">Please note that the Matrix Authentication Service will be become part of synapse it self at some point =&gt; </p><div class="embed-wrapper"><div class="embed-container"><iframe src="https://www.youtube.com/embed/wOW8keNafdE" frameborder="0" allowfullscreen></iframe></div></div>.<p></p>
<p dir="auto">Also from <a href="https://areweoidcyet.com/" target="_blank" rel="noopener noreferrer nofollow ugc">https://areweoidcyet.com/</a></p>
<blockquote>
<p dir="auto">At this stage, it is still a separate service, requiring a one-way migration from a classic Synapse deployment. It is designed to be lightweight enough (using Rust) that it will be embedded in Synapse at some point.</p>
</blockquote>
<p dir="auto">So all this work will become obsolete at some point.</p>
<h2>Install the Matrix Authentication Service app</h2>
<h3><a href="https://docs.cloudron.io/apps#community-app" target="_blank" rel="noopener noreferrer nofollow ugc">Commnuity App</a></h3>
<p dir="auto">Use the <code>CloudronVersions.json</code> file to install this <a href="https://docs.cloudron.io/apps#community-app" target="_blank" rel="noopener noreferrer nofollow ugc">Commnuity App</a>:</p>
<pre><code>https://git.cloudron.io/playground/matrix-authentication-service/-/raw/master/CloudronVersions.json
</code></pre>
<h3><a href="https://docs.cloudron.io/packaging/cli" target="_blank" rel="noopener noreferrer nofollow ugc">Cloudron cli</a></h3>
<ol>
<li>Clone this repository</li>
</ol>
<pre><code class="language-bash">git clone https://git.cloudron.io/playground/matrix-authentication-service.git
cd matrix-authentication-service
</code></pre>
<ol start="2">
<li>Login to your Cloudron server</li>
</ol>
<pre><code class="language-bash">cloudron login my.cloudron.dev
</code></pre>
<ol start="3">
<li>Install this app to a location</li>
</ol>
<pre><code class="language-bash">cloudron install --location mas
</code></pre>
<h2>Configuration of MAS and Synapse</h2>
<p dir="auto">The <a href="https://github.com/element-hq/matrix-authentication-service" target="_blank" rel="noopener noreferrer nofollow ugc">Matrix Authentication Service</a> for Cloudron will setup the <code>/app/data/config.yaml</code> on the first run and will <strong>not</strong> edit it while the <code>/app/data/.initialized</code> file exists.</p>
<p dir="auto">The initial generated config is created to ensure that the baseline configuration is correct.</p>
<p dir="auto">It also configured the upstream_oauth2 provider for Cloudron so your Cloudron users can use the MAS app.</p>
<p dir="auto">Adding other upstream_oauth2 providers is semi supported.<br />
Each upstream_oauth2 needs a unique ULID which needs to be configured in the <a href="https://git.cloudron.io/playground/matrix-authentication-service/-/blob/master/CloudronManifest.json?ref_type=heads#L46-L48" target="_blank" rel="noopener noreferrer nofollow ugc">CloudronManifest.json - oidc addon section loginRedirectUri</a></p>
<p dir="auto">Regenerating the entire config file will lose secrets and encryption keys.<br />
This will cause all existing users to be inaccessible!</p>
<p dir="auto">Before tinkering with the <code>/app/data/config.yaml</code> create an app backup to ensure that if you make a mistake and cause damage you can revert to the backup.</p>
<h3>Synapse Homeserver</h3>
<p dir="auto">Needed <code>yaml</code> configuration for the Synapse Homeserver <code>/app/data/configs/homeserver.yaml</code>:</p>
<p dir="auto">Example entries:</p>
<pre><code class="language-yaml"># The matrix home server needs to delegate authentication to the MAS
matrix_authentication_service:
  enabled: true
  endpoint: https://mas.cloudron.dev
  secret: "YDudMp7Kq3htKx7Z1lrqExATpQbuhzXZ"
  # Alternatively, using a file:
  # secret_file: /path/to/secret.txt
# Config must disable password config in order to delegate everything to mas
password_config:
  enabled: false
# same with registration
enable_registration: false
# to enable the QR-Code device linking
experimental_features:
  msc4108_enabled: true
</code></pre>
<p dir="auto">Obtain the secret for the synapse home server from your MAS app with either the <a href="https://docs.cloudron.io/packaging/cli" target="_blank" rel="noopener noreferrer nofollow ugc">Cloudron cli</a> or use the <a href="https://docs.cloudron.io/apps#file-manager" target="_blank" rel="noopener noreferrer nofollow ugc">File Manager</a> from the <code>/app/data/config.yaml</code>:</p>
<pre><code class="language-bash">cloudron exec --app mas -- yq -r '.matrix.secret' /app/data/config.yaml
YDudMp7Kq3htKx7Z1lrqExATpQbuhzXZ
</code></pre>
<p dir="auto">For the Cloudron <a href="https://docs.cloudron.io/packages/synapse" target="_blank" rel="noopener noreferrer nofollow ugc">Matrix Synapse App</a> app, edit the <code>/app/data/configs/homeserver.yaml</code> manually with the <a href="https://docs.cloudron.io/apps#file-manager" target="_blank" rel="noopener noreferrer nofollow ugc">File Manager</a> or use this <code>yq</code> command:</p>
<pre><code class="language-bash"># Edit these two variables to match your domain and secret from the MAS app
export MAS_ENDPOINT="https://mas.cloudron.dev"
export MAS_SECRET="YDudMp7Kq3htKx7Z1lrqExATpQbuhzXZ"
yq -i '
  .matrix_authentication_service.enabled = true |
  .matrix_authentication_service.endpoint = strenv(MAS_ENDPOINT) |
  .matrix_authentication_service.secret = strenv(MAS_SECRET) |
  .password_config.enabled = false |
  .enable_registration = false |
  .experimental_features.msc4108_enabled = true
' /app/data/configs/homeserver.yaml
</code></pre>
<p dir="auto">Restart the app to load the changed configuration.</p>
<h2>MAS</h2>
<p dir="auto">Configure the <code>/app/data/config.yaml</code> with either the <a href="https://docs.cloudron.io/packaging/cli" target="_blank" rel="noopener noreferrer nofollow ugc">Cloudron cli</a> or use the <a href="https://docs.cloudron.io/apps#file-manager" target="_blank" rel="noopener noreferrer nofollow ugc">File Manager</a>.</p>
<p dir="auto">The full configuration reference can be found here: <a href="https://element-hq.github.io/matrix-authentication-service/reference/configuration.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://element-hq.github.io/matrix-authentication-service/reference/configuration.html</a></p>
<p dir="auto">The <code>yaml</code> object should look like this in the <code>/app/data/config.yaml</code>:</p>
<pre><code class="language-yaml">matrix:
  kind: synapse
  homeserver: matrix.cloudron.dev
  secret: YDudMp7Kq3htKx7Z1lrqExATpQbuhzXZ
  endpoint: https://matrix.cloudron.dev/
</code></pre>
<pre><code class="language-bash">cloudron exec --tty --app mas
export MATRIX_HOMESERVER_DOMAIN="matrix.cloudron.dev"
export MAS_MATRIX_SECRET="YDudMp7Kq3htKx7Z1lrqExATpQbuhzXZ"
yq -i '
  .matrix.kind = "synapse" |
  .matrix.homeserver = strenv(MATRIX_HOMESERVER_DOMAIN) |
  .matrix.secret = strenv(MAS_MATRIX_SECRET) |
  .matrix.endpoint = "https://" + strenv(MATRIX_HOMESERVER_DOMAIN) + "/"
' /app/data/config.yaml
</code></pre>
<p dir="auto">Restart the app to load the changed configuration.</p>
<h2>Conclusion</h2>
<p dir="auto">Now the Matrix Home Server will use the MAS app for authentication.</p>
<p dir="auto">This also enables Element to use the Link new device with the QR-Code feature and enables the Element X mobile app to fully work.</p>
]]></description><link>https://forum.cloudron.io/topic/15225/matrix-authentication-service</link><generator>RSS for Node</generator><lastBuildDate>Fri, 14 Aug 2026 06:12:24 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/15225.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 13 Mar 2026 10:19:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Matrix Authentication Service on Wed, 15 Apr 2026 00:33:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/james" aria-label="Profile: james">@<bdi>james</bdi></a> Yeah it was the Matrix app and MAS app for cloudron I was trying to set up</p>
]]></description><link>https://forum.cloudron.io/post/123426</link><guid isPermaLink="true">https://forum.cloudron.io/post/123426</guid><dc:creator><![CDATA[murgero]]></dc:creator><pubDate>Wed, 15 Apr 2026 00:33:29 GMT</pubDate></item><item><title><![CDATA[Reply to Matrix Authentication Service on Tue, 14 Apr 2026 10:20:51 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/murgero" aria-label="Profile: murgero">@<bdi>murgero</bdi></a><br />
Did you attempt to use the MAS app with your current matrix server?<br />
If so, I think a migration needs to be done which we did not look into yet.<br />
See: <a href="https://forum.cloudron.io/topic/15013/element-server-suite/16">https://forum.cloudron.io/topic/15013/element-server-suite/16</a></p>
]]></description><link>https://forum.cloudron.io/post/123398</link><guid isPermaLink="true">https://forum.cloudron.io/post/123398</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Tue, 14 Apr 2026 10:20:51 GMT</pubDate></item><item><title><![CDATA[Reply to Matrix Authentication Service on Mon, 13 Apr 2026 22:25:30 GMT]]></title><description><![CDATA[<p dir="auto">When I follow this guide, my matrix synapse server returns that it cannot do MAS and SSO at the same time? Any idea how to get around that? I'd love to be able to use this to get voice calls working.</p>
]]></description><link>https://forum.cloudron.io/post/123365</link><guid isPermaLink="true">https://forum.cloudron.io/post/123365</guid><dc:creator><![CDATA[murgero]]></dc:creator><pubDate>Mon, 13 Apr 2026 22:25:30 GMT</pubDate></item><item><title><![CDATA[Reply to Matrix Authentication Service on Mon, 16 Mar 2026 07:11:40 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/andreasdueren" aria-label="Profile: andreasdueren">@<bdi>andreasdueren</bdi></a></p>
<p dir="auto">At some point MAS will be integrated into synapse.<br />
When this happens automatic migration will be handled.</p>
]]></description><link>https://forum.cloudron.io/post/121930</link><guid isPermaLink="true">https://forum.cloudron.io/post/121930</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Mon, 16 Mar 2026 07:11:40 GMT</pubDate></item><item><title><![CDATA[Reply to Matrix Authentication Service on Mon, 16 Mar 2026 01:06:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/james" aria-label="Profile: James">@<bdi>James</bdi></a> I am aware, I mean migrating from the stock Matrix app</p>
<p dir="auto">Edit: Nevermind I completely misread, I thought this is a replacement for synapse including MAS but its MAS standalone</p>
]]></description><link>https://forum.cloudron.io/post/121913</link><guid isPermaLink="true">https://forum.cloudron.io/post/121913</guid><dc:creator><![CDATA[andreasdueren]]></dc:creator><pubDate>Mon, 16 Mar 2026 01:06:41 GMT</pubDate></item><item><title><![CDATA[Reply to Matrix Authentication Service on Mon, 16 Mar 2026 07:10:58 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/andreasdueren" aria-label="Profile: andreasdueren">@<bdi>andreasdueren</bdi></a><br />
There is no cloudron stock app for the MAS service.</p>
]]></description><link>https://forum.cloudron.io/post/121896</link><guid isPermaLink="true">https://forum.cloudron.io/post/121896</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Mon, 16 Mar 2026 07:10:58 GMT</pubDate></item><item><title><![CDATA[Reply to Matrix Authentication Service on Sun, 15 Mar 2026 06:12:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/james" aria-label="Profile: James">@<bdi>James</bdi></a> Nice, have you tested rolling back the backup from the cloudron stock app as a form of migration of an existing instance?</p>
]]></description><link>https://forum.cloudron.io/post/121880</link><guid isPermaLink="true">https://forum.cloudron.io/post/121880</guid><dc:creator><![CDATA[andreasdueren]]></dc:creator><pubDate>Sun, 15 Mar 2026 06:12:55 GMT</pubDate></item><item><title><![CDATA[Reply to Matrix Authentication Service on Fri, 13 Mar 2026 16:59:52 GMT]]></title><description><![CDATA[<p dir="auto">Many thanks for doing this. Think it's a bit too involved for me though so I'll probably just wait until it's part of Synapse itself.</p>
]]></description><link>https://forum.cloudron.io/post/121804</link><guid isPermaLink="true">https://forum.cloudron.io/post/121804</guid><dc:creator><![CDATA[jdaviescoates]]></dc:creator><pubDate>Fri, 13 Mar 2026 16:59:52 GMT</pubDate></item></channel></rss>