Fediversity/matrix/element-web/README.md

71 lines
2.5 KiB
Markdown

---
gitea: none
include_toc: true
---
# Element-web
Element-web is the webinterface, Element in a browser. You'll find the source
and [documentation on installing and
configuring](https://github.com/element-hq/element-web/blob/develop/docs/install.md)
on Github.
You should never run Element-web on the same FQDN as your Synapse-server,
because of XSS problems. So start by defining a new FQDN for where you will
publish Element-web, and get a certificate for that (don't forget to
[automatically reload nginx after the certificate renewal](../nginx/README.md#certrenew)).
We'll use `element.example.com` here.
# Installing on Debian {#debian}
Installing it on Debian is very easy indeed:
```
wget -O /usr/share/keyrings/element-io-archive-keyring.gpg https://packages.element.io/debian/element-io-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/element-io-archive-keyring.gpg] https://packages.element.io/debian/ default main" |
tee /etc/apt/sources.list.d/element-io.list
apt update
apt install element-web
```
# Configuration {#configuration}
Configuring is done in `config.json`, which needs to go into `/etc/element-web`
in a Debian install. See the [documentation on
Github](https://github.com/element-hq/element-web/blob/develop/docs/config.md).
The most important thing to change is the `default_server_config`. Make sure
it's something like this:
```
"default_server_config": {
"m.homeserver": {
"base_url": "https://matrix.example.com",
"server_name": "example.com"
}
},
```
Of course, substitute the correct domain and server name.
# Browser notes {#browsernotes}
Element-web runs in the browser, on JavaScript. Yours truly found out that
running [JShelter](https://jshelter.org/) throws a spanner in the works, so
you'll have to disable it for the URL you publish Element-web.
Also, Element-web is rather dependent on the version of your browser, so make
sure you keep yours up-to-date. Debian users, who run "Firefox ESR" should
know support for that is on a best effort basis, you might want to consider
using the "real" Firefox. [Debian packages are
available](https://support.mozilla.org/en-US/kb/install-firefox-linux#w_install-firefox-deb-package-for-debian-based-distributions-recommended).
Element Web uses "workers", that are not installed in private windows. One
thing that won't work in a private window, is downloading (i.e. displaying)
images. If you don't see avatars and get "failed to download" messages, check
if you're running Element Web in a private window.