Fediversity/matrix/element-web
2024-12-04 12:07:59 +01:00
..
README.md Updated and added some nginx configuration. 2024-12-04 12:07:59 +01:00

Table of Contents

Element-web

Element-web is the webinterface, Element in a browser. You'll find the source and documentation on installing and configuring 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).

We'll use element.example.com here.

Installing on 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

Configuring is done in config.json, which needs to go into /etc/element-web in a Debian install. See the documentation on Github.

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

Element-web runs in the browser, on JavaScript. Yours truly found out that running JShelter 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.

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.