2019-06-27 20:04:06 +02:00
Configuration
=============
You can configure the app by copying `config.sample.json` to
`config.json` and customising it:
2020-07-17 13:22:38 +02:00
For a good example, see https;//develop.element.io/config.json.
2019-06-27 20:04:06 +02:00
1. `default_server_config` sets the default homeserver and identity server URL for
2020-07-17 13:22:38 +02:00
Element to use. The object is the same as returned by [https://<server_name>/.well-known/matrix/client ](https://matrix.org/docs/spec/client_server/latest.html#get-well-known-matrix-client ),
2019-06-27 20:04:06 +02:00
with added support for a `server_name` under the `m.homeserver` section to display
a custom homeserver name. Alternatively, the config can contain a `default_server_name`
2020-07-17 13:22:38 +02:00
instead which is where Element will go to get that same object, although this option is
2019-06-27 20:04:06 +02:00
deprecated - see the `.well-known` link above for more information on using this option.
Note that the `default_server_name` is used to get a complete server configuration
whereas the `server_name` in the `default_server_config` is for display purposes only.
* *Note*: The URLs can also be individually specified as `default_hs_url` and
`default_is_url` , however these are deprecated. They are maintained for backwards
compatibility with older configurations. `default_is_url` is respected only
if `default_hs_url` is used.
2020-07-17 13:22:38 +02:00
* Element will fail to load if a mix of `default_server_config` , `default_server_name` , or
2019-06-27 20:04:06 +02:00
`default_hs_url` is specified. When multiple sources are specified, it is unclear
which should take priority and therefore the application cannot continue.
2020-07-17 13:22:38 +02:00
* As of Element 1.4.0, identity servers are optional. See [Identity servers ](#identity-servers ) below.
2019-11-07 14:31:52 +01:00
1. `features` : Lookup of optional features that may be `enable` d, `disable` d, or
exposed to the user in the `labs` section of settings. The available
2019-11-08 12:56:31 +01:00
optional experimental features vary from release to release and are [documented ](labs.md ). The feature flag process is
2019-11-07 14:31:52 +01:00
[documented ](feature-flags.md ) as well.
2019-06-27 20:04:06 +02:00
1. `showLabsSettings` : Shows the "labs" tab of user settings even when no `features` are enabled
or present. Useful for getting at settings which may be otherwise hidden.
1. `brand` : String to pass to your homeserver when configuring email notifications, to let the
homeserver know what email template to use when talking to you.
1. `branding` : Configures various branding and logo details, such as:
1. `welcomeBackgroundUrl` : An image to use as a wallpaper outside the app
2020-04-17 12:31:49 +02:00
during authentication flows. If an array is passed, an image is chosen randomly for each visit.
2019-06-27 20:04:06 +02:00
1. `authHeaderLogoUrl` : An logo image that is shown in the header during
authentication flows
1. `authFooterLinks` : a list of links to show in the authentication page footer:
`[{"text": "Link text", "url": "https://link.target"}, {"text": "Other link", ...}]`
2020-01-22 15:18:26 +01:00
1. `reportEvent` : Configures the dialog for reporting content to the homeserver
admin.
1. `adminMessageMD` : An extra message to show on the reporting dialog to
mention homeserver-specific policies. Accepts Markdown.
2019-06-27 20:04:06 +02:00
1. `integrations_ui_url` : URL to the web interface for the integrations server. The integrations
2020-07-17 13:22:38 +02:00
server is not Element and normally not your homeserver either. The integration server settings
2019-06-27 20:04:06 +02:00
may be left blank to disable integrations.
1. `integrations_rest_url` : URL to the REST interface for the integrations server.
1. `integrations_widgets_urls` : list of URLs to the REST interface for the widget integrations server.
1. `bug_report_endpoint_url` : endpoint to send bug reports to (must be running a
https://github.com/matrix-org/rageshake server). Bug reports are sent when a user clicks
"Send Logs" within the application. Bug reports can be disabled by leaving the
`bug_report_endpoint_url` out of your config file.
1. `roomDirectory` : config for the public room directory. This section is optional.
1. `roomDirectory.servers` : List of other homeservers' directories to include in the drop
down list. Optional.
1. `default_theme` : name of theme to use by default (e.g. 'light')
1. `update_base_url` (electron app only): HTTPS URL to a web server to download
updates from. This should be the path to the directory containing `macos`
and `win32` (for update packages, not installer packages).
1. `piwik` : Analytics can be disabled by setting `piwik: false` or by leaving the piwik config
option out of your config file. If you want to enable analytics, set `piwik` to be an object
containing the following properties:
1. `url` : The URL of the Piwik instance to use for collecting analytics
1. `whitelistedHSUrls` : a list of HS URLs to not redact from the analytics
1. `whitelistedISUrls` : a list of IS URLs to not redact from the analytics
1. `siteId` : The Piwik Site ID to use when sending analytics to the Piwik server configured above
1. `welcomeUserId` : the user ID of a bot to invite whenever users register that can give them a tour
2020-07-17 13:22:38 +02:00
1. `embeddedPages` : Configures the pages displayed in portions of Element that
2019-06-27 20:04:06 +02:00
embed static files, such as:
1. `welcomeUrl` : Initial content shown on the outside of the app when not
2020-07-17 13:22:38 +02:00
logged in. Defaults to `welcome.html` supplied with Element.
2019-06-27 20:04:06 +02:00
1. `homeUrl` : Content shown on the inside of the app when a specific room is
not selected. By default, no home page is configured. If one is set, a
button to access it will be shown in the top left menu.
1. `defaultCountryCode` : The ISO 3166 alpha2 country code to use when showing
country selectors, like the phone number input on the registration page.
Defaults to `GB` if the given code is unknown or not provided.
2019-10-02 09:04:36 +02:00
1. `settingDefaults` : Defaults for settings that support the `config` level,
as an object mapping setting name to value (note that the "theme" setting
is special cased to the `default_theme` in the config file).
2019-09-12 17:04:24 +02:00
1. `disable_custom_urls` : disallow the user to change the
default homeserver when signing up or logging in.
2020-07-17 13:22:38 +02:00
1. `permalinkPrefix` : Used to change the URL that Element generates permalinks with.
2019-09-30 21:05:15 +02:00
By default, this is "https://matrix.to" to generate matrix.to (spec) permalinks.
2020-02-07 23:07:30 +01:00
Set this to your Riot instance URL if you run an unfederated server (eg:
2019-09-30 21:05:15 +02:00
"https://riot.example.org").
2020-04-03 21:25:33 +02:00
1. `jitsi` : Used to change the default conference options. Learn more about the
Jitsi options at [jitsi.md ](./jitsi.md ).
2020-03-18 22:47:56 +01:00
1. `preferredDomain` : The domain name of the preferred Jitsi instance. Defaults
to `jitsi.riot.im` . This is used whenever a user clicks on the voice/video
call buttons - integration managers may use a different domain.
2020-04-18 19:34:45 +02:00
1. `enable_presence_by_hs_url` : The property key should be the URL of the homeserver
and its value defines whether to enable/disable the presence status display
2020-06-03 14:59:34 +02:00
from that homeserver. If no options are configured, presence is shown for all
2020-04-18 19:34:45 +02:00
homeservers.
1. `disable_guests` : Disables guest access tokens and auto-guest registrations.
Defaults to false (guests are allowed).
1. `disable_login_language_selector` : Disables the login language selector. Defaults
to false (language selector is shown).
1. `disable_3pid_login` : Disables 3rd party identity options on login and registration form
Defaults to false (3rd party identity options are shown).
1. `default_federate` : Default option for room federation when creating a room
2020-04-21 17:27:03 +02:00
Defaults to true (room federation enabled).
2019-06-27 20:04:06 +02:00
Note that `index.html` also has an og:image meta tag that is set to an image
2020-07-17 13:22:38 +02:00
hosted on riot.im. This is the image used if links to your copy of Element
appear in some websites like Facebook, and indeed Element itself. This has to be
2019-06-27 20:04:06 +02:00
static in the HTML and an absolute URL (and HTTP rather than HTTPS), so it's
not possible for this to be an option in config.json. If you'd like to change
2020-07-17 13:22:38 +02:00
it, you can build Element, but run
2019-06-27 20:04:06 +02:00
`RIOT_OG_IMAGE_URL="http://example.com/logo.png" yarn build` .
Alternatively, you can edit the `og:image` meta tag in `index.html` directly
2020-07-17 13:22:38 +02:00
each time you download a new version of Element.
2019-06-27 20:04:06 +02:00
2019-10-28 17:57:22 +01:00
Identity servers
================
The identity server is used for inviting other users to a room via third party
identifiers like emails and phone numbers. It is not used to store your password
or account information.
2020-07-17 13:22:38 +02:00
As of Element 1.4.0, all identity server functions are optional and you are
2019-10-28 18:56:38 +01:00
prompted to agree to terms before data is sent to the identity server.
2019-10-28 17:57:22 +01:00
2020-07-17 13:22:38 +02:00
Element will check multiple sources when looking for an identity server to use in
2019-10-28 17:57:22 +01:00
the following order of preference:
1. The identity server set in the user's account data
* For a new user, no value is present in their account data. It is only set
if the user visits Settings and manually changes their identity server.
2. The identity server provided by the `.well-known` lookup that occurred at
login
3. The identity server provided by the Riot config file
2020-07-17 13:22:38 +02:00
If none of these sources have an identity server set, then Element will prompt the
2019-10-28 17:57:22 +01:00
user to set an identity server first when attempting to use features that
require one.
2020-05-06 12:32:13 +02:00
Currently, the only two public identity servers are https://vector.im and
2019-10-28 17:57:22 +01:00
https://matrix.org, however in the future identity servers will be
decentralised.
2019-06-27 20:04:06 +02:00
Desktop app configuration
=========================
2020-05-06 12:32:13 +02:00
See https://github.com/vector-im/riot-desktop#user-specified-configjson