Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Florian Duros <florian.duros@ormaz.fr> Co-authored-by: Kim Brose <kim.brose@nordeck.net> Co-authored-by: Florian Duros <florianduros@element.io> Co-authored-by: R Midhun Suresh <hi@midhun.dev> Co-authored-by: dbkr <986903+dbkr@users.noreply.github.com> Co-authored-by: ElementRobot <releases@riot.im> Co-authored-by: dbkr <dbkr@users.noreply.github.com> Co-authored-by: David Baker <dbkr@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Co-authored-by: David Langley <davidl@element.io> Co-authored-by: Michael Weimann <michaelw@matrix.org> Co-authored-by: Timshel <Timshel@users.noreply.github.com> Co-authored-by: Sahil Silare <32628578+sahil9001@users.noreply.github.com> Co-authored-by: Will Hunt <will@half-shot.uk> Co-authored-by: Hubert Chathi <hubert@uhoreg.ca> Co-authored-by: Andrew Ferrazzutti <andrewf@element.io> Co-authored-by: Robin <robin@robin.town> Co-authored-by: Tulir Asokan <tulir@maunium.net>
3.0 KiB
Installing Element Web
Familiarise yourself with the Important Security Notes before starting, they apply to all installation methods.
Note: that for the security of your chats will need to serve Element over HTTPS. Major browsers also do not allow you to use VoIP/video chats over HTTP, as WebRTC is only usable over HTTPS. There are some exceptions like when using localhost, which is considered a secure context and thus allowed.
Release tarball
- Download the latest version from https://github.com/element-hq/element-web/releases
- Untar the tarball on your web server
- Move (or symlink) the
element-x.x.x
directory to an appropriate name - Configure the correct caching headers in your webserver (see below)
- Configure the app by copying
config.sample.json
toconfig.json
and modifying it. See the configuration docs for details. - Enter the URL into your browser and log into Element!
Releases are signed using gpg and the OpenPGP standard, and can be checked against the public key located at https://packages.element.io/element-release-key.asc.
Debian package
Element Web is now also available as a Debian package for Debian and Ubuntu based systems.
sudo apt install -y wget apt-transport-https
sudo 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" | sudo tee /etc/apt/sources.list.d/element-io.list
sudo apt update
sudo apt install element-web
Configure the app by modifying /etc/element-web/config.json
. See the configuration docs for details.
Then point your chosen web server (e.g. Caddy, Nginx, Apache, etc) at the /usr/share/element-web
webroot.
Docker
The Docker image can be used to serve element-web as a web server. The easiest way to use it is to use the prebuilt image:
docker run -p 80:80 vectorim/element-web
To supply your own custom config.json
, map a volume to /app/config.json
. For example,
if your custom config was located at /etc/element-web/config.json
then your Docker command
would be:
docker run -p 80:80 -v /etc/element-web/config.json:/app/config.json vectorim/element-web
To build the image yourself:
git clone https://github.com/element-hq/element-web.git element-web
cd element-web
git checkout master
docker build .
If you're building a custom branch, or want to use the develop branch, check out the appropriate element-web branch and then run:
docker build -t \
--build-arg USE_CUSTOM_SDKS=true \
--build-arg JS_SDK_REPO="https://github.com/matrix-org/matrix-js-sdk.git" \
--build-arg JS_SDK_BRANCH="develop" \
.
Kubernetes
The provided element-web docker image can also be run from within a Kubernetes cluster. See the Kubernetes example for more details.