Matrix Synapse

Learn how to configure Matrix Synapse for use with Filebase.

What is Matrix Synapse?

Matrix.org 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:

@username:matrix-room

Matrix Synapse is a homeserver implementation of Matrix.org. 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.

Prerequisites:

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 clonehttps://github.com/matrix-org/synapse-s3-storage-provider.git

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

./setup.py 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:

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

Last updated

Was this helpful?