Coordinator
Configures the cluster coordinator for inter-node communication.
This object can be configured from the WebUI under Settings › Cluster › Coordinator
Fields
Section titled “Fields”Coordinator is a multi-variant object: each instance has an @type discriminator selecting one of the variants below, and each variant carries its own set of fields.
@type: "Disabled"
Section titled “@type: "Disabled"”Disabled
@type: "Default"
Section titled “@type: "Default"”Use in-memory store (Stalwart Keep or Redis only)
@type: "Kafka"
Section titled “@type: "Kafka"”Kafka
Type:
Set<String>· min items: 1Kafka bootstrap brokers, as host:port pairs
groupId
Section titled “groupId”Type:
String· requiredConsumer group ID prefix. Each node joins its own consumer group, named after this prefix followed by a dash and the node ID, so that every node receives every notification
messageTimeout
Section titled “messageTimeout”Type:
Duration· default:5000Timeout for message processing
sessionTimeout
Section titled “sessionTimeout”Type:
Duration· default:5000Timeout for session
useTls
Section titled “useTls”Type:
Boolean· default:falseUse TLS to connect to the Kafka brokers
allowInvalidCerts
Section titled “allowInvalidCerts”Type:
Boolean· default:falseAllow invalid TLS certificates when connecting to the Kafka brokers
@type: "Nats"
Section titled “@type: "Nats"”NATS
Type:
Set<String>· default:{"127.0.0.1:4222":true}· min items: 1NATS servers to connect to, as host:port pairs
maxReconnects
Section titled “maxReconnects”Type:
UnsignedInt?Maximum number of times to attempt to reconnect to the server
connectTimeout
Section titled “connectTimeout”Type:
Duration· default:5000Timeout for establishing a connection to the server
requestTimeout
Section titled “requestTimeout”Type:
Duration· default:10000Timeout for requests to the server
pingInterval
Section titled “pingInterval”Type:
Duration· default:60000Interval between pings to the server
clientCapacity
Section titled “clientCapacity”Type:
UnsignedInt· default:2048· min: 1By default, Client dispatches op’s to the Client onto the channel with capacity of 2048. This option enables overriding it
readBufferCapacity
Section titled “readBufferCapacity”Type:
UnsignedInt· default:65535· min: 1Sets the initial capacity of the read buffer. Which is a buffer used to gather partial protocol messages.
subscriptionCapacity
Section titled “subscriptionCapacity”Type:
UnsignedInt· default:65536· min: 1Sets the capacity for Subscribers. Exceeding it will trigger slow consumer error callback and drop messages.
noEcho
Section titled “noEcho”Type:
Boolean· default:trueDisables delivering messages that were published from the same connection.
useTls
Section titled “useTls”Type:
Boolean· default:falseUse TLS to connect to the NATS server
allowInvalidCerts
Section titled “allowInvalidCerts”Type:
Boolean· default:falseAllow invalid TLS certificates when connecting to the NATS server
authSecret
Section titled “authSecret”Type:
SecretKeyOptional· default:{"@type":"None"}Password to connect to the store
authUsername
Section titled “authUsername”Type:
String?· default:"stalwart"Username to connect to the store
credentials
Section titled “credentials”Type:
SecretTextOptional· default:{"@type":"None"}String containing the JWT credentials
@type: "Zenoh"
Section titled “@type: "Zenoh"”Eclipse Zenoh
config
Section titled “config”Type:
Text· requiredZenoh configuration string
@type: "Redis"
Section titled “@type: "Redis"”Redis
Type:
Uri· default:"redis://127.0.0.1"URL of the Redis server
connectTimeout
Section titled “connectTimeout”Type:
Duration· default:10000Maximum time to wait for a new connection to the Redis server to be established
allowInvalidCerts
Section titled “allowInvalidCerts”Type:
Boolean· default:falseAllow invalid TLS certificates when connecting to the Redis server
poolMaxConnections
Section titled “poolMaxConnections”Type:
UnsignedInt· default:10· max: 8192 · min: 1Maximum number of connections to the store
poolTimeoutCreate
Section titled “poolTimeoutCreate”Type:
Duration?· default:30000Timeout for creating a new connection
poolTimeoutWait
Section titled “poolTimeoutWait”Type:
Duration?· default:30000Timeout for waiting for a connection from the pool
poolTimeoutRecycle
Section titled “poolTimeoutRecycle”Type:
Duration?· default:30000Timeout for recycling a connection
@type: "RedisCluster"
Section titled “@type: "RedisCluster"”Redis Cluster
Type:
Set<Uri>· default:{"redis://127.0.0.1":true}URL(s) of the Redis server(s)
connectTimeout
Section titled “connectTimeout”Type:
Duration· default:10000Maximum time to wait for a new connection to the Redis server to be established
allowInvalidCerts
Section titled “allowInvalidCerts”Type:
Boolean· default:falseAllow invalid TLS certificates when connecting to the Redis server
authUsername
Section titled “authUsername”Type:
String?Username to connect to the store
authSecret
Section titled “authSecret”Type:
SecretKeyOptional· default:{"@type":"None"}Password to connect to the store
maxRetryWait
Section titled “maxRetryWait”Type:
Duration?· max: 1024 · min: 1Maximum time to wait between retries
minRetryWait
Section titled “minRetryWait”Type:
Duration?· max: 1024 · min: 1Minimum time to wait between retries
maxRetries
Section titled “maxRetries”Type:
UnsignedInt?· max: 1024 · min: 1Number of retries to connect to the Redis cluster
readFromReplicas
Section titled “readFromReplicas”Type:
Boolean· default:trueWhether to read from replicas
protocolVersion
Section titled “protocolVersion”Type:
RedisProtocol· default:"resp2"Protocol Version
poolMaxConnections
Section titled “poolMaxConnections”Type:
UnsignedInt· default:10· max: 8192 · min: 1Maximum number of connections to the store
poolTimeoutCreate
Section titled “poolTimeoutCreate”Type:
Duration?· default:30000Timeout for creating a new connection
poolTimeoutWait
Section titled “poolTimeoutWait”Type:
Duration?· default:30000Timeout for waiting for a connection from the pool
poolTimeoutRecycle
Section titled “poolTimeoutRecycle”Type:
Duration?· default:30000Timeout for recycling a connection
@type: "RedisSentinel"
Section titled “@type: "RedisSentinel"”Redis Sentinel
Type:
Set<Uri>· default:{"redis://127.0.0.1:26379":true}Address(es) of the Sentinel node(s)
serviceName
Section titled “serviceName”Type:
String· default:"mymaster"Name of the monitored master (service) to query via the Sentinels
connectTimeout
Section titled “connectTimeout”Type:
Duration· default:10000Maximum time to wait for a new connection to the Redis server to be established
allowInvalidCerts
Section titled “allowInvalidCerts”Type:
Boolean· default:falseAllow invalid TLS certificates when connecting to the Redis server
authUsername
Section titled “authUsername”Type:
String?Username to connect to the data nodes
authSecret
Section titled “authSecret”Type:
SecretKeyOptional· default:{"@type":"None"}Password to connect to the data nodes
sentinelUsername
Section titled “sentinelUsername”Type:
String?Username to connect to the Sentinel nodes
sentinelSecret
Section titled “sentinelSecret”Type:
SecretKeyOptional· default:{"@type":"None"}Password to connect to the Sentinel nodes
protocolVersion
Section titled “protocolVersion”Type:
RedisProtocol· default:"resp2"Protocol Version
poolMaxConnections
Section titled “poolMaxConnections”Type:
UnsignedInt· default:10· max: 8192 · min: 1Maximum number of connections to the store
poolTimeoutCreate
Section titled “poolTimeoutCreate”Type:
Duration?· default:30000Timeout for creating a new connection
poolTimeoutWait
Section titled “poolTimeoutWait”Type:
Duration?· default:30000Timeout for waiting for a connection from the pool
poolTimeoutRecycle
Section titled “poolTimeoutRecycle”Type:
Duration?· default:30000Timeout for recycling a connection
@type: "Keep"
Section titled “@type: "Keep"”Stalwart Keep
Type:
Set<String>· default:{"127.0.0.1:7000":true}· min items: 1Stalwart Keep servers to connect to, as host:port pairs. With cluster discovery these are the seeds from which the members are learned; without it only the first one is used
clusterDiscovery
Section titled “clusterDiscovery”Type:
Boolean· default:falseLearn the members of a Stalwart Keep cluster from the servers listed and place each key on the member that owns it. Requires the cluster secret
secret
Section titled “secret”Type:
SecretKeyOptional· default:{"@type":"None"}Cluster secret, as 32 hexadecimal digits. Required for cluster discovery and for connections without TLS. When set, each request is sent directly to the shard that owns its key
Type:
KeepTls· default:{"@type":"Disabled"}How connections to Stalwart Keep are protected and authenticated
connections
Section titled “connections”Type:
UnsignedInt· default:16· min: 1 · max: 1024Number of connections per server when no cluster secret is set
shardConnections
Section titled “shardConnections”Type:
UnsignedInt· default:2· min: 1 · max: 8Number of connections per server shard when the cluster secret is set
streamMode
Section titled “streamMode”Type:
KeepStreamMode· default:"everywhere"Which servers carry cluster events when this store is the cluster coordinator
connectTimeout
Section titled “connectTimeout”Type:
Duration· default:5000Maximum time to wait for the servers when the store is opened, and for a connection to be established
attemptTimeout
Section titled “attemptTimeout”Type:
Duration· default:1000Maximum time to wait for the reply to one attempt of a request
deadline
Section titled “deadline”Type:
Duration· default:5000Maximum time a request may take over all its attempts. Must not be shorter than the attempt timeout
JMAP API
Section titled “JMAP API”The Coordinator singleton is available via the urn:stalwart:jmap capability.
x:Coordinator/get
Section titled “x:Coordinator/get”This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
For singletons, the ids argument should be the literal singleton (or null to return the single instance).
This method requires the sysCoordinatorGet permission.
curl -X POST https://mail.example.com/jmap/ \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:Coordinator/get", { "ids": [ "singleton" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:Coordinator/set
Section titled “x:Coordinator/set”This is a standard Foo/set method as defined in RFC 8620, Section 5.3.
For singletons, only the update argument with id singleton is accepted; create and destroy arguments are rejected.
This method requires the sysCoordinatorUpdate permission.
curl -X POST https://mail.example.com/jmap/ \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:Coordinator/set", { "update": { "singleton": { "description": "updated value" } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
stalwart-cli get CoordinatorUpdate
Section titled “Update”stalwart-cli update Coordinator --field description='updated value'Nested types
Section titled “Nested types”SecretKeyOptional
Section titled “SecretKeyOptional”An optional secret value, or none.
None: No secret. No additional fields.Value: Secret value. Carries the fields ofSecretKeyValue.EnvironmentVariable: Secret read from environment variable. Carries the fields ofSecretKeyEnvironmentVariable.File: Secret read from file. Carries the fields ofSecretKeyFile.
SecretKeyValue
Section titled “SecretKeyValue”A secret value provided directly.
secret
Section titled “secret”Type:
String· required · secretPassword or secret value
SecretKeyEnvironmentVariable
Section titled “SecretKeyEnvironmentVariable”A secret value read from an environment variable.
variableName
Section titled “variableName”Type:
String· requiredEnvironment variable name to read the secret from
SecretKeyFile
Section titled “SecretKeyFile”A secret value read from a file.
filePath
Section titled “filePath”Type:
String· requiredFile path to read the secret from
SecretTextOptional
Section titled “SecretTextOptional”An optional secret text value, or none.
None: No secret. No additional fields.Text: Secret value. Carries the fields ofSecretTextValue.EnvironmentVariable: Secret read from environment variable. Carries the fields ofSecretKeyEnvironmentVariable.File: Secret read from file. Carries the fields ofSecretKeyFile.
SecretTextValue
Section titled “SecretTextValue”A secret text value provided directly.
secret
Section titled “secret”Type:
Text· required · secretPassword or secret value
KeepTls
Section titled “KeepTls”How connections to Stalwart Keep are protected and authenticated.
Disabled: Plaintext, authenticated with the cluster secret. No additional fields.RawPublicKeys: Mutual TLS with raw public keys. Carries the fields ofKeepTlsRawPublicKeys.Authority: Mutual TLS with certificates from a cluster CA. Carries the fields ofKeepTlsAuthority.
KeepTlsRawPublicKeys
Section titled “KeepTlsRawPublicKeys”Mutual TLS 1.3 with raw public keys. Files are read from each node’s filesystem when the store is opened, so every node can have its own key at the same path.
keyPath
Section titled “keyPath”Type:
String· requiredPath of this node’s private key file, in PEM or DER format
serverKeysPath
Section titled “serverKeysPath”Type:
String· requiredPath of the PEM file listing the public keys of the Stalwart Keep servers to accept
KeepTlsAuthority
Section titled “KeepTlsAuthority”Mutual TLS 1.3 with certificates from a cluster CA. Files are read from each node’s filesystem when the store is opened, so every node can have its own certificate at the same path.
caPath
Section titled “caPath”Type:
String· requiredPath of the cluster CA certificate file
certPath
Section titled “certPath”Type:
String· requiredPath of this node’s certificate chain file
keyPath
Section titled “keyPath”Type:
String· requiredPath of this node’s private key file
serverName
Section titled “serverName”Type:
String?Name the server certificates must carry. Leave empty to use the host of each server
RedisProtocol
Section titled “RedisProtocol”| Value | Label |
|---|---|
resp2 | RESP2 |
resp3 | RESP3 |
KeepStreamMode
Section titled “KeepStreamMode”| Value | Label |
|---|---|
everywhere | Subscribe on every server and publish on one |
owner | Subscribe and publish on one server chosen per cluster |