From 099a56516ca265859c85a2507f00be0ec0fa2c50 Mon Sep 17 00:00:00 2001 From: TiynGER Date: Sat, 22 May 2021 01:10:07 +0200 Subject: [PATCH] matrix: added container-images used for matrix --- .../awesometechnologies_-_synapse-admin.md | 34 ++++++++++ wiki/docker-images/matrixdotorg_-_synapse.md | 67 +++++++++++++++++++ wiki/docker-images/nginx.md | 50 ++++++++++++++ wiki/docker-images/vectorim_-_riot-web.md | 44 ++++++++++++ wiki/matrix.md | 8 +++ wiki/nginx.md | 3 + 6 files changed, 206 insertions(+) create mode 100644 wiki/docker-images/awesometechnologies_-_synapse-admin.md create mode 100644 wiki/docker-images/matrixdotorg_-_synapse.md create mode 100644 wiki/docker-images/nginx.md create mode 100644 wiki/docker-images/vectorim_-_riot-web.md diff --git a/wiki/docker-images/awesometechnologies_-_synapse-admin.md b/wiki/docker-images/awesometechnologies_-_synapse-admin.md new file mode 100644 index 0000000..f96add2 --- /dev/null +++ b/wiki/docker-images/awesometechnologies_-_synapse-admin.md @@ -0,0 +1,34 @@ +# awesometechnologies - synapse-admin + +The official container and documentation was made by +[awesometechnologies](https://hub.docker.com/awesometechnologies/synapse-admin). +This docker-rebuild is made up by a `docker-compose.yml` file. + +## Ports + +Set the following ports in the `ports:` section. + +| Container Port | Recommended outside port | Protocol | Description | +| -------------- | ------------------------ | -------- | ----------- | +| `80` | `80` | TCP | WebUI | + +## rebuild.sh + +```shell +#!/bin/sh +docker-compose down +docker pull awesometechnologies/synapse-admin:latest +docker-compose up -d +``` + +## docker-compose.yml + +```yml +version: "2" +services: + synapse-admin: + image: awesometechnologies/synapse-admin:latest + restart: unless-stopped + ports: + - 80:80 +``` diff --git a/wiki/docker-images/matrixdotorg_-_synapse.md b/wiki/docker-images/matrixdotorg_-_synapse.md new file mode 100644 index 0000000..8ed666d --- /dev/null +++ b/wiki/docker-images/matrixdotorg_-_synapse.md @@ -0,0 +1,67 @@ +# matrixdotorg - synapse + +The official container and documentation was made by +[matrixdotorg](https://hub.docker.com/matrixdotorg/synapse). +This docker-rebuild is made up by a `docker-compose.yml` file. +If you want to setup a Matrix homeserver please take a look at +[the matrix setup guide](../matrix.md). + +## Environment-variables + +Set the following environment-variables in the `environment:` section of the +docker-compose file. + +| Name | Usage | Default | +| --------------------- | ------------------------- | ----------------------- | +| `SYNAPSE_CONFIG_DIR` | config directory | `/data` | +| `SYNAPSE_CONFIG_PATH` | config path | `/data/homeserver.yaml` | +| `UID` | user id for synapse user | `1000` | +| `GID` | group id for synapse user | `1000` | +| `TZ` | specify the timezone | `Europe/London` | + +## Volumes + +Set the following volumes in the `volumes:` section of the docker-compose file. + +| Outside mount/volume name | Container mount | Description | +| ------------------------- | --------------- | --------------------------------- | +| `synapse` | `/data` | directory for storage and configs | + +## Ports + +Set the following ports in the `ports:` section. + +| Container Port | Recommended outside port | Protocol | Description | +| -------------- | ------------------------ | -------- | ---------------------- | +| `8008` | `443` | TCP | matrix homeserver port | + +## rebuild.sh + +```shell +#!/bin/sh +docker-compose down +docker pull matrixdotorg/synapse:latest +docker-compose up -d +``` + +## docker-compose.yml + +```yml + +services: + synapse: + image: "matrixdotorg/synapse:latest" + restart: "unless-stopped" + environment: + SYNAPSE_CONFIG_DIR: "/data" + SYNAPSE_CONFIG_PATH: "/data/homeserver.yaml" + UID: "1000" + GID: "1000" + TZ: "Europe/London" + volumes: + - synapse:/data + +volumes: + synapse: + driver: local +``` diff --git a/wiki/docker-images/nginx.md b/wiki/docker-images/nginx.md new file mode 100644 index 0000000..d4169c4 --- /dev/null +++ b/wiki/docker-images/nginx.md @@ -0,0 +1,50 @@ +# nginx + +The official container and documentation was made by +[nginx](https://hub.docker.com/_/nginx). +This docker-rebuild is made up by a `docker-compose.yml` file. + +## Volumes + +Set the following volumes in the `volumes:` section of the docker-compose file. + +| Outside mount/volume name | Container mount | Description | +| ------------------------- | -------------------- | --------------------------- | +| `nginx` | `/etc/nginx/conf.d/` | directory for nginx configs | + +## Ports + +Set the following ports in the `ports:` section. + +| Container Port | Recommended outside port | Protocol | Description | +| -------------- | ------------------------ | -------- | ----------- | +| `80` | `80` | TCP | http port | +| `443` | `443` | TCP | https port | + +## rebuild.sh + +```shell +#!/bin/sh +docker-compose down +docker pull nginx:latest +docker-compose up -d +``` + +## docker-compose.yml + +```yml +version: "2" +services: + nginx: + image: nginx:latest + restart: unless-stopped + volumes: + - nginx:/etc/nginx/conf.d/ + ports: + - 80:80 + - 443:443 + +volumes: + nginx: + driver: local +``` diff --git a/wiki/docker-images/vectorim_-_riot-web.md b/wiki/docker-images/vectorim_-_riot-web.md new file mode 100644 index 0000000..fda5aef --- /dev/null +++ b/wiki/docker-images/vectorim_-_riot-web.md @@ -0,0 +1,44 @@ +# vectorim - riot-web + +The official container and documentation was made by +[linuxserver](https://hub.docker.com/vectorim/riot-web). +This docker-rebuild is made up by a `docker-compose.yml` file. + +## Volumes + +Set the following volumes in the `volumes:` section of the docker-compose file. + +| Outside mount/volume name | Container mount | Description | +| ------------------------- | --------------------- | ----------- | +| `./config.json` | `/app/config.json:ro` | config file | + +## Ports + +Set the following ports in the `ports:` section. + +| Container Port | Recommended outside port | Protocol | Description | +| -------------- | ------------------------ | -------- | ----------- | +| `80` | `80` | TCP | WebUI | + +## rebuild.sh + +```shell +#!/bin/sh +docker-compose down +docker pull vectorim/riot-web:latest +docker-compose up -d +``` + +## docker-compose.yml + +```yml +version: "2" +services: + element: + image: vectorim/riot-web:latest + restart: unless-stopped + volumes: + - "./data/matrix/element/config.json:/app/config.json:ro" + ports: + - 80:80 +``` diff --git a/wiki/matrix.md b/wiki/matrix.md index c939a6f..3b7af41 100644 --- a/wiki/matrix.md +++ b/wiki/matrix.md @@ -32,6 +32,8 @@ _matrix._tcp.matrix. class SRV 1 10 443 synapse.example.com ### Synapse +The docker-image used for the synapse matrix server can be found in the +[docker-image directory](./docker-images/matrixdotorg_-_synapse.md). Create the `docker-compose.yml` file at a location of your choice (this guide will assume and recommend the file lies in a directory called matrix) with the following contents: @@ -111,6 +113,8 @@ following the guide (this applies to any following step). ### Nginx +The docker-image used for the nginx instance can be found in the +[docker-image directory](./docker-images/nginx.md). For federation to work properly an nginx container is needed aswell. In the directory containing your `docker-compose.yml` create the file `data/matrix/nginx/matrix.conf` and fill in the following lines: @@ -199,6 +203,8 @@ All following sections will add features to it. ### Element web client +The docker-image used for the web client can be found in the +[docker-image directory](./docker-images/vectorim_-_riot-web.md). This section will add a self hosted Matrix web client in form of `Element` (which was previously called `riot`). @@ -306,6 +312,8 @@ If any of that is not working there is something wrong with your configuration. ### Administration interface +The docker-image used for the administration interface can be found in the +[docker-image directory](./docker-images/awesometechnologies_-_synapse-admin.md). This section will add a self hosted Matrix administration interface. This is especially useful if you have `enable_registration` set to `false` because you can dynamically create and administrate users and rooms. diff --git a/wiki/nginx.md b/wiki/nginx.md index aacc04f..c2b935e 100644 --- a/wiki/nginx.md +++ b/wiki/nginx.md @@ -4,3 +4,6 @@ A server can be setup via docker with the [nasourso image](./docker-images/nasourso_-_nginx-certbot-docker-tui.md). + +Alternatively the standalone [nginx image](./docker-images/nginx.md) can be +used.