The media repo has a fairly extensive configuration structure with support for live reloading, split configs, per-domain configs, and fine-grained control over individual features. This section covers the minimum for configuring a media repo and does not cover feature-specific areas of the config: those are left for other areas of this documentation.

The sample configuration can be found on GitHub.

Basic configuration

The following is the minimum required information to make use of MMR:

    # Generally the bind address should be local as MMR should be behind a
    # reverse proxy. If using Docker, set this to ``.
    bindAddress: ''
    port: 8000
    # Currently only PostgreSQL is supported. This is *not* the same as your
    # homeserver's database.
    postgres: "postgres://your_username:your_password@localhost/database_name?sslmode=require"
    - name:
      csApi: ""
    - ""
    - type: file
      id: "my_file_datastore"
      forKinds: ["all"]
        path: /data/media

For the homeservers, it's important to ensure that your server is correctly represented. The name must be the server name as it appears in your user ID. As mentioned in the deployment documentation, this will be what the media repo expects as a Host header too. The csApi is the URL for where the media repo can reach the homeserver for some tasks. Usually this will be the same URL used to configure Matrix clients, though it can be internally routed if needed.

At least one datastore needs to be supplied and enabled. More information about the datastores can be found in a later section.