32 lines
1.5 KiB
Markdown
32 lines
1.5 KiB
Markdown
# matrix-room-exporter
|
|
|
|
_Export a Matrix a room._
|
|
|
|
A quick-n-dirty bot that exports a Matrix room and uploads the archive to a Cloudflare R2 bucket for the room to
|
|
download.
|
|
|
|
### Install
|
|
|
|
1. `pip install -r requirements.txt`
|
|
2. `sudo apt install redis-server && sudo systemctl enable --now redis-server`
|
|
3`cp config.yml.sample config.yml`
|
|
4. [Create a Cloudflare R2 bucket](https://developers.cloudflare.com/r2/get-started/#2-create-a-bucket).
|
|
5. Enable [public access](https://developers.cloudflare.com/r2/buckets/public-buckets/).
|
|
6. Create an [access key](https://developers.cloudflare.com/r2/api/s3/tokens/).
|
|
7. Configure `config.yml` with your R2 credentials.
|
|
8. Set up an [object lifecycle rule](https://developers.cloudflare.com/r2/buckets/object-lifecycles) to auto-delete old exports from your bucket. 24 hours is a good choice.
|
|
9. Set up a [matrix-org/pantalaimon](https://github.com/matrix-org/pantalaimon) for encrypted sync.
|
|
10. Create a new Matrix user and configure it in `config.yml`
|
|
11. Add your username to `allowed_to_export` in `config.yml`
|
|
12. Start the bot with `python3 main.py`
|
|
|
|
### Use
|
|
|
|
1. Invite the new bot to the room you want to export.
|
|
2. Send the message `!export` to start the export process.
|
|
|
|
The bot will upload the exported room to your R2 bucket and share the link with the room.
|
|
|
|
Remember, if your room is encrypted and new members can't see old history prior to their joining then the bot won't be
|
|
able to export anything earlier than when it joined.able to export anything earlier than when it joined.
|