Matrix Synapse

Learn how to configure Matrix Synapse for use with Filebase.

What is Matrix Synapse? is an open federated instant messaging and VoIP ecosystem. Matrix uses environments called ‘rooms’, that are distributed domains located across multiple servers. Domains are accessed and references with the format:


Matrix Synapse is a homeserver implementation of Synapse is primarily written using Python and Python modules. The Synapse S3 Storage Provider module allows for connection of your Synapse Homeserver to Filebase.

Read below to learn how to use Matrix Synapse with Filebase.


1. Once you’ve installed Matrix, navigate into the installation directory.

By default on *unix systems, this is /etc/matrix-synapse.

2. Use the following command to download the synapse-s3-storage-provider module:

git clone

3. Install the synapse-s3-storage-provider module by navigating into the synapse-s3-storage-provider directory and running the installation script:

./ install

4. Navigate back into the /etc/matrix-synapse directory.

Open the homeserver.yaml file. Scroll down to the ‘Modules’ section and paste the following information:

- module: s3_storage_provider.S3StorageProviderBackend
  store_local: True
  store_remote: True
  store_synchronous: True
    # All of the below options are optional, for use with non-AWS S3-like
    # services, or to specify access tokens here instead of some external method.
    region_name: us-east-1
    access_key_id: FILEBASE_ACCESS_KEY
    secret_access_key: FILEBASE_SECRET_KEY

    # The object storage class used when uploading files to the bucket.
    # Default is STANDARD.
    #storage_class: "STANDARD_IA"

    # The maximum number of concurrent threads which will be used to connect
    # to S3. Each thread manages a single connection. Default is 40.
    #threadpool_size: 20

Replace the following values:

  • FILEBASE_BUCKET_NAME: Filebase Bucket Name

  • FILEBASE_ACCESS_KEY: Filebase Access Key

  • FILEBASE_SECRET_KEY: Filebase Secret Key

5. While within the homeserver.yaml file, take note of the postgresSQL database credentials under database.args.

6. Navigate into the ./synapse-s3-storage-provider/scripts directory, create a new file called database.yaml.

In this file, put your postgresSQL credentials.

7. Sync your files to be uploaded. This command syncs files that have not been updated in 2 months.

s3_media_upload update /path/to/media/store 2m

8. Then, upload these files to your Filebase bucket:

s3_media_upload upload /path/to/media/store FILEBASE_BUCKET_NAME--storage-class STANDARD_IA --delete

If you have any questions, please join our Discord server, or send us an email at

Last updated