All-in-one messaging application tutorial (30 minutes)


Introduction

šŸ‘‹ Hi everyone! Tired of Instagram stories but want to keep DMs? šŸ“© Today Iā€™m showing you how to unify all your chats, including Instagram, in one place thanks to Matrix and OVH. šŸš€ No distractions, just your messages. Stay with me!

I. Connect to GitHub

https://github.com/spantaleev/matrix-docker-ansible-deploy

II. Open a terminal and paste this command:

git clone https://github.com/spantaleev/matrix-docker-ansible-deploy.git

III. Open the project with your favorite IDE

WebStorm, for example

IV. Create a server

On OVH, AWS or Google Cloud

V. SSH connection to the server

ssh debian@ip_address

VI. Testing that python works

On the server, still connected via SSH, type the command

python3 --version

VII. Install ansible locally

pipx install --include-deps ansible

VIII. Install Passlib locally

pip3 install passlib

IX. Install git locally

cf https://git-scm.com/downloads

X. Install Just locally

brew install just

XI. Configuring DNS

set records

| Type     | Host     | Value                |
| -------- | -------- | -------------------- |
| A record | matrix   | ip_address           |
| C Name   | element  | matrix.<nom_de_domaine> |

XII. Configure matrix

In our folder:

  • create a folder
mkdir inventory/host_vars/matrix.<domain_name>)
  • copy configuration file
cp examples/vars.yml inventory/host_vars/matrix.<domain_name>/vars.yml
  • edit configuration file
nano inventory/host_vars/matrix.<domain_name>/vars.yml

and fill it in with the following information:

matrix_domain: DOMAIN_NAME

matrix_homeserver_implementation: synapse

matrix_homeserver_generic_secret_key: "COMPLICATED PASSWORD"

matrix_playbook_reverse_proxy_type: playbook-managed-traefik

devture_traefik_config_certificatesResolvers_acme_email: 'email_address@gmail.com'

devture_postgres_connection_password: "COMPLICATED PASSWORD"

prometheus_enabled: true
prometheus_node_exporter__enabled: true
prometheus_postgres_exporter_enabled: true
grafana_enabled: true
grafana_anonymous_access: false

grafana_default_admin_user: "admin"
grafana_default_admin_password: "COMPLICATED PASSWORD"

matrix_synapse_ext_password_provider_shared_secret_auth_enabled: true
matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret: 12341234123412341234123412341234

matrix_mautrix_telegram_enabled: true
matrix_mautrix_telegram_api_id: 1234567
matrix_mautrix_telegram_api_hash: 123456abcd1234432112343e3e3e9999


matrix_mautrix_whatsapp_enabled: true

matrix_mautrix_facebook_enabled: true
  • copy hosts configuration file
cp examples/hosts inventory/hosts
  • edit hosts configuration file
matrix.<domain_name> ansible_host=<ip_address> ansible_ssh_user=root

XIII. Start installation

ansible-playbook -i inventory/hosts setup.yml --tags=install-all,ensure-matrix-users-created,start

XIV. Check for successful installation

ansible-playbook -i inventory/hosts setup.yml --tags=self-check

XIV. Create a user

just register-user <your-username> <your-password> <admin access: yes or no>
# (ie)
just register-user benjamin mot_de_passe yes

XV. Connecting to the Web client

https://element.<domain_name>

XVI. Connect to the mobile client

XVII. Setting up Telegram

just install-all
  • send a message to @telegrambot:domain_name
  • send login
  • follow the directions

XVIII. Setting up Whatsapp

  • send a message to @whatsappbot:domain_name
  • send login
  • scan the qr code with WhatsApp on your phone

XIX. Setting up Facebook messenger

  • send a message to @facebookbot:domain_name
  • send login <email> <password>

XX. Setting up Instagram

  • send a message to @instagrambot:domain_name
  • send login <email> <password>

Conclusion

You now have a matrix server that lets you receive messages from all your social networks on a single application.