# Matrix Bridge Configuration

This Rocket.Chat workspace configuration to link matrix homeserver applies only to [#manual-installation](https://funke-olasupo.gitbook.io/user-guide/6.5/use-rocket.chat/workspace-administration/settings/federation/matrix-bridge/matrix-homeserver-setup#manual-installation "mention"). It is automatically done for [#automated-installation](https://funke-olasupo.gitbook.io/user-guide/6.5/use-rocket.chat/workspace-administration/settings/federation/matrix-bridge/matrix-homeserver-setup#automated-installation "mention").

{% hint style="warning" %}
Enable ![](https://content.gitbook.com/content/bt8UjMwvSvhZqV13FzmJ/blobs/uVmwCIivtIUU3SWoOS2j/Premium.svg) license or [apply trial](https://funke-olasupo.gitbook.io/user-guide/6.5/setup-and-configure/enterprise-edition-trial) on your workspace to unlock all the available federation features.
{% endhint %}

To access this setting,

* Navigate to ***Administration** > **Workspace** > **Settings** > **Federation > Matrix Bridge.***
* **Enable**: Turn on to enable federation with Matrix.
* **AppService ID:** A unique identifier for the Application Service. *It is automatically generated by Rocket.Chat*
* **Homeserver Token:** A unique homeserver token to authenticate requests to Application Services.
* **App Service Token:** A unique Application Service token to authenticate requests to homeservers. *It is automatically generated by Rocket.Chat*
* **Homeserver URL:** The URL of the Matrix server you want to use as your Proxy homeserver. e.g. `http://localhost:8008`
* **Homeserver Domain:** Your Matrix homeserver's name, the same as you've configured in your Matrix configuration file.
* **Bridge URL:** The URL for the Matrix bridge. It is the location you want your bridge should run.

{% hint style="warning" %}

* Ensure the port you use for the bridge is free in your host.
* We recommend you use a brand new Matrix Homeserver as your Proxy homeserver.
* We strongly recommend not connecting to this Matrix Homeserver with other Matrix clients.
  {% endhint %}

- **AppService User Localpart:** The bot user associated with the application service (Sometimes, it's used to execute some actions).
- **Maximum number of users when joining a public room in a remote server:** The number of the maximum users when joining a public room in a remote server. Public rooms with more users will be shown in the list of public rooms to join. However, they display a *Can't join* warning, and users won't be able to join those channels.

{% hint style="info" %}
Increasing the maximum number may consume a large amount of the resources in your infrastructure platform. It is recommended to adhere to the default size.
{% endhint %}

* **Registration**: Automatically generated and updated by Rocket.Chat based on all the values provided in the above settings (The [Application Service](https://funke-olasupo.gitbook.io/user-guide/6.5/use-rocket.chat/workspace-administration/settings/federation/matrix-bridge/matrix-homeserver-setup#manual-installation) is configured using this file).

{% hint style="info" %}
After any change is made to these settings, update the `registration.yml` file for the Application Service in `pp/matrix-federation-config`.Then restart your Matrix Homeserver and Rocket.Chat Server.

To learn more, see [#manual-installation](https://funke-olasupo.gitbook.io/user-guide/6.5/use-rocket.chat/workspace-administration/settings/federation/matrix-bridge/matrix-homeserver-setup#manual-installation "mention").
{% endhint %}
