Skip to content

Matrix synapse

services.matrix-synapse.configFile

Path to the configuration file on the target system. Useful to configure e.g. workers that also need this.

Type: path

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.configureRedisLocally

Whether to automatically configure a local redis server for matrix-synapse.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.dataDir

The directory where matrix-synapse stores its stateful data such as certificates, media and uploads.

Type: string

Default

"/var/lib/matrix-synapse"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.enable

Whether to enable matrix.org synapse, the reference homeserver. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.enableRegistrationScript

Whether to install the register_new_matrix_user script, that allows account creation on the terminal.

::: {.note} This script does not work when the client listener uses UNIX domain sockets :::

Type: boolean

Default

'' Enabled if the client listener uses TCP sockets''

Example

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.extraConfigFiles

Extra config files to include.

The configuration files will be included based on the command line argument --config-path. This allows to configure secrets without having to go through the Nix store, e.g. based on deployment keys if NixOps is in use.

Type: list of path

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.extras

Explicitly install extras provided by matrix-synapse. Most will require some additional configuration.

Extras will automatically be enabled, when the relevant configuration sections are present.

Please note that this option is additive: i.e. when adding a new item to this list, the defaults are still kept. To override the defaults as well, use lib.mkForce.

Type: list of (one of "cache-memory", "jwt", "oidc", "postgres", "redis", "saml2", "sentry", "systemd", "url-preview", "user-search")

Default

["systemd""postgres""url-preview""user-search"]

Example

["cache-memory" # Provide statistics about caching memory consumption"jwt" # JSON Web Token authentication"oidc" # OpenID Connect authentication"postgres" # PostgreSQL database backend"redis" # Redis support for the replication stream between worker processes"saml2" # SAML2 authentication"sentry" # Error tracking and performance metrics"systemd" # Provide the JournalHandler used in the default log_config"url-preview" # Support for oEmbed URL previews"user-search" # Support internationalized domain names in user-search]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.log

Default configuration for the loggers used by matrix-synapse and its workers. The defaults are added with the default priority which means that these will be merged with additional declarations. These additional declarations also take precedence over the defaults when declared with at least normal priority. For instance the log-level for synapse and its workers can be changed like this:

{ lib, ... }: {
  services.matrix-synapse.log.root.level = "WARNING";
}

And another field can be added like this:

{
  services.matrix-synapse.log = {
    loggers."synapse.http.matrixfederationclient".level = "DEBUG";
  };
}

Additionally, the field handlers.journal.SYSLOG_IDENTIFIER will be added to each log config, i.e. * synapse for matrix-synapse.service * synapse-<worker name> for matrix-synapse-worker-<worker name>.service

This is only done if this option has a handlers.journal field declared.

To discard all settings declared by this option for each worker and synapse, lib.mkForce can be used.

To discard all settings declared by this option for a single worker or synapse only, or can be used.

Type: attribute set of (YAML value)

Default

{disable_existing_loggers = false;formatters = {journal_fmt = {format = "%(name)s: [%(request)s] %(message)s";};};handlers = {journal = {class = "systemd.journal.JournalHandler";formatter = "journal_fmt";};};root = {handlers = ["journal"];level = "INFO";};version = 1;}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.package

Reference to the matrix-synapse wrapper with all extras (e.g. for oidc or saml2) added to the PYTHONPATH of all executables.

This option is useful to reference the "final" matrix-synapse package that's actually used by matrix-synapse.service. For instance, when using workers, it's possible to run ${config.services.matrix-synapse.package}/bin/synapse_worker and no additional PYTHONPATH needs to be specified for extras or plugins configured via services.matrix-synapse.

However, this means that this option is supposed to be only declared by the services.matrix-synapse module itself and is thus read-only. In order to modify matrix-synapse itself, use an overlay to override pkgs.matrix-synapse-unwrapped.

Type: package

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.plugins

List of additional Matrix plugins to make available.

Type: list of package

Default

[ ]

Example

with config.services.matrix-synapse.package.plugins; [matrix-synapse-ldap3matrix-synapse-pam];

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.serviceUnit

The systemd unit (a service or a target) for other services to depend on if they need to be started after matrix-synapse.

This option is useful as the actual parent unit for all matrix-synapse processes changes when configuring workers.

Type: string

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings

The primary synapse configuration. See the sample configuration for possible values.

Secrets should be passed in by using the extraConfigFiles option.

Type: YAML value

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.app_service_config_files

A list of application service config file to use

Type: list of path

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.database.args.database

Name of the database when using the psycopg2 backend, path to the database location when using sqlite3.

Type: string

Default

{sqlite3 = "${services.matrix-synapse.dataDir}/homeserver.db";psycopg2 = "matrix-synapse";}.${services.matrix-synapse.settings.database.name};

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.database.args.user

Username to connect with psycopg2, set to null when using sqlite3.

Type: null or string

Default

{sqlite3 = null;psycopg2 = "matrix-synapse";}.${cfg.settings.database.name};

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.database.name

The database engine name. Can be sqlite3 or psycopg2.

Type: one of "sqlite3", "psycopg2"

Default

if versionAtLeast config.system.stateVersion "18.03"then "psycopg2"else "sqlite3"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.dynamic_thumbnails

Whether to generate new thumbnails on the fly to precisely match the resolution requested by the client. If true then whenever a new resolution is requested by the client the server will generate a new thumbnail. If false the server will pick a thumbnail from a precalculated list.

Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.enable_metrics

Enable collection and rendering of performance metrics

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.enable_registration

Enable registration for new users.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.listeners

List of ports that Synapse should listen on, their purpose and their configuration.

By default, synapse will be configured for client and federation traffic on port 8008, and use a UNIX domain socket for worker replication. See services.matrix-synapse.workers for more details.

Type: list of (submodule)

Default

[{bind_addresses = ["127.0.0.1"];port = 8008;resources = [{compress = true;names = ["client"];}{compress = false;names = ["federation"];}];tls = false;type = "http";x_forwarded = true;}]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.listeners.*.bind_addresses

IP addresses to bind the listener to.

Type: null or (list of string)

Default

if path != null thennullelse["::1""127.0.0.1"]

Example

["::""0.0.0.0"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.listeners.*.mode

File permissions on the UNIX domain socket.

Type: null or string matching the pattern ^[0,2-7]{3,4}$

Default

if path != null then"660"elsenull

Example

"660"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.listeners.*.path

Unix domain socket path to bind this listener to.

::: {.note} This option is incompatible with {option}bind_addresses, {option}port, {option}tls and also does not support the metrics and manhole listener {option}type. :::

Type: null or path

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.listeners.*.port

The port to listen for HTTP(S) requests on.

Type: null or 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Default

null

Example

8448

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.listeners.*.resources

List of HTTP resources to serve on this listener.

Type: list of (submodule)

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.listeners.*.resources.*.compress {services-matrix-synapse-settings-listeners--resources--compress}

Whether synapse should compress HTTP responses to clients that support it. This should be disabled if running synapse behind a load balancer that can do automatic compression.

Type: boolean

Default {services-matrix-synapse-settings-listeners--resources--compress-default}

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.listeners.*.resources.*.names {services-matrix-synapse-settings-listeners--resources--names}

List of resources to host on this listener.

Type: list of (one of "client", "consent", "federation", "health", "keys", "media", "metrics", "openid", "replication", "static")

Example {services-matrix-synapse-settings-listeners--resources--names-example}

["client"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.listeners.*.tls

Whether to enable TLS on the listener socket.

::: {.note} This option will be ignored for UNIX domain sockets. :::

Type: null or boolean

Default

'' Enabled for the main instance listener, unless it is configured with a UNIX domain socket path.''

Example

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.listeners.*.type

The type of the listener, usually http.

Type: one of "http", "manhole", "metrics", "replication"

Default

"http"

Example

"metrics"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.listeners.*.x_forwarded

Use the X-Forwarded-For (XFF) header as the client IP and not the actual client IP.

Type: boolean

Default

'' Enabled if the listener is configured with a UNIX domain socket path''

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.log_config

The file that holds the logging configuration.

Type: path

Default

Path to a yaml file generated from this Nix expression:

{
  disable_existing_loggers = false;
  formatters = {
    journal_fmt = {
      format = "%(name)s: [%(request)s] %(message)s";
    };
  };
  handlers = {
    journal = {
      SYSLOG_IDENTIFIER = "synapse";
      class = "systemd.journal.JournalHandler";
      formatter = "journal_fmt";
    };
  };
  root = {
    handlers = [
      "journal"
    ];
    level = "INFO";
  };
  version = 1;
}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.macaroon_secret_key

Secret key for authentication tokens. If none is specified, the registration_shared_secret is used, if one is given; otherwise, a secret key is derived from the signing key.

Secrets should be passed in via extraConfigFiles!

Type: null or string

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.max_image_pixels

Maximum number of pixels that will be thumbnailed

Type: string

Default

"32M"

Example

"64M"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.max_upload_size

The largest allowed upload size in bytes

Type: string

Default

"50M"

Example

"100M"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.media_store_path

Directory where uploaded images and attachments are stored.

Type: path

Default

"/var/lib/matrix-synapse/media_store for when system.stateVersion is at least 22.05, /var/lib/matrix-synapse/media when lower than 22.05"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.pid_file

The file to store the PID in.

Type: path

Default

"/run/matrix-synapse.pid"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.presence.enabled

Whether to enable presence tracking.

Presence tracking allows users to see the state (e.g online/offline) of other local and remote users.

Type: boolean

Default

true

Example

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.public_baseurl

The public-facing base URL for the client API (not including _matrix/...)

Type: null or string

Default

null

Example

"https://example.com:8448/"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.redis

Redis configuration for synapse.

See the upstream documentation for available options.

Type: YAML value

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.redis.enabled

Whether to use redis support

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.registration_shared_secret

If set, allows registration by anyone who also has the shared secret, even if registration is otherwise disabled.

Secrets should be passed in via extraConfigFiles!

Type: null or string

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.report_stats

Whether or not to report anonymized homeserver usage statistics.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.server_name

The domain name of the server, with optional explicit port. This is used by remote servers to look up the server address. This is also the last part of your UserID.

The server_name cannot be changed later so it is important to configure this correctly before you start Synapse.

Type: string

Default

config.networking.hostName

Example

"example.com"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.signing_key_path

Path to the signing key to sign messages with.

Type: path

Default

"/var/lib/matrix-synapse/homeserver.signing.key"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.tls_certificate_path

PEM encoded X509 certificate for TLS. You can replace the self-signed certificate that synapse autogenerates on launch with your own SSL certificate + key pair if you like. Any required intermediary certificates can be appended after the primary certificate in hierarchical order.

Type: null or string

Default

null

Example

"/var/lib/acme/example.com/fullchain.pem"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.tls_private_key_path

PEM encoded private key for TLS. Specify null if synapse is not speaking TLS directly.

Type: null or string

Default

null

Example

"/var/lib/acme/example.com/key.pem"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.trusted_key_servers

The trusted servers to download signing keys from.

Type: list of (YAML value)

Default

[{server_name = "matrix.org";verify_keys = {"ed25519:auto" = "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw";};}]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.trusted_key_servers.*.server_name

Hostname of the trusted server.

Type: string

Example

"matrix.org"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.turn_shared_secret

The shared secret used to compute passwords for the TURN server.

Secrets should be passed in via extraConfigFiles!

Type: string

Default

""

Example

config.services.coturn.static-auth-secret

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.turn_uris

The public URIs of the TURN server to give to clients

Type: list of string

Default

[ ]

Example

["turn:turn.example.com:3487?transport=udp""turn:turn.example.com:3487?transport=tcp""turns:turn.example.com:5349?transport=udp""turns:turn.example.com:5349?transport=tcp"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.url_preview_enabled

Is the preview URL API enabled? If enabled, you must specify an explicit url_preview_ip_range_blacklist of IPs that the spider is denied from accessing.

Type: boolean

Default

true

Example

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.url_preview_ip_range_blacklist

List of IP address CIDR ranges that the URL preview spider is denied from accessing.

Type: list of string

Default

["10.0.0.0/8""100.64.0.0/10""127.0.0.0/8""169.254.0.0/16""172.16.0.0/12""192.0.0.0/24""192.0.2.0/24""192.168.0.0/16""192.88.99.0/24""198.18.0.0/15""198.51.100.0/24""2001:db8::/32""203.0.113.0/24""224.0.0.0/4""::1/128""fc00::/7""fe80::/10""fec0::/10""ff00::/8"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.url_preview_ip_range_whitelist

List of IP address CIDR ranges that the URL preview spider is allowed to access even if they are specified in url_preview_ip_range_blacklist.

Type: list of string

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.settings.url_preview_url_blacklist

Optional list of URL matches that the URL preview spider is denied from accessing.

Type: list of ((attribute set of string) or string convertible to it)

Default

[ ]

Example

[{ scheme = "http"; } # no http previews{ netloc = "www.acme.com"; path = "/foo"; } # block http(s)://www.acme.com/foo]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.withJemalloc

Whether to preload jemalloc to reduce memory fragmentation and overall usage.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.workers

Options for configuring workers. Worker support will be enabled if at least one worker is configured here.

See the worker documention for possible options for each worker. Worker-specific options overriding the shared homeserver configuration can be specified here for each worker.

::: {.note} Worker support will add a replication listener on port 9093 to the main synapse process using the default value of services.matrix-synapse.settings.listeners and configure that listener as services.matrix-synapse.settings.instance_map.main. If you set either of those options, make sure to configure a replication listener yourself.

A redis server is required for running workers. A local one can be enabled using services.matrix-synapse.configureRedisLocally.

Workers also require a proper reverse proxy setup to direct incoming requests to the appropriate process. See the reverse proxy documentation for a general reverse proxying setup and the worker documentation for the available endpoints per worker application. :::

Type: attribute set of (YAML value)

Default

{ }

Example

{"federation_sender" = { };"federation_receiver" = {worker_listeners = [{type = "http";port = 8009;bind_addresses = [ "127.0.0.1" ];tls = false;x_forwarded = true;resources = [{names = [ "federation" ];}];}];};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.workers.<name>.worker_app

Type of this worker Type: one of "synapse.app.generic_worker", "synapse.app.media_repository"

Default

"synapse.app.generic_worker"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.workers.<name>.worker_listeners

List of ports that this worker should listen on, their purpose and their configuration.

Type: list of (submodule)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.workers.<name>.worker_listeners.*.bind_addresses

IP addresses to bind the listener to.

Type: null or (list of string)

Default

if path != null thennullelse["::1""127.0.0.1"]

Example

["::""0.0.0.0"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.workers.<name>.worker_listeners.*.mode

File permissions on the UNIX domain socket.

Type: null or string matching the pattern ^[0,2-7]{3,4}$

Default

if path != null then"660"elsenull

Example

"660"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.workers.<name>.worker_listeners.*.path

Unix domain socket path to bind this listener to.

::: {.note} This option is incompatible with {option}bind_addresses, {option}port, {option}tls and also does not support the metrics and manhole listener {option}type. :::

Type: null or path

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.workers.<name>.worker_listeners.*.port

The port to listen for HTTP(S) requests on.

Type: null or 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Default

null

Example

8448

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.workers.<name>.worker_listeners.*.resources

List of HTTP resources to serve on this listener.

Type: list of (submodule)

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.workers.<name>.worker_listeners.*.resources.*.compress {services-matrix-synapse-workers--worker_listeners--resources--compress}

Whether synapse should compress HTTP responses to clients that support it. This should be disabled if running synapse behind a load balancer that can do automatic compression.

Type: boolean

Default {services-matrix-synapse-workers--worker_listeners--resources--compress-default}

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.workers.<name>.worker_listeners.*.resources.*.names {services-matrix-synapse-workers--worker_listeners--resources--names}

List of resources to host on this listener.

Type: list of (one of "client", "consent", "federation", "health", "keys", "media", "metrics", "openid", "replication", "static")

Example {services-matrix-synapse-workers--worker_listeners--resources--names-example}

["client"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.workers.<name>.worker_listeners.*.tls

Whether to enable TLS on the listener socket.

::: {.note} This option will be ignored for UNIX domain sockets. :::

Type: null or boolean

Default

'' Enabled for the main instance listener, unless it is configured with a UNIX domain socket path.''

Example

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.workers.<name>.worker_listeners.*.type

The type of the listener, usually http.

Type: one of "http", "manhole", "metrics", "replication"

Default

"http"

Example

"metrics"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.workers.<name>.worker_listeners.*.x_forwarded

Use the X-Forwarded-For (XFF) header as the client IP and not the actual client IP.

Type: boolean

Default

'' Enabled if the listener is configured with a UNIX domain socket path''

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix

services.matrix-synapse.workers.<name>.worker_log_config

The file for log configuration.

See the python documentation for the schema and the upstream repository for an example.

Type: path

Default

Path to a yaml file generated from this Nix expression:

{
  disable_existing_loggers = false;
  formatters = {
    journal_fmt = {
      format = "%(name)s: [%(request)s] %(message)s";
    };
  };
  handlers = {
    journal = {
      SYSLOG_IDENTIFIER = "synapse-‹name›";
      class = "systemd.journal.JournalHandler";
      formatter = "journal_fmt";
    };
  };
  root = {
    handlers = [
      "journal"
    ];
    level = "INFO";
  };
  version = 1;
}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/matrix/synapse.nix