Change the default homeserver in Element Desktop
This guide applies if your system cannot connect to https://matrix.org and you see this error message when opening Element Desktop for the first time.
This is a temporary workaround until this issue is resolved.
In this guide, the homeserver domain is example.com
, meaning Matrix usernames are @someone:example.com
, and the homeserver is exposed on the domain matrix.example.com
. Make sure you add your domains in the config below before pasting it into config.json
.
First, exit Element, then follow the steps for your operating system below.
Linux
The exact steps may depend on your distro, but generally, it will be something along the lines of:
-
Right-click and paste
cat > ~/.config/Element/config.json
, then hit enter -
Right-click and paste
{ "default_server_config": { "m.homeserver": { "base_url": "https://matrix.example.com", "server_name": "example.com" } }, "room_directory": { "servers": [] } }
-
Hit
Ctrl + C
Mac
-
Right click and paste
cat > ~/Library/Application\ Support/Element/config.json
then hit enter -
Right-click and paste
{ "default_server_config": { "m.homeserver": { "base_url": "https://matrix.example.com", "server_name": "example.com" } }, "room_directory": { "servers": [] } }
-
Hit
Ctrl + C
Windows
-
Press
Win + R
-
Paste in
%APPDATA%\Element\
-
Create a new text file named
config.json
-
Open
config.json
in Notepad -
Paste in
{ "default_server_config": { "m.homeserver": { "base_url": "https://matrix.example.com", "server_name": "example.com" } }, "room_directory": { "servers": [] } }
-
Save and exit