2023-12-13 10:27:21 +01:00
# Docker-Matrix Role README
## Overview
This document serves as the README for the `docker-matrix` role, a part of the `CyMaIS` project. This role automates the deployment of a Matrix server using Docker.
Matrix is an open-source project that provides a protocol for secure, decentralized, real-time communication. It offers features like end-to-end encrypted chat, VoIP, and file sharing, catering to both individual and enterprise users. With a focus on interoperability, Matrix can bridge with other communication systems, offering a unified platform for messaging and collaboration.
## Dependencies
- `nginx-docker-reverse-proxy` (see `meta/main.yml` )
## Files and Their Functions
2025-02-04 18:14:37 +01:00
1. ** `vars/main.yml` **: Defines variables such as `docker_compose.directories.instance` .
2023-12-13 10:27:21 +01:00
2. ** `handlers/main.yml` **: Contains handlers like `recreate matrix` for restarting the Matrix service.
3. ** `tasks/main.yml` **: Contains main tasks like creating directories and configuration files.
4. ** `templates/log.config.j2` **: Template for the Matrix server's logging configuration.
5. ** `templates/homeserver.yaml.j2` **: Template for the main configuration file of the Matrix server.
6. ** `templates/docker-compose.yml.j2` **: Docker-Compose template for setting up the Matrix server and database.
## Important Administration Commands
- **Create Matrix Users**:
```
2023-12-19 14:12:19 +01:00
docker compose exec -it synapse register_new_matrix_user -u [Username] -p [Password] -a -c /data/homeserver.yaml http://localhost:8008
2023-12-13 10:27:21 +01:00
```
- **Execute Docker-Compose Commands**:
- Restart services:
```
docker-compose up -d --force-recreate
```
- View logs:
```
docker-compose logs
```
2024-01-18 20:53:14 +01:00
2024-01-19 15:12:18 +01:00
## Cleanup
```
# Cleanup Database
for db in matrix mautrix_whatsapp_bridge mautrix_telegram_bridge mautrix_signal_bridge mautrix_slack_bridge; do python reset-database-in-central-postgres.py $db; done
# Cleanup Docker and Volumes
docker compose down -v
```
2024-01-20 12:46:07 +01:00
## Bridges
2024-01-20 22:29:53 +01:00
### Mautrix
2024-01-20 12:46:07 +01:00
Contact one of the following bots for more information:
- @signalbot:yourdomain .tld
- @telegrambot:yourdomain .tld
- @whatsappbot:yourdomain .tld
- @slackbot:yourdomain .tld
2024-01-20 22:29:53 +01:00
#### Slack
2024-01-20 12:46:07 +01:00
For login with Token checkout [this guide ](https://docs.mau.fi/bridges/go/slack/authentication.html ).
2024-01-20 22:29:53 +01:00
### ChatGPT
- Create API Token: https://platform.openai.com/api-keys
- Set ``matrix_chatgpt_bridge_access_token` `
2024-01-18 20:53:14 +01:00
## Debug:
- https://federationtester.matrix.org/
2023-12-19 14:07:05 +01:00
## Sources
### Guides
2023-12-19 14:46:12 +01:00
- https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html
2023-12-19 14:07:05 +01:00
- https://cyberhost.uk/element-matrix-setup/
- https://www.linode.com/docs/guides/how-to-install-the-element-chat-app/
- https://hub.docker.com/r/vectorim/element-web
2023-12-13 10:27:21 +01:00
## Links to ChatGPT Conversations
- https://chat.openai.com/share/d4485223-3750-4b0b-9733-45776c55d7cf
- https://chat.openai.com/share/f68873d9-aae9-4a1e-83b6-c3f23705a4ad
- https://chat.openai.com/share/11690964-9997-4e44-b63f-3c384a5ddc1d
- https://chat.openai.com/share/6f537c30-7337-47ed-8c85-19306e0eb74b
2023-12-22 10:23:42 +01:00
- https://chat.openai.com/share/31974492-2950-4dbc-8a83-edd7e1569bec
## Alternativ Matrix Setup Role
An alternativ role to deploy Matrix you will find [here ](../docker-matrix-ansible/ ).