diff --git a/README.md b/README.md index 06ccdc3..ef51825 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ The following components are included in the installer: 1. Docker 2. Matrix backend (synapse) -3. Matrix frontend (element) +3. Matrix frontend (element & hydrogen-web) 4. Matrix DB (PostgreSQL) 5. Matrix Admin Panel: `https:///admin` 6. Coturn server (required for voice chat/videocalls) @@ -36,6 +36,8 @@ chmod +x install.sh 4. Wait for the installer to finish. Enjoy the matrix server :) +**Note**: `https://DOMAIN` will take you to the default frontend (Element) whilst `https://DOMAIN/hydrogen/` (note the last forward slash) will take you to the Hydrgeon-Web frontend + ## How to use the server diff --git a/docker-compose.yaml b/docker-compose.yaml index a3758ce..c70ee77 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -73,6 +73,32 @@ services: depends_on: - synapse + hydrogen-web: + image: ghcr.io/element-hq/hydrogen-web:latest + restart: unless-stopped + environment: + - | + CONFIG_OVERRIDE= + { + "push": { + "appId": "io.element.hydrogen.web", + "gatewayUrl": "https://matrix.org", + "applicationServerKey": "BC-gpSdVHEXhvHSHS0AzzWrQoukv2BE7KzpoPO_FfPacqOo3l1pdqz7rSgmB04pZCWaHPz7XRe6fjLaC-WPDopM" + }, + "defaultHomeServer": "DOMAIN", + "bugReportEndpointUrl": "https://element.io/bugreports/submit", + "themeManifests": [ + "assets/theme-element.json" + ], + "defaultTheme": { + "light": "element-light", + "dark": "element-dark" + } + } + networks: + matrix_server: + ipv4_address: 10.10.10.8 + networks: matrix_server: external: true diff --git a/install.sh b/install.sh index 9c6dab9..41c4e7d 100755 --- a/install.sh +++ b/install.sh @@ -190,6 +190,17 @@ server { proxy_http_version 1.1; } + # Hydrogen web + location ~ ^/(hydrogen|assets) { + rewrite /hydrogen/(.*) /\$1 break; + proxy_pass http://10.10.10.8:8080; + proxy_set_header X-Forwarded-For \$remote_addr; + proxy_set_header X-Forwarded-Proto \$scheme; + proxy_set_header Host \$host; + client_max_body_size 50M; + proxy_http_version 1.1; + } + # Element Frontend location / { # Element chat Container Network IP