mirror of http://138.197.108.81/gattes/matrix.git
56 lines
1.9 KiB
Markdown
56 lines
1.9 KiB
Markdown
|
# Matrix server installation
|
||
|
|
||
|
## Prerequisites
|
||
|
|
||
|
- A Linux VM with Ubuntu Server (20.04 minimum, 22.04 recommended)
|
||
|
- A Domain name (can be root or subdomain) but it is a must the A record for the domain to be pointed to the server's public IP.
|
||
|
- e.g. `example.com A 1.1.1.1`: Being `example.com` the domain record and `1.1.1.1` the public IP of the server
|
||
|
|
||
|
## Components
|
||
|
|
||
|
The following components are included in the installer:
|
||
|
|
||
|
1. Docker
|
||
|
2. Matrix backend (synapse)
|
||
|
3. Matrix frontend (element)
|
||
|
4. Matrix DB (PostgreSQL)
|
||
|
5. Matrix Admin Panel: `https://<URL>/admin`
|
||
|
6. Coturn server (required for voice chat/videocalls)
|
||
|
7. Nginx server (required for reverse proxying)
|
||
|
8. SSL certificate via LetsEncrypt with automatic renewal
|
||
|
|
||
|
## Installation
|
||
|
|
||
|
**Note**: Please remember that it's a prerequisite the Domain A record needs to be pointed to the server's public IP and resolving.
|
||
|
|
||
|
1. Copy `matrix.zip` to a server directory, recommended: `/tmp`
|
||
|
2. Unzip the file: `unzip matrix.zip`
|
||
|
3. Go to the directory and run the installer, you will need the domain name:
|
||
|
|
||
|
```shell
|
||
|
cd /tmp/matrix
|
||
|
./install.sh <DOMAIN>
|
||
|
```
|
||
|
|
||
|
4. Wait for the installer to finish. Enjoy the matrix server :)
|
||
|
|
||
|
|
||
|
## How to use the server
|
||
|
|
||
|
Simply open your favourite web browser and go to **https://<YOUR_DOMAIN>**, which will show the Element Web UI. Registrations are disabled by default.
|
||
|
|
||
|
## Creating users
|
||
|
|
||
|
The first user will need to be created via command line interface, this is unique and it will be the admin user. To do this simply:
|
||
|
|
||
|
1. SSH into the host
|
||
|
2. Go to the directory `/opt/matrix`
|
||
|
3. Create the user running the following command:
|
||
|
|
||
|
```shell
|
||
|
% cd /opt/matrix
|
||
|
% docker compose exec synapse register_new_matrix_user --user <USER_NAME> --password <PASSWORD> --admin --config /data/homeserver.yaml
|
||
|
```
|
||
|
|
||
|
From there after, you can just use the admin panel to create users, the admin panel is located in `https://<DOMIN>/admin` (it requires admin user login)
|