Skip to content

Configuration

Importance

There are many business scenarios for instant messaging, so different businesses have vastly different requirements for hardware resources (for example: architecture that requires a database and architecture that does not require a database). In order to effectively utilize server resources, please be sure to carefully understand the configuration parameters provided by the Turms server.

  • Scenario 1: 100% message reachability vs actively discarding messages

    • In social applications, messages are generally required to have a 100% reachability rate. Conversely, for live chat room applications, the server will even actively discard user messages or send messages to only some users in the chat room according to message priority and server load.
    • For the former, Turms uses Redis to pull the incremental sequence ID at the session level to achieve 100% delivery of messages. For the latter, Turms will actively discard messages based on messages in memory and server load information. The two have completely different but reasonable requirements for message reachability, so the implementation of the two also has completely different requirements for hardware configuration.
  • Scenario 2: Read-diffused message storage vs zero-message storage

    • Application A is an instant messaging application mainly for business customers. This application has a requirement: when a user sends a message in the business group, the user can know whether other every user in the group has read the message, even if the user finishes sending the message When it goes offline, when it goes online again, it can still check the read status of other people's messages.

      Therefore, if a business group has 100 users, when one of the users sends a message, Turms needs to store 1 Message and 1 Conversation (Turms adopts the read diffusion message model, and please note: this Conversation record will carry 99 last read time of a group member).

    • Application B is a live barrage chat application, which handles messages very casually. When a user sends a message on a live channel, the user not only does not need to know the read status of other users, but even the message itself does not require storage (that is, no offline message requirement).

      Therefore, if a live channel has 100 members, when one of the users sends a message, Turms needs to store 0 Message and 0 Conversation records.

    • Contrast that application A requires the message storage function, while application B does not. Therefore, the table for storing messages is not even used in the architecture design of the B application (of course, in practical applications, user messages are generally stored for user behavior analysis). Therefore, the hardware requirements of the two are also quite different.

Local configuration and global configuration

The Turms server has two types of configurations: local configuration and global configuration, among which:

Local ConfigurationGlobal Configuration
Application DomainValid only for the current nodeValid for all nodes in the cluster
Storage locationStored in the local application-[profile].yaml fileStored in the turms-config/shared-cluster-properties collection in the MongoDB database
MutableFor properties marked with the MutableProperty annotation, users can perform real-time updates with zero downtime when the Turms cluster is running through the dedicated API interface for administratorsSame as the left

Configuration Categories

The configuration is divided into two categories, one is the configuration of the JVM, and the other is the configuration of the Turms server.

JVM configuration

The JVM default configuration file of turms-gateway is: turms-gateway/dist/config/jvm.options

The default JVM configuration file for turms-service is: turms-service/dist/config/jvm.options.

Users generally use the default JVM configuration and do not need to modify the JVM configuration by themselves.

If the user wants to modify the JVM configuration, there are two ways:

  1. Modify the environment variable TURMS_GATEWAY_JVM_CONF (for turms-gateway) or TURMS_SERVICE_JVM_CONF (for turms-service) and point to the custom JVM configuration file to use a fully custom JVM configuration. The following takes modifying the JVM configuration of turms-gateway as an example, the specific modification method:

    1. If you start via the run.sh script, you can use something like export TURMS_GATEWAY_JVM_CONF=<your-jvm-options-file-path> && sh run.sh -f to set the environment variable and start.

    2. If you start from a Docker image, you can use something like:

      shell
      docker run -d --name turms-gateway --ulimit nofile=1048576 \
        --memory-swappiness=0 \
        -p 7510:7510 -p 9510:9510 -p 10510:10510 -p 11510:11510 -p 12510:12510 \
        --health-cmd="curl -I --silent $${HOST}:9510/health || exit 1" \
        --health-interval=5s \
        --health-timeout=5s \
        --health-retries=3 \
        --health-start-period=60s \
        -e TURMS_GATEWAY_JVM_CONF=<your-jvm-options-file-path> \
        ghcr.io/turms-im/turms-gateway

      Note: The above TURMS_GATEWAY_JVM_CONF path points to the path inside the mirror, not the path of the host. If you want to use the configuration file in the host, you need to use Docker's mounting mechanism, such as:

      shell
      docker run -d --name turms-gateway --ulimit nofile=1048576 \
        --memory-swappiness=0 \
        -p 7510:7510 -p 9510:9510 -p 10510:10510 -p 11510:11510 -p 12510:12510 \
        --health-cmd="curl -I --silent $${HOST}:9510/health || exit 1" \
        --health-interval=5s \
        --health-timeout=5s \
        --health-retries=3 \
        --health-start-period=60s \
        -v <your-jvm-options-file-path>:/opt/turms/turms-gateway/config/jvm.options:ro \
        ghcr.io/turms-im/turms-gateway
    3. If via Docker Compose, you can use something like:

    shell
    TURMS_GATEWAY_JVM_CONF=<your-jvm-options-file-path> docker compose -f docker-compose.standalone.yml up --force-recreate
    powershell
    $env:TURMS_GATEWAY_JVM_CONF=<your-jvm-options-file-path>;docker compose -f docker-compose.standalone.yml up --force-recreate
    Note: The above `TURMS_GATEWAY_JVM_CONF` path points to the path inside the mirror, not the path of the host. If you want to use the configuration file in the host machine, you need to modify the `docker-compose.standalone.yml` configuration file to use Docker's mounting mechanism, such as:
    
    ```yaml
    turms-gateway:
      volumes:
        - <your-jvm-options-file-path>:/opt/turms/turms-gateway/config/jvm.options:ro
    ```
    
  2. Modify the environment variable TURMS_GATEWAY_JVM_OPTS (for turms-gateway) or TURMS_SERVICE_JVM_OPTS (for turms-service) to append a custom JVM configuration based on the JVM configuration file and override the declared JVM configuration. The specific modification method is the same as above, so it will not be repeated.

    Note: The format of this variable is: -D<name>=<value> -D<name>=<value>, such as: -Dspring.profiles.active=DEV -Dturms.cluster.discovery.address.advertise -host=myturms.

Turms server configuration

Turms configurations fall into four broad categories:

  • Turms Gateway configuration: corresponding to the unique configuration of the turms-gateway server
  • Turms Service configuration: corresponding to the unique configuration of the turms-service server.
  • Common general configuration: Common general configuration can be shared by turms-gateway and turms-service servers.
  • The configuration of the plug-in itself: the configuration provided by the Turms server plug-in itself.

Configuration method

  1. The aforementioned TURMS_GATEWAY_JVM_CONF or TURMS_SERVICE_JVM_CONF, and TURMS_GATEWAY_JVM_OPTS or TURMS_SERVICE_JVM_OPTS can also be used to configure the parameters of the Turms server.
  2. Modify the configuration file under application.yaml. specific method:
    1. Directly modify the application.yaml file under the server in the warehouse. Because if the configuration source file is modified, the user cannot use the official Turms Docker image, and needs to package it into a JAR package and create an image. Therefore, this method is generally only used for local development and testing, not for online use. environment.
    2. Use the Docker mounting method mentioned above to mount the custom server configuration file to the path /opt/turms/turms-gateway/config/application.yaml.
  3. Call the Admin HTTP API to modify, the path is: PUT /cluster/settings.

Reminder: For the configuration of the plug-in itself, its configuration method is the same as that of the Turms server, except that it does not support dynamic modification using the Admin HTTP API for the time being, it can also be configured based on the above two methods ①②. For example, if a plug-in is a plug-in for the turms-gateway server, then the user can put the configuration of the plug-in itself into the TURMS_GATEWAY_JVM_OPTS environment variable of the turms-gateway server.

Profiles

If developers need to use different configurations for the same Turms server configuration and switching, configuration sets can be used.

By default, the configuration hard-coded in the source code of the Turms server and the configuration specified in the application.yaml file is the configuration of the default production environment. If developers want to switch to use other configuration sets, they can use other configuration sets by modifying the spring.profiles.active configuration in the application.yaml file.

For example, a common use case: when developing and debugging locally, if you want to switch the production environment configuration to the default development environment configuration, the developer can change the spring.profiles.active value in the application.yaml file to dev , so that the Turms server will adopt the configuration specified in the two files application.yaml and application-dev.yaml (default development environment configuration), and the configuration priority in the application-dev.yaml file Higher, will override the default configuration.

Introduction to Configuration Parameters

Since there are hundreds of configuration items on the Turms server, this section only briefly introduces the configuration categories. If readers want to refer to the specific configuration items, they can refer to the codes of each configuration class under the im.turms.server.common.infra.property package, or continue to browse the configuration item descriptions provided in the Configuration Items section below.

Reminder: After you compile the turms/turms-gateway server project locally, the compiler will generate the target/classes/META-INF/spring-configuration-metadata.json file. IntelliJ IDEA can automatically detect this file, and provide configuration prompts and completion functions when you enter Turms-related configuration, as shown in the following figure:

Tumrs Service configuration
CategoryClassField NameDescriptionSupplement
Admin APIAdminApiPropertiesadminApiRelated configuration of administrator API interface
Client APIClientApiPropertiesclientApiRelated configuration of client API interface
Fake dataFakePropertiesfakeFake data related configuration
Data SourceMongoPropertiesmongoMongoDB database related configurationTurms completely reuses the URI configuration of MongoDB. Reference document:
https://docs.mongodb.com/manual/reference/connection-string/
TurmsRedisPropertiesredisRedis database configuration
StatisticsStatisticsPropertiesstatisticsStatistics related configuration
NotificationNotificationPropertiesnotificationNotification related configuration
File storageStoragePropertiesstorageStorage related configuration
Business behaviorUserPropertiesuserUser-related configuration
GroupPropertiesgroupGroup related configuration
ConversationPropertiesconversationMessage conversation service related configuration
MessagePropertiesmessageMessage service related configuration
Turms Gateway configuration
CategoryClassField NameDescription
Admin APIAdminApiPropertiesadminApiRelated configuration of admin API
Client APIClientApiPropertiesclientApiClient-oriented HTTP access layer related configuration (that is, ReasonController related configuration)
NotificationLoggingPropertiesnotificationLoggingNotification log related configuration
Service interfaceUdpPropertiesudpUDP server related configuration
TcpPropertiestcpTCP server configuration
WebSocketPropertieswebsocketWebSocket server related configuration
DiscoveryPropertiesserviceDiscoveryService discovery related configuration
Fake dataFakePropertiesfakeFake data related configuration
Data sourceMongoPropertiesmongoMongoDB database related configuration
TurmsRedisPropertiesredisRedis database configuration
Business BehaviorSimultaneousLoginPropertiessimultaneousLoginMulti-login related configuration
SessionPropertiessessionsession related configuration
Common general configuration
classfield namedescription
ClusterPropertiesclusterCluster related configuration. Including configuring current running node information, service discovery registration information, configuration center information, RPC parameters
HealthCheckPropertieshealthCheckMonitor node health status
IpPropertiesipPublic network IP detection related configuration
LocationPropertieslocationUser coordinate related configuration
LoggingPropertiesloggingBasic logging configuration
PluginPropertiespluginPlugin related configuration
SecurityPropertiessecurityUser and administrator password encryption related configuration
UserStatusPropertiesuserStatusUser session (connection) status related configuration
The configuration of the plugin itself

If users want to check the configuration items of the official Turms server plugin, they can read the corresponding plugin documentation, which will list the configuration items provided by the plugin.

server port number configuration

ServerConfiguration ItemPortFunction
turms-admin6510 (HTTP)Provides the web page of the background administrator system
turms-service/turms-gatewayturms.cluster.connection.server.port7510 (TCP)Used for RPC of turms-service and turms-gateway servers
turms-serviceturms.service.admin-api.http.port8510 (HTTP)Provide admin API and metrics API
turms-gatewayturms.gateway.admin-api.http.port9510 (HTTP)Provide metrics API
turms-gatewayturms.gateway.websocket.port10510 (WebSocket)Interact with the turms-client-js client
turms-gatewayturms.gateway.tcp.port11510 (TCP)Interact with clients
turms-gatewayturms.gateway.udp.port12510 (UDP)Interact with clients (clients are not supported yet).
Note: UDP server is an experimental function, not in the first release plan

configuration items

Note: The table below does not include the configuration of the Turms server plugin.

Configuration ItemsGlobal AttributesVariable AttributesData TypeDefault ValueDescription
turms.ai-serving.admin-api.address.advertise-hoststringThe advertise address of the local node exposed to admins. (e.g. 100.131.251.96)
turms.ai-serving.admin-api.address.advertise-strategyenumPRIVATE_ADDRESSThe advertise strategy is used to decide which type of address should be used so that admins can access admin APIs and metrics APIs
turms.ai-serving.admin-api.address.attach-port-to-hostbooleantrueWhether to attach the local port to the host. e.g. The local host is 100.131.251.96, and the port is 9510 so the service address will be 100.131.251.96:9510
turms.ai-serving.admin-api.enabledbooleantrueWhether to enable the APIs for administrators
turms.ai-serving.admin-api.http.hoststring0.0.0.0
turms.ai-serving.admin-api.http.max-request-body-size-bytesint10485760
turms.ai-serving.admin-api.http.portint5510
turms.ai-serving.admin-api.log.enabledbooleantrueWhether to log API calls
turms.ai-serving.admin-api.log.log-request-paramsbooleantrueWhether to log the parameters of requests
turms.ai-serving.admin-api.rate-limiting.capacityint50The maximum number of tokens that the bucket can hold
turms.ai-serving.admin-api.rate-limiting.initial-tokensint50The initial number of tokens for new session
turms.ai-serving.admin-api.rate-limiting.refill-interval-millisint1000The time interval to refill. 0 means never refill
turms.ai-serving.admin-api.rate-limiting.tokens-per-periodint50Refills the bucket with the specified number of tokens per period if the bucket is not full
turms.ai-serving.admin-api.use-authenticationbooleantrueWhether to use authentication. If false, all HTTP requesters will personate the root user and all HTTP requests will be passed. You may set it to false when you want to manage authentication via security groups, NACL, etc
turms.ai-serving.ocr.orientation-possibility-thresholdfloat0.8
turms.ai-serving.ocr.preferred-fontsList-FontProperties[
{
"familyName": "Noto Sans CJK SC",
"style": "BOLD"
},
{
"familyName": "Noto Sans",
"style": "BOLD"
}
]
turms.cluster.connection.client.keepalive-interval-secondsint5
turms.cluster.connection.client.keepalive-timeout-secondsint15
turms.cluster.connection.client.reconnect-interval-secondsint15
turms.cluster.connection.server.hoststring0.0.0.0
turms.cluster.connection.server.portint7510
turms.cluster.connection.server.port-auto-incrementbooleanfalse
turms.cluster.connection.server.port-countint100
turms.cluster.discovery.address.advertise-hoststringThe advertise address of the local node exposed to admins. (e.g. 100.131.251.96)
turms.cluster.discovery.address.advertise-strategyenumPRIVATE_ADDRESSThe advertise strategy is used to decide which type of address should be used so that admins can access admin APIs and metrics APIs
turms.cluster.discovery.address.attach-port-to-hostbooleantrueWhether to attach the local port to the host. e.g. The local host is 100.131.251.96, and the port is 9510 so the service address will be 100.131.251.96:9510
turms.cluster.discovery.delay-to-notify-members-change-secondsint3Delay notifying listeners on members change. Waits for seconds to avoid thundering herd
turms.cluster.discovery.heartbeat-interval-secondsint10
turms.cluster.discovery.heartbeat-timeout-secondsint30
turms.cluster.idstringturms
turms.cluster.node.active-by-defaultbooleantrue
turms.cluster.node.idstringThe node ID must start with a letter or underscore, and matches zero or more of characters [a-zA-Z0-9_] after the beginning. e.g. "turms001", "turms_002". A node must have a unique ID. If not specified, Turms server will generate a random unique ID
turms.cluster.node.leader-eligiblebooleantrueOnly works when it is a turms-service node
turms.cluster.node.namestringThe node name must start with a letter or underscore, and matches zero or more of characters [a-zA-Z0-9_] after the beginning. e.g. "turms001", "turms_002". The node name can be duplicate in the cluster. If not specified, Turms server will use the node ID as the node name
turms.cluster.node.priorityint0The priority to be a leader
turms.cluster.node.zonestringe.g. "us-east-1" and "ap-east-1"
turms.cluster.rpc.request-timeout-millisint30000The timeout for RPC requests in milliseconds
turms.flight-recorder.closed-recording-retention-periodint0A closed recording will be retained for the given period and will be removed from the file system after the retention period. 0 means no retention. -1 means unlimited retention.
turms.gateway.admin-api.address.advertise-hoststringThe advertise address of the local node exposed to admins. (e.g. 100.131.251.96)
turms.gateway.admin-api.address.advertise-strategyenumPRIVATE_ADDRESSThe advertise strategy is used to decide which type of address should be used so that admins can access admin APIs and metrics APIs
turms.gateway.admin-api.address.attach-port-to-hostbooleantrueWhether to attach the local port to the host. e.g. The local host is 100.131.251.96, and the port is 9510 so the service address will be 100.131.251.96:9510
turms.gateway.admin-api.enabledbooleantrueWhether to enable the APIs for administrators
turms.gateway.admin-api.http.hoststring0.0.0.0
turms.gateway.admin-api.http.max-request-body-size-bytesint10485760
turms.gateway.admin-api.http.portint9510
turms.gateway.admin-api.log.enabledbooleantrueWhether to log API calls
turms.gateway.admin-api.log.log-request-paramsbooleantrueWhether to log the parameters of requests
turms.gateway.admin-api.rate-limiting.capacityint50The maximum number of tokens that the bucket can hold
turms.gateway.admin-api.rate-limiting.initial-tokensint50The initial number of tokens for new session
turms.gateway.admin-api.rate-limiting.refill-interval-millisint1000The time interval to refill. 0 means never refill
turms.gateway.admin-api.rate-limiting.tokens-per-periodint50Refills the bucket with the specified number of tokens per period if the bucket is not full
turms.gateway.admin-api.use-authenticationbooleantrueWhether to use authentication. If false, all HTTP requesters will personate the root user and all HTTP requests will be passed. You may set it to false when you want to manage authentication via security groups, NACL, etc
turms.gateway.client-api.logging.excluded-notification-categoriesSet-enum[]Turms will get the notifications to log from the union of "includedNotificationCategories" and "includedNotifications" except the notifications included in "excludedNotificationCategories" and "excludedNotificationTypes"
turms.gateway.client-api.logging.excluded-notification-typesSet-enum[]Turms will get the notifications to log from the union of "includedNotificationCategories" and "includedNotifications" except the notifications included in "excludedNotificationCategories" and "excludedNotificationTypes"
turms.gateway.client-api.logging.excluded-request-categoriesSet-enum[]Turms will get the requests to log from the union of "includedRequestCategories" and "includedRequests" except the requests included in "excludedRequestCategories" and "excludedRequestTypes"
turms.gateway.client-api.logging.excluded-request-typesSet-enum[]Turms will get the requests to log from the union of "includedRequestCategories" and "includedRequests" except the requests included in "excludedRequestCategories" and "excludedRequestTypes"
turms.gateway.client-api.logging.heartbeat-sample-ratefloat0
turms.gateway.client-api.logging.included-notification-categoriesLinkedHashSet-LoggingCategoryProperties[]Turms will get the notifications to log from the union of "includedNotificationCategories" and "includedNotifications" except the notifications included in "excludedNotificationCategories" and "excludedNotificationTypes"
turms.gateway.client-api.logging.included-notificationsLinkedHashSet-LoggingRequestProperties[]Turms will get the notifications to log from the union of "includedNotificationCategories" and "includedNotifications" except the notifications included in "excludedNotificationCategories" and "excludedNotificationTypes"
turms.gateway.client-api.logging.included-request-categoriesLinkedHashSet-LoggingCategoryProperties[
{
"category": "ALL",
"sampleRate": 1
}
]
Turms will get the requests to log from the union of "includedRequestCategories" and "includedRequests" except the requests included in "excludedRequestCategories" and "excludedRequestTypes"
turms.gateway.client-api.logging.included-requestsLinkedHashSet-LoggingRequestProperties[]Turms will get the requests to log from the union of "includedRequestCategories" and "includedRequests" except the requests included in "excludedRequestCategories" and "excludedRequestTypes"
turms.gateway.client-api.max-request-size-bytesint16384The client session will be closed and may be blocked if it tries to send a request larger than the size. Note: The average size of turms requests is 16~64 bytes
turms.gateway.client-api.rate-limiting.capacityint50The maximum number of tokens that the bucket can hold
turms.gateway.client-api.rate-limiting.initial-tokensint50The initial number of tokens for new session
turms.gateway.client-api.rate-limiting.refill-interval-millisint1000The time interval to refill. 0 means never refill
turms.gateway.client-api.rate-limiting.tokens-per-periodint1Refills the bucket with the specified number of tokens per period if the bucket is not full
turms.gateway.client-api.return-reason-for-server-errorbooleanfalseWhether to return the reason for the server error to the client. Note: 1. It may reveal sensitive data like the IP of internal servers if true; 2. turms-gateway never return the information of stack traces no matter it is true or false.
turms.gateway.fake.enabledbooleanfalseWhether to fake clients. Note that faking only works in non-production environments
turms.gateway.fake.first-user-idlong100
turms.gateway.fake.request-count-per-intervalint10The number of requests to send per interval. If requestIntervalMillis is 1000, requestCountPerInterval is TPS in fact
turms.gateway.fake.request-interval-millisint1000The interval to send request
turms.gateway.fake.user-countint10Run the number of real clients as faked users with an ID from [firstUserId, firstUserId + userCount) to connect to turms-gateway. So please ensure you have set "turms.service.fake.userCount" to a number larger than or equal to (firstUserId + userCount)
turms.gateway.notification-logging.enabledbooleanfalseWhether to parse the buffer of TurmsNotification to log. Note that the property has an impact on performance
turms.gateway.service-discovery.advertise-hoststringThe advertise address of the local node exposed to the public. The property can be used to advertise the DDoS Protected IP address to hide the origin IP address (e.g. 100.131.251.96)
turms.gateway.service-discovery.advertise-strategyenumPRIVATE_ADDRESSThe advertise strategy is used to help clients or load balancing servers to access the local node. Note: For security, do NOT use "PUBLIC_ADDRESS" in production to prevent from exposing the origin IP address for DDoS attack.
turms.gateway.service-discovery.attach-port-to-hostbooleantrueWhether to attach the local port to the host. For example, if the local host is 100.131.251.96, and the port is 10510, so the service address will be 100.131.251.96:10510
turms.gateway.service-discovery.identitystringThe identity of the local node will be sent to clients as a notification if identity is not blank and "turms.gateway.session.notifyClientsOfSessionInfoAfterConnected" is true (e.g. "turms-east-0001")
turms.gateway.session.client-heartbeat-interval-secondsint60The client heartbeat interval. Note that the value will NOT change the actual heartbeat behavior of clients, and the value is only used to facilitate related operations of turms-gateway
turms.gateway.session.close-idle-session-after-secondsint180A session will be closed if turms server does not receive any request (including heartbeat request) from the client during closeIdleSessionAfterSeconds. References: https://mp.weixin.qq.com/s?__biz=MzAwNDY1ODY2OQ==&mid=207243549&idx=1&sn=4ebe4beb8123f1b5ab58810ac8bc5994&scene=0#rd
turms.gateway.session.device-details.expire-after-secondsint2592000Device details information will expire after the specified time has elapsed. 0 means never expire
turms.gateway.session.device-details.itemsList-DeviceDetailsItemProperties[]
turms.gateway.session.identity-access-management.enabledbooleantrueWhether to authenticate and authorize users when logging in. Note that user ID is always required even if enabled is false. If false at startup, turms-gateway will not connect to the MongoDB server for user records
turms.gateway.session.identity-access-management.http.authentication.response-expectation.body-fieldsMap{
"authenticated": true
}
turms.gateway.session.identity-access-management.http.authentication.response-expectation.headersMap{}
turms.gateway.session.identity-access-management.http.authentication.response-expectation.status-codesSet-string[
"2??"
]
turms.gateway.session.identity-access-management.http.request.headersMap{}
turms.gateway.session.identity-access-management.http.request.http-methodenumGET
turms.gateway.session.identity-access-management.http.request.timeout-millisint30000
turms.gateway.session.identity-access-management.http.request.urlstring
turms.gateway.session.identity-access-management.jwt.algorithm.ecdsa256.p12.file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.ecdsa256.p12.key-aliasstring
turms.gateway.session.identity-access-management.jwt.algorithm.ecdsa256.p12.passwordstring
turms.gateway.session.identity-access-management.jwt.algorithm.ecdsa256.pem-file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.ecdsa384.p12.file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.ecdsa384.p12.key-aliasstring
turms.gateway.session.identity-access-management.jwt.algorithm.ecdsa384.p12.passwordstring
turms.gateway.session.identity-access-management.jwt.algorithm.ecdsa384.pem-file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.ecdsa512.p12.file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.ecdsa512.p12.key-aliasstring
turms.gateway.session.identity-access-management.jwt.algorithm.ecdsa512.p12.passwordstring
turms.gateway.session.identity-access-management.jwt.algorithm.ecdsa512.pem-file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.hmac256.file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.hmac256.p12.file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.hmac256.p12.key-aliasstring
turms.gateway.session.identity-access-management.jwt.algorithm.hmac256.p12.passwordstring
turms.gateway.session.identity-access-management.jwt.algorithm.hmac384.file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.hmac384.p12.file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.hmac384.p12.key-aliasstring
turms.gateway.session.identity-access-management.jwt.algorithm.hmac384.p12.passwordstring
turms.gateway.session.identity-access-management.jwt.algorithm.hmac512.file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.hmac512.p12.file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.hmac512.p12.key-aliasstring
turms.gateway.session.identity-access-management.jwt.algorithm.hmac512.p12.passwordstring
turms.gateway.session.identity-access-management.jwt.algorithm.ps256.p12.file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.ps256.p12.key-aliasstring
turms.gateway.session.identity-access-management.jwt.algorithm.ps256.p12.passwordstring
turms.gateway.session.identity-access-management.jwt.algorithm.ps256.pem-file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.ps384.p12.file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.ps384.p12.key-aliasstring
turms.gateway.session.identity-access-management.jwt.algorithm.ps384.p12.passwordstring
turms.gateway.session.identity-access-management.jwt.algorithm.ps384.pem-file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.ps512.p12.file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.ps512.p12.key-aliasstring
turms.gateway.session.identity-access-management.jwt.algorithm.ps512.p12.passwordstring
turms.gateway.session.identity-access-management.jwt.algorithm.ps512.pem-file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.rsa256.p12.file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.rsa256.p12.key-aliasstring
turms.gateway.session.identity-access-management.jwt.algorithm.rsa256.p12.passwordstring
turms.gateway.session.identity-access-management.jwt.algorithm.rsa256.pem-file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.rsa384.p12.file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.rsa384.p12.key-aliasstring
turms.gateway.session.identity-access-management.jwt.algorithm.rsa384.p12.passwordstring
turms.gateway.session.identity-access-management.jwt.algorithm.rsa384.pem-file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.rsa512.p12.file-pathstring
turms.gateway.session.identity-access-management.jwt.algorithm.rsa512.p12.key-aliasstring
turms.gateway.session.identity-access-management.jwt.algorithm.rsa512.p12.passwordstring
turms.gateway.session.identity-access-management.jwt.algorithm.rsa512.pem-file-pathstring
turms.gateway.session.identity-access-management.jwt.authentication.expectation.custom-payload-claimsMap{
"authenticated": true
}
turms.gateway.session.identity-access-management.jwt.verification.audiencestring
turms.gateway.session.identity-access-management.jwt.verification.custom-payload-claimsMap{}
turms.gateway.session.identity-access-management.jwt.verification.issuerstring
turms.gateway.session.identity-access-management.ldap.admin.hoststringlocalhostThe host of LDAP server for admin
turms.gateway.session.identity-access-management.ldap.admin.passwordstringThe administrator's password for binding
turms.gateway.session.identity-access-management.ldap.admin.portint389The port of LDAP server for admin
turms.gateway.session.identity-access-management.ldap.admin.usernamestringThe administrator's username for binding
turms.gateway.session.identity-access-management.ldap.base-dnstringThe base DN from which all operations originate
turms.gateway.session.identity-access-management.ldap.user.hoststringlocalhostThe host of LDAP server for user
turms.gateway.session.identity-access-management.ldap.user.portint389The port of LDAP server for user
turms.gateway.session.identity-access-management.ldap.user.search-filterstringuid=$The search filter to find the user entry. "${userId}" is a placeholder and will be replaced with the user ID passed in the login request
turms.gateway.session.identity-access-management.typeenumPASSWORDNote that if the type is not PASSWORD, turms-gateway will not connect to the MongoDB server for user records
turms.gateway.session.min-heartbeat-interval-secondsint18The minimum interval to refresh the heartbeat status by client requests to avoid refreshing the heartbeat status frequently
turms.gateway.session.notify-clients-of-session-info-after-connectedbooleantrueWhether to notify clients of the session information after connected with the server
turms.gateway.session.switch-protocol-after-secondsint540If the turms server only receives heartbeat requests from the client during switchProtocolAfterSeconds, the TCP/WebSocket connection will be closed with the close status "SWITCH" to indicate the client should keep sending heartbeat requests over UDP if they want to keep online. Note: 1. The property only works if UDP is enabled; 2. For browser clients, UDP is not supported
turms.gateway.simultaneous-login.allow-device-type-others-loginbooleantrueWhether to allow the devices of DeviceType.OTHERS to login
turms.gateway.simultaneous-login.allow-device-type-unknown-loginbooleantrueWhether to allow the devices of DeviceType.UNKNOWN to login
turms.gateway.simultaneous-login.login-conflict-strategyenumDISCONNECT_LOGGED_IN_DEVICESThe login conflict strategy is used for servers to know how to behave if a device is logging in when there are conflicted and logged-in devices
turms.gateway.simultaneous-login.strategyenumALLOW_ONE_DEVICE_OF_EACH_DEVICE_TYPE_ONLINEThe simultaneous login strategy is used to control which devices can be online at the same time
turms.gateway.tcp.backlogint4096The maximum number of connection requests waiting in the backlog queue. Large enough to handle bursts and GC pauses but do not set too large to prevent SYN-Flood attacks
turms.gateway.tcp.connect-timeout-millisint30000Used to mitigate the Slowloris DoS attack by lowering the timeout for the TCP connection handshake
turms.gateway.tcp.enabledbooleantrue
turms.gateway.tcp.hoststring0.0.0.0
turms.gateway.tcp.portint-1
turms.gateway.tcp.remote-address-source.proxy-protocol-modeenumOPTIONAL
turms.gateway.tcp.session.close-timeout-millisint120000turms-gateway will send a TCP RST packet to the connection if the client has not closed the TCP connection within the specified time after turms-gateway has sent and flushed the session close notification. 0 means sending a TCP RST packet immediately after flushing the session close notification, and you should use 0 if you prefer fast connection close, but the client may never receive the last data sent by turms-gateway. -1 means no timeout and waiting for the client to close the connection forever. Positive value should be used when you prefer that turms-gateway waits for the client to receive within the specified time data and only close the connection when it exceeds the timeout
turms.gateway.tcp.session.establish-timeout-millisint300000turms-gateway will close the TCP connection if the client has not established a user session within the specified time. 0 means no timeout
turms.gateway.tcp.wiretapbooleanfalse
turms.gateway.udp.enabledbooleantrue
turms.gateway.udp.hoststring0.0.0.0
turms.gateway.udp.portint-1
turms.gateway.websocket.backlogint4096The maximum number of connection requests waiting in the backlog queue. Large enough to handle bursts and GC pauses but do not set too large to prevent SYN-Flood attacks
turms.gateway.websocket.connect-timeout-millisint30000Used to mitigate the Slowloris DoS attack by lowering the timeout for the TCP connection handshake
turms.gateway.websocket.enabledbooleantrue
turms.gateway.websocket.hoststring0.0.0.0
turms.gateway.websocket.portint-1
turms.gateway.websocket.remote-address-source.http-header-modeenumOPTIONAL
turms.gateway.websocket.remote-address-source.proxy-protocol-modeenumOPTIONAL
turms.gateway.websocket.session.close-timeout-millisint120000turms-gateway will send and flush a WebSocket close frame, and then send a TCP RST packet to the connection if the client has not closed the WebSocket connection within the specified time after turms-gateway has sent and flushed the session close notification. 0 means sending and flushing a WebSocket close frame, and then sending a TCP RST packet immediately after flushing the session close notification, and you should use 0 if you prefer fast connection close, but the client may never receive the last data sent by turms-gateway. -1 means no timeout and waiting for the client to close the connection forever. Positive value should be used when you prefer that turms-gateway waits for the client to receive within the specified time data and only close the connection when it exceeds the timeout
turms.gateway.websocket.session.establish-timeout-millisint300000turms-gateway will close the WebSocket connection if the client has not established a user session within the specified time. 0 means no timeout
turms.health-check.check-interval-secondsint3
turms.health-check.cpu.retriesint5
turms.health-check.cpu.unhealthy-load-threshold-percentageint95
turms.health-check.memory.direct-memory-warning-threshold-percentageint50Log warning messages if the used direct memory exceeds the max direct memory of the percentage
turms.health-check.memory.heap-memory-gc-threshold-percentageint60If the used memory has used the reserved memory specified by maxAvailableMemoryPercentage and minFreeSystemMemoryBytes, try to start GC when the used heap memory exceeds the max heap memory of the percentage
turms.health-check.memory.heap-memory-warning-threshold-percentageint95Log warning messages if the used heap memory exceeds the max heap memory of the percentage
turms.health-check.memory.max-available-direct-memory-percentageint95The server will refuse to serve when the used direct memory exceeds the max direct memory of the percentage to try to avoid OutOfMemoryError
turms.health-check.memory.max-available-memory-percentageint95The server will refuse to serve when the used memory (heap memory + JVM internal non-heap memory + direct buffer pool) exceeds the physical memory of the percentage. The server will try to reserve max(maxAvailableMemoryPercentage of the physical memory, minFreeSystemMemoryBytes) for kernel and other processes. Note that the max available memory percentage does not conflict with the usage of limiting memory in docker because docker limits the memory of the container, while this memory percentage only limits the available memory for JVM
turms.health-check.memory.min-free-system-memory-bytesint134217728The server will refuse to serve when the free system memory is less than minFreeSystemMemoryBytes
turms.health-check.memory.min-heap-memory-gc-interval-secondsint10
turms.health-check.memory.min-memory-warning-interval-secondsint10
turms.ip.cached-private-ip-expire-after-millisint60000The cached private IP will expire after the specified time has elapsed. 0 means no cache
turms.ip.cached-public-ip-expire-after-millisint60000The cached public IP will expire after the specified time has elapsed. 0 means no cache
turms.ip.public-ip-detector-addressesList-string[
"https://checkip.amazonaws.com",
"https://whatismyip.akamai.com",
"https://ifconfig.me/ip",
"https://myip.dnsomatic.com"
]
The public IP detectors will only be used to query the public IP of the local node if needed (e.g. If the node discovery property "advertiseStrategy" is "PUBLIC_ADDRESS". Note that the HTTP response body must be a string of IP instead of a JSON
turms.location.enabledbooleantrueWhether to handle users' locations
turms.location.nearby-user-request.default-max-distance-metersint10000The default maximum allowed distance in meters
turms.location.nearby-user-request.default-max-nearby-user-countshort20The default maximum allowed number of nearby users
turms.location.nearby-user-request.max-distance-metersint10000The maximum allowed distance in meters
turms.location.nearby-user-request.max-nearby-user-countshort100The maximum allowed number of nearby users
turms.location.treat-user-id-and-device-type-as-unique-userbooleanfalseWhether to treat the pair of user ID and device type as a unique user when querying users nearby. If false, only the user ID is used to identify a unique user
turms.logging.console.enabledbooleanfalse
turms.logging.console.levelenumINFO
turms.logging.file.compression.enabledbooleantrue
turms.logging.file.enabledbooleantrue
turms.logging.file.file-pathstring@HOME/log/.log
turms.logging.file.levelenumINFO
turms.logging.file.max-file-size-mbint32
turms.logging.file.max-filesint320
turms.plugin.dirstringpluginsThe relative path of plugins
turms.plugin.enabledbooleantrueWhether to enable plugins
turms.plugin.java.allow-savebooleanfalseWhether to allow to save plugins using HTTP API
turms.plugin.js.allow-savebooleanfalseWhether to allow to save plugins using HTTP API
turms.plugin.js.debug.enabledbooleanfalseWhether to enable debugging
turms.plugin.js.debug.inspect-hoststringlocalhostThe inspect host
turms.plugin.js.debug.inspect-portint24242The inspect port
turms.plugin.network.pluginsList-NetworkPluginProperties[]
turms.plugin.network.proxy.connect-timeout-millisint60000The HTTP proxy connect timeout in millis
turms.plugin.network.proxy.enabledbooleanfalseWhether to enable HTTP proxy
turms.plugin.network.proxy.hoststringThe HTTP proxy host
turms.plugin.network.proxy.passwordstringThe HTTP proxy password
turms.plugin.network.proxy.portint8080The HTTP proxy port
turms.plugin.network.proxy.usernamestringThe HTTP proxy username
turms.security.blocklist.ip.auto-block.corrupted-frame.block-levelsList-BlockLevel[
{
"blockDurationSeconds": 600,
"goNextLevelTriggerTimes": 1,
"reduceOneTriggerTimeIntervalMillis": 60000
},
{
"blockDurationSeconds": 1800,
"goNextLevelTriggerTimes": 1,
"reduceOneTriggerTimeIntervalMillis": 60000
},
{
"blockDurationSeconds": 3600,
"goNextLevelTriggerTimes": 0,
"reduceOneTriggerTimeIntervalMillis": 60000
}
]
turms.security.blocklist.ip.auto-block.corrupted-frame.block-trigger-timesint5Block the client when the block condition is triggered the times
turms.security.blocklist.ip.auto-block.corrupted-frame.enabledbooleanfalse
turms.security.blocklist.ip.auto-block.corrupted-request.block-levelsList-BlockLevel[
{
"blockDurationSeconds": 600,
"goNextLevelTriggerTimes": 1,
"reduceOneTriggerTimeIntervalMillis": 60000
},
{
"blockDurationSeconds": 1800,
"goNextLevelTriggerTimes": 1,
"reduceOneTriggerTimeIntervalMillis": 60000
},
{
"blockDurationSeconds": 3600,
"goNextLevelTriggerTimes": 0,
"reduceOneTriggerTimeIntervalMillis": 60000
}
]
turms.security.blocklist.ip.auto-block.corrupted-request.block-trigger-timesint5Block the client when the block condition is triggered the times
turms.security.blocklist.ip.auto-block.corrupted-request.enabledbooleanfalse
turms.security.blocklist.ip.auto-block.frequent-request.block-levelsList-BlockLevel[
{
"blockDurationSeconds": 600,
"goNextLevelTriggerTimes": 1,
"reduceOneTriggerTimeIntervalMillis": 60000
},
{
"blockDurationSeconds": 1800,
"goNextLevelTriggerTimes": 1,
"reduceOneTriggerTimeIntervalMillis": 60000
},
{
"blockDurationSeconds": 3600,
"goNextLevelTriggerTimes": 0,
"reduceOneTriggerTimeIntervalMillis": 60000
}
]
turms.security.blocklist.ip.auto-block.frequent-request.block-trigger-timesint5Block the client when the block condition is triggered the times
turms.security.blocklist.ip.auto-block.frequent-request.enabledbooleanfalse
turms.security.blocklist.ip.enabledbooleantrue
turms.security.blocklist.ip.sync-blocklist-interval-millisint10000
turms.security.blocklist.user-id.auto-block.corrupted-frame.block-levelsList-BlockLevel[
{
"blockDurationSeconds": 600,
"goNextLevelTriggerTimes": 1,
"reduceOneTriggerTimeIntervalMillis": 60000
},
{
"blockDurationSeconds": 1800,
"goNextLevelTriggerTimes": 1,
"reduceOneTriggerTimeIntervalMillis": 60000
},
{
"blockDurationSeconds": 3600,
"goNextLevelTriggerTimes": 0,
"reduceOneTriggerTimeIntervalMillis": 60000
}
]
turms.security.blocklist.user-id.auto-block.corrupted-frame.block-trigger-timesint5Block the client when the block condition is triggered the times
turms.security.blocklist.user-id.auto-block.corrupted-frame.enabledbooleanfalse
turms.security.blocklist.user-id.auto-block.corrupted-request.block-levelsList-BlockLevel[
{
"blockDurationSeconds": 600,
"goNextLevelTriggerTimes": 1,
"reduceOneTriggerTimeIntervalMillis": 60000
},
{
"blockDurationSeconds": 1800,
"goNextLevelTriggerTimes": 1,
"reduceOneTriggerTimeIntervalMillis": 60000
},
{
"blockDurationSeconds": 3600,
"goNextLevelTriggerTimes": 0,
"reduceOneTriggerTimeIntervalMillis": 60000
}
]
turms.security.blocklist.user-id.auto-block.corrupted-request.block-trigger-timesint5Block the client when the block condition is triggered the times
turms.security.blocklist.user-id.auto-block.corrupted-request.enabledbooleanfalse
turms.security.blocklist.user-id.auto-block.frequent-request.block-levelsList-BlockLevel[
{
"blockDurationSeconds": 600,
"goNextLevelTriggerTimes": 1,
"reduceOneTriggerTimeIntervalMillis": 60000
},
{
"blockDurationSeconds": 1800,
"goNextLevelTriggerTimes": 1,
"reduceOneTriggerTimeIntervalMillis": 60000
},
{
"blockDurationSeconds": 3600,
"goNextLevelTriggerTimes": 0,
"reduceOneTriggerTimeIntervalMillis": 60000
}
]
turms.security.blocklist.user-id.auto-block.frequent-request.block-trigger-timesint5Block the client when the block condition is triggered the times
turms.security.blocklist.user-id.auto-block.frequent-request.enabledbooleanfalse
turms.security.blocklist.user-id.enabledbooleantrue
turms.security.blocklist.user-id.sync-blocklist-interval-millisint10000
turms.security.password.admin-password-encoding-algorithmenumBCRYPTThe password encoding algorithm for admins
turms.security.password.initial-root-passwordstringThe initial password of the root user
turms.security.password.user-password-encoding-algorithmenumSALTED_SHA256The password encoding algorithm for users
turms.service.admin-api.address.advertise-hoststringThe advertise address of the local node exposed to admins. (e.g. 100.131.251.96)
turms.service.admin-api.address.advertise-strategyenumPRIVATE_ADDRESSThe advertise strategy is used to decide which type of address should be used so that admins can access admin APIs and metrics APIs
turms.service.admin-api.address.attach-port-to-hostbooleantrueWhether to attach the local port to the host. e.g. The local host is 100.131.251.96, and the port is 9510 so the service address will be 100.131.251.96:9510
turms.service.admin-api.allow-delete-without-filterbooleanfalseWhether to allow administrators to delete data without any filter. Better false to prevent administrators from deleting all data by accident
turms.service.admin-api.default-available-records-per-requestint10The default available records per query request
turms.service.admin-api.enabledbooleantrueWhether to enable the APIs for administrators
turms.service.admin-api.http.hoststring0.0.0.0
turms.service.admin-api.http.max-request-body-size-bytesint10485760
turms.service.admin-api.http.portint8510
turms.service.admin-api.log.enabledbooleantrueWhether to log API calls
turms.service.admin-api.log.log-request-paramsbooleantrueWhether to log the parameters of requests
turms.service.admin-api.max-available-online-users-status-per-requestint20The maximum available online users' status per query request
turms.service.admin-api.max-available-records-per-requestint1000The maximum available records per query request
turms.service.admin-api.max-day-difference-per-count-requestint31The maximum day difference per count request
turms.service.admin-api.max-day-difference-per-requestint90The maximum day difference per query request
turms.service.admin-api.max-hour-difference-per-count-requestint24The maximum hour difference per count request
turms.service.admin-api.max-month-difference-per-count-requestint12The maximum month difference per count request
turms.service.admin-api.rate-limiting.capacityint50The maximum number of tokens that the bucket can hold
turms.service.admin-api.rate-limiting.initial-tokensint50The initial number of tokens for new session
turms.service.admin-api.rate-limiting.refill-interval-millisint1000The time interval to refill. 0 means never refill
turms.service.admin-api.rate-limiting.tokens-per-periodint50Refills the bucket with the specified number of tokens per period if the bucket is not full
turms.service.admin-api.use-authenticationbooleantrueWhether to use authentication. If false, all HTTP requesters will personate the root user and all HTTP requests will be passed. You may set it to false when you want to manage authentication via security groups, NACL, etc
turms.service.client-api.disabled-endpointsSet-enum[]The disabled endpoints for client requests. Return ILLEGAL_ARGUMENT if a client tries to access them
turms.service.client-api.logging.excluded-notification-categoriesSet-enum[]Turms will get the notifications to log from the union of "includedNotificationCategories" and "includedNotifications" except the notifications included in "excludedNotificationCategories" and "excludedNotificationTypes"
turms.service.client-api.logging.excluded-notification-typesSet-enum[]Turms will get the notifications to log from the union of "includedNotificationCategories" and "includedNotifications" except the notifications included in "excludedNotificationCategories" and "excludedNotificationTypes"
turms.service.client-api.logging.excluded-request-categoriesSet-enum[]Turms will get the requests to log from the union of "includedRequestCategories" and "includedRequests" except the requests included in "excludedRequestCategories" and "excludedRequestTypes"
turms.service.client-api.logging.excluded-request-typesSet-enum[]Turms will get the requests to log from the union of "includedRequestCategories" and "includedRequests" except the requests included in "excludedRequestCategories" and "excludedRequestTypes"
turms.service.client-api.logging.included-notification-categoriesLinkedHashSet-LoggingCategoryProperties[]Turms will get the notifications to log from the union of "includedNotificationCategories" and "includedNotifications" except the notifications included in "excludedNotificationCategories" and "excludedNotificationTypes"
turms.service.client-api.logging.included-notificationsLinkedHashSet-LoggingRequestProperties[]Turms will get the notifications to log from the union of "includedNotificationCategories" and "includedNotifications" except the notifications included in "excludedNotificationCategories" and "excludedNotificationTypes"
turms.service.client-api.logging.included-request-categoriesLinkedHashSet-LoggingCategoryProperties[
{
"category": "ALL",
"sampleRate": 1
}
]
Turms will get the requests to log from the union of "includedRequestCategories" and "includedRequests" except the requests included in "excludedRequestCategories" and "excludedRequestTypes"
turms.service.client-api.logging.included-requestsLinkedHashSet-LoggingRequestProperties[]Turms will get the requests to log from the union of "includedRequestCategories" and "includedRequests" except the requests included in "excludedRequestCategories" and "excludedRequestTypes"
turms.service.conversation.read-receipt.allow-move-read-date-forwardbooleanfalseWhether to allow to move the last read date forward
turms.service.conversation.read-receipt.enabledbooleantrueWhether to allow to update the last read date
turms.service.conversation.read-receipt.update-read-date-after-message-sentbooleantrueWhether to update the read date after a user sent a message
turms.service.conversation.read-receipt.update-read-date-when-user-querying-messagebooleanfalseWhether to update the read date when a user queries messages
turms.service.conversation.read-receipt.use-server-timebooleantrueWhether to use the server time to set the last read date when updating
turms.service.conversation.typing-status.enabledbooleantrueWhether to notify users of typing statuses sent by other users
turms.service.fake.clear-all-collections-before-fakingbooleanfalseWhether to clear all collections before faking at startup
turms.service.fake.enabledbooleanfalseWhether to fake data. Note that faking only works in non-production environments
turms.service.fake.fake-if-collection-existsbooleanfalseWhether to fake data even if the collection has already existed
turms.service.fake.user-countint1000the total number of users to fake
turms.service.group.activate-group-when-createdbooleantrueWhether to activate a group when created by default
turms.service.group.delete-group-logically-by-defaultbooleantrueWhether to delete groups logically by default
turms.service.group.invitation.allow-recall-pending-invitation-by-owner-and-managerbooleanfalseWhether to allow the owner and managers of a group to recall pending group invitations
turms.service.group.invitation.delete-expired-invitations-when-cron-triggeredbooleanfalseWhether to delete expired group invitations when the cron expression is triggered
turms.service.group.invitation.expire-after-secondsint2592000A group invitation will become expired after the specified time has passed
turms.service.group.invitation.expired-invitations-cleanup-cronstring0 15 2 * * *Clean the expired group invitations when the cron expression is triggered if "deleteExpiredInvitationsWhenCronTriggered" is true
turms.service.group.invitation.max-content-lengthint200The maximum allowed length for the text of a group invitation
turms.service.group.join-request.allow-recall-join-request-sent-by-oneselfbooleanfalseWhether to allow users to recall the join requests sent by themselves
turms.service.group.join-request.delete-expired-join-requests-when-cron-triggeredbooleanfalseWhether to delete expired group join requests when the cron expression is triggered
turms.service.group.join-request.expire-after-secondsint2592000A group join request will become expired after the specified time has elapsed
turms.service.group.join-request.expired-join-requests-cleanup-cronstring0 30 2 * * *Clean the expired group join requests when the cron expression is triggered if "deleteExpiredJoinRequestsWhenCronTriggered" is true
turms.service.group.join-request.max-content-lengthint200The maximum allowed length for the text of a group join request
turms.service.group.member-cache-expire-after-secondsint15The group member cache will expire after the specified seconds. If 0, no group member cache
turms.service.group.question.answer-content-limitint50The maximum allowed length for the text of a group question's answer
turms.service.group.question.max-answer-countint10The maximum number of answers for a group question
turms.service.group.question.question-content-limitint200The maximum allowed length for the text of a group question
turms.service.message.allow-edit-message-by-senderbooleantrueWhether to allow the sender of a message to edit the message
turms.service.message.allow-recall-messagebooleantrueWhether to allow users to recall messages. Note: To recall messages, more system resources are needed
turms.service.message.allow-send-messages-to-oneselfbooleanfalseWhether to allow users to send messages to themselves
turms.service.message.allow-send-messages-to-strangerbooleantrueWhether to allow users to send messages to a stranger
turms.service.message.available-recall-duration-secondsint300The available recall duration for the sender of a message
turms.service.message.cache.sent-message-cache-max-sizeint10240The maximum size of the cache of sent messages.
turms.service.message.cache.sent-message-expire-afterint30The retention period of sent messages in the cache. For a better performance, it is a good practice to keep the value greater than the allowed recall duration
turms.service.message.check-if-target-active-and-not-deletedbooleantrueWhether to check if the target (recipient or group) of a message is active and not deleted
turms.service.message.default-available-messages-number-with-totalint1The default available messages number with the "total" field that users request
turms.service.message.delete-message-logically-by-defaultbooleantrueWhether to delete messages logically by default
turms.service.message.expired-messages-cleanup-cronstring0 45 2 * * *Clean the expired messages when the cron expression is triggered
turms.service.message.is-recalled-message-visiblebooleanfalseWhether to respond with recalled messages to clients' message query requests
turms.service.message.max-records-size-bytesint15728640The maximum allowed size for the records of a message
turms.service.message.max-text-limitint500The maximum allowed length for the text of a message
turms.service.message.message-retention-period-hoursint0A message will be retained for the given period and will be removed from the database after the retention period
turms.service.message.persist-messagebooleantrueWhether to persist messages in databases. Note: If false, senders will not get the message ID after the message has sent and cannot edit it
turms.service.message.persist-pre-message-idbooleanfalseWhether to persist the previous message ID of messages in databases
turms.service.message.persist-recordbooleanfalseWhether to persist the records of messages in databases
turms.service.message.persist-sender-ipbooleanfalseWhether to persist the sender IP of messages in databases
turms.service.message.sequence-id.use-sequence-id-for-group-conversationbooleanfalseWhether to use the sequence ID for group conversations so that the client can be aware of the loss of messages. Note that the property has a significant impact on performance
turms.service.message.sequence-id.use-sequence-id-for-private-conversationbooleanfalseWhether to use the sequence ID for private conversations so that the client can be aware of the loss of messages. Note that the property has a significant impact on performance
turms.service.message.time-typeenumLOCAL_SERVER_TIMEThe time type for the delivery time of message
turms.service.message.use-conversation-idbooleanfalseWhether to use conversation ID so that a user can query the messages sent by themselves in a conversation quickly
turms.service.mongo.admin.optional-index.admin.registration-datebooleanfalse
turms.service.mongo.admin.optional-index.admin.role-idbooleanfalse
turms.service.mongo.group.optional-index.group-blocked-user.block-datebooleanfalse
turms.service.mongo.group.optional-index.group-blocked-user.requester-idbooleanfalse
turms.service.mongo.group.optional-index.group-invitation.group-idbooleantrue
turms.service.mongo.group.optional-index.group-invitation.inviter-idbooleanfalse
turms.service.mongo.group.optional-index.group-invitation.response-datebooleanfalse
turms.service.mongo.group.optional-index.group-join-request.creation-datebooleanfalse
turms.service.mongo.group.optional-index.group-join-request.group-idbooleantrue
turms.service.mongo.group.optional-index.group-join-request.responder-idbooleanfalse
turms.service.mongo.group.optional-index.group-join-request.response-datebooleanfalse
turms.service.mongo.group.optional-index.group-member.join-datebooleanfalse
turms.service.mongo.group.optional-index.group-member.mute-end-datebooleanfalse
turms.service.mongo.group.optional-index.group.creation-datebooleanfalse
turms.service.mongo.group.optional-index.group.creator-idbooleanfalse
turms.service.mongo.group.optional-index.group.deletion-datebooleantrue
turms.service.mongo.group.optional-index.group.mute-end-datebooleanfalse
turms.service.mongo.group.optional-index.group.owner-idbooleantrue
turms.service.mongo.group.optional-index.group.type-idbooleanfalse
turms.service.mongo.message.optional-index.message.deletion-datebooleantrue
turms.service.mongo.message.optional-index.message.reference-idbooleanfalse
turms.service.mongo.message.optional-index.message.sender-idbooleanfalse
turms.service.mongo.message.optional-index.message.sender-ipbooleantrue
turms.service.mongo.message.tiered-storage.auto-range-updater.cronstring0 0 3 * * *
turms.service.mongo.message.tiered-storage.auto-range-updater.enabledbooleantrue
turms.service.mongo.message.tiered-storage.enabledbooleantrue
turms.service.mongo.message.tiered-storage.tiersLinkedHashMap{
"cold": {
"days": 270,
"enabled": true,
"shards": [
""
]
},
"frozen": {
"days": 0,
"enabled": true,
"shards": [
""
]
},
"hot": {
"days": 30,
"enabled": true,
"shards": [
""
]
},
"warm": {
"days": 60,
"enabled": true,
"shards": [
""
]
}
}
The storage properties for tiers from hot to cold. Note that the order of the tiers is important
turms.service.mongo.user.optional-index.user-friend-request.recipient-idbooleanfalse
turms.service.mongo.user.optional-index.user-friend-request.requester-idbooleanfalse
turms.service.mongo.user.optional-index.user-friend-request.response-datebooleanfalse
turms.service.mongo.user.optional-index.user-relationship-group-member.group-indexbooleanfalse
turms.service.mongo.user.optional-index.user-relationship-group-member.join-datebooleanfalse
turms.service.mongo.user.optional-index.user-relationship-group-member.related-user-idbooleanfalse
turms.service.mongo.user.optional-index.user-relationship.establishment-datebooleanfalse
turms.service.notification.friend-request-created.notify-friend-request-recipientbooleantrueWhether to notify the recipient when the requester has created a friend request
turms.service.notification.friend-request-created.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have created a friend request
turms.service.notification.friend-request-replied.notify-friend-request-requesterbooleantrueWhether to notify the requester when a recipient has replied to the friend request sent by the requester
turms.service.notification.friend-request-replied.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have replied to a friend request
turms.service.notification.group-blocked-user-added.notify-blocked-userbooleanfalseWhether to notify the user when they have been blocked by a group
turms.service.notification.group-blocked-user-added.notify-group-membersbooleanfalseWhether to notify group members when a user has been blocked by a group
turms.service.notification.group-blocked-user-added.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have added a blocked user to a group
turms.service.notification.group-blocked-user-removed.notify-group-membersbooleanfalseWhether to notify group members when a user is unblocked by a group
turms.service.notification.group-blocked-user-removed.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have removed a blocked user from a group
turms.service.notification.group-blocked-user-removed.notify-unblocked-userbooleanfalseWhether to notify the user when they are unblocked by a group
turms.service.notification.group-conversation-read-date-updated.notify-other-group-membersbooleanfalseWhether to notify other group members when a group member has updated their read date in a group conversation
turms.service.notification.group-conversation-read-date-updated.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have updated the read date in a group conversation
turms.service.notification.group-created.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have created a group
turms.service.notification.group-deleted.notify-group-membersbooleantrueWhether to notify group members when a group owner has updated their group
turms.service.notification.group-deleted.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have deleted a group
turms.service.notification.group-invitation-added.notify-group-membersbooleanfalseWhether to notify group members when a user has been invited
turms.service.notification.group-invitation-added.notify-group-owner-and-managersbooleantrueWhether to notify the group owner and managers when a user has been invited
turms.service.notification.group-invitation-added.notify-inviteebooleantrueWhether to notify the user when they have been invited by a group member
turms.service.notification.group-invitation-added.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have invited a user to a group
turms.service.notification.group-invitation-recalled.notify-group-membersbooleanfalseWhether to notify group members when an invitation has been recalled
turms.service.notification.group-invitation-recalled.notify-group-owner-and-managersbooleantrueWhether to notify the group owner and managers when an invitation has been recalled
turms.service.notification.group-invitation-recalled.notify-inviteebooleantrueWhether to notify the invitee when a group member has recalled their received group invitation
turms.service.notification.group-invitation-recalled.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have recalled a group invitation
turms.service.notification.group-join-request-created.notify-group-membersbooleanfalseWhether to notify group members when a user has created a group join request for their group
turms.service.notification.group-join-request-created.notify-group-owner-and-managersbooleantrueWhether to notify the group owner and managers when a user has created a group join request for their group
turms.service.notification.group-join-request-created.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have created a group join request
turms.service.notification.group-join-request-recalled.notify-group-membersbooleanfalseWhether to notify group members when a user has recalled a group join request for their group
turms.service.notification.group-join-request-recalled.notify-group-owner-and-managersbooleantrueWhether to notify the group owner and managers when a user has recalled a group join request for their group
turms.service.notification.group-join-request-recalled.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have recalled a group join request
turms.service.notification.group-member-added.notify-added-group-memberbooleantrueWhether to notify the group member when added by others
turms.service.notification.group-member-added.notify-other-group-membersbooleantrueWhether to notify other group members when a group member has been added
turms.service.notification.group-member-added.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have added a group member
turms.service.notification.group-member-info-updated.notify-other-group-membersbooleanfalseWhether to notify other group members when a group member's information has been updated
turms.service.notification.group-member-info-updated.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have updated their group member information
turms.service.notification.group-member-info-updated.notify-updated-group-memberbooleanfalseWhether to notify the group member when others have updated their group member information
turms.service.notification.group-member-online-status-updated.notify-group-membersbooleanfalseWhether to notify other group members when a member's online status has been updated
turms.service.notification.group-member-removed.notify-other-group-membersbooleantrueWhether to notify other group members when a group member has been removed
turms.service.notification.group-member-removed.notify-removed-group-memberbooleantrueWhether to notify the group member when removed by others
turms.service.notification.group-member-removed.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they removed a group member
turms.service.notification.group-updated.notify-group-membersbooleantrueWhether to notify group members when the group owner or managers have updated their group
turms.service.notification.group-updated.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have updated a group
turms.service.notification.message-created.notify-message-recipientsbooleantrueWhether to notify the message recipients when a sender has created a message to them
turms.service.notification.message-created.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have created a message
turms.service.notification.message-updated.notify-message-recipientsbooleantrueWhether to notify the message recipients when a sender has updated a message sent to them
turms.service.notification.message-updated.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have updated a message
turms.service.notification.one-sided-relationship-group-deleted.notify-relationship-group-membersbooleanfalseWhether to notify members when a one-side relationship group owner has deleted the group
turms.service.notification.one-sided-relationship-group-deleted.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have deleted a relationship group
turms.service.notification.one-sided-relationship-group-member-added.notify-new-relationship-group-memberbooleanfalseWhether to notify the new member when a user has added them to their one-sided relationship group
turms.service.notification.one-sided-relationship-group-member-added.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have added a new member to their one-sided relationship group
turms.service.notification.one-sided-relationship-group-member-removed.notify-removed-relationship-group-memberbooleanfalseWhether to notify the removed member when a user has removed them from their one-sided relationship group
turms.service.notification.one-sided-relationship-group-member-removed.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have removed a new member from their one-sided relationship group
turms.service.notification.one-sided-relationship-group-updated.notify-relationship-group-membersbooleanfalseWhether to notify members when a one-side relationship group owner has updated the group
turms.service.notification.one-sided-relationship-group-updated.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have updated a relationship group
turms.service.notification.one-sided-relationship-updated.notify-related-userbooleanfalseWhether to notify the related user when a user has updated a one-sided relationship with them
turms.service.notification.one-sided-relationship-updated.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have updated a one-sided relationship
turms.service.notification.private-conversation-read-date-updated.notify-contactbooleanfalseWhether to notify another contact when a contact has updated their read date in a private conversation
turms.service.notification.private-conversation-read-date-updated.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have updated the read date in a private conversation
turms.service.notification.user-info-updated.notify-non-blocked-related-usersbooleanfalseWhether to notify non-blocked related users when a user has updated their information
turms.service.notification.user-info-updated.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have updated their information
turms.service.notification.user-online-status-updated.notify-non-blocked-related-usersbooleanfalseWhether to notify non-blocked related users when a user has updated their online status
turms.service.notification.user-online-status-updated.notify-requester-other-online-sessionsbooleantrueWhether to notify the requester's other online sessions when they have updated their online status
turms.service.push-notification.apns.bundle-idstring
turms.service.push-notification.apns.enabledbooleanfalse
turms.service.push-notification.apns.key-idstring
turms.service.push-notification.apns.sandbox-enabledbooleanfalse
turms.service.push-notification.apns.signing-keystring
turms.service.push-notification.apns.team-idstring
turms.service.push-notification.fcm.credentialsstring
turms.service.push-notification.fcm.enabledbooleanfalse
turms.service.statistics.log-online-users-numberbooleantrueWhether to log online users number
turms.service.statistics.online-users-number-logging-cronstring0/15 * * * * *The cron expression to specify the time to log online users' number
turms.service.storage.group-profile-picture.allowed-content-typestringimage/*The allowed "Content-Type" of the resource that the client can upload
turms.service.storage.group-profile-picture.allowed-referrersList-string[]Restrict access to the resource to only allow the specific referrers (e.g. "https://github.com/turms-im/turms/*")
turms.service.storage.group-profile-picture.download-url-expire-after-secondsint300The presigned URLs are valid only for the specified duration. 0 means no expiration
turms.service.storage.group-profile-picture.expire-after-daysint0Delete the resource the specific days after creation. 0 means no expiration
turms.service.storage.group-profile-picture.max-size-bytesint1048576The maximum size of the resource that the client can upload. 0 means no limit
turms.service.storage.group-profile-picture.min-size-bytesint0The minimum size of the resource that the client can upload. 0 means no limit
turms.service.storage.group-profile-picture.upload-url-expire-after-secondsint300The presigned URLs are valid only for the specified duration. 0 means no expiration
turms.service.storage.message-attachment.allowed-content-typestring/The allowed "Content-Type" of the resource that the client can upload
turms.service.storage.message-attachment.allowed-referrersList-string[]Restrict access to the resource to only allow the specific referrers (e.g. "https://github.com/turms-im/turms/*")
turms.service.storage.message-attachment.download-url-expire-after-secondsint300The presigned URLs are valid only for the specified duration. 0 means no expiration
turms.service.storage.message-attachment.expire-after-daysint0Delete the resource the specific days after creation. 0 means no expiration
turms.service.storage.message-attachment.max-size-bytesint1048576The maximum size of the resource that the client can upload. 0 means no limit
turms.service.storage.message-attachment.min-size-bytesint0The minimum size of the resource that the client can upload. 0 means no limit
turms.service.storage.message-attachment.upload-url-expire-after-secondsint300The presigned URLs are valid only for the specified duration. 0 means no expiration
turms.service.storage.user-profile-picture.allowed-content-typestringimage/*The allowed "Content-Type" of the resource that the client can upload
turms.service.storage.user-profile-picture.allowed-referrersList-string[]Restrict access to the resource to only allow the specific referrers (e.g. "https://github.com/turms-im/turms/*")
turms.service.storage.user-profile-picture.download-url-expire-after-secondsint300The presigned URLs are valid only for the specified duration. 0 means no expiration
turms.service.storage.user-profile-picture.expire-after-daysint0Delete the resource the specific days after creation. 0 means no expiration
turms.service.storage.user-profile-picture.max-size-bytesint1048576The maximum size of the resource that the client can upload. 0 means no limit
turms.service.storage.user-profile-picture.min-size-bytesint0The minimum size of the resource that the client can upload. 0 means no limit
turms.service.storage.user-profile-picture.upload-url-expire-after-secondsint300The presigned URLs are valid only for the specified duration. 0 means no expiration
turms.service.user.activate-user-when-addedbooleantrueWhether to activate a user when added by default
turms.service.user.delete-two-sided-relationshipsbooleanfalseWhether to delete the two-sided relationships when a user requests to delete a relationship
turms.service.user.delete-user-logicallybooleantrueWhether to delete a user logically
turms.service.user.friend-request.allow-send-request-after-declined-or-ignored-or-expiredbooleanfalseWhether to allow resending a friend request after the previous request has been declined, ignored, or expired
turms.service.user.friend-request.delete-expired-requests-when-cron-triggeredbooleanfalseWhether to delete expired when the cron expression is triggered
turms.service.user.friend-request.expired-user-friend-requests-cleanup-cronstring0 0 2 * * *Clean expired friend requests when the cron expression is triggered if deleteExpiredRequestsWhenCronTriggered is true
turms.service.user.friend-request.friend-request-expire-after-secondsint2592000A friend request will become expired after the specified time has elapsed
turms.service.user.friend-request.max-content-lengthint200The maximum allowed length for the text of a friend request
turms.service.user.max-intro-lengthint100The maximum allowed length for a user's intro
turms.service.user.max-name-lengthint20The maximum allowed length for a user's name
turms.service.user.max-password-lengthint16The maximum allowed length for a user's password
turms.service.user.max-profile-picture-lengthint100The maximum allowed length for a user's profile picture
turms.service.user.min-password-lengthint-1The minimum allowed length for a user's password. If 0, it means the password can be an empty string "". If -1, it means the password can be null
turms.service.user.respond-offline-if-invisiblebooleanfalseWhether to respond to client with the OFFLINE status if a user is in INVISIBLE status
turms.shutdown.job-timeout-millislong120000Wait for a job 2 minutes at most for extreme cases by default. Though it is a long time, graceful shutdown is usually better than force shutdown.
turms.user-status.cache-user-sessions-statusbooleantrueWhether to cache the user sessions status
turms.user-status.user-sessions-status-cache-max-sizeint-1The maximum size of the cache of users' sessions status
turms.user-status.user-sessions-status-expire-afterint60The life duration of each remote user's sessions status in the cache. Note that the cache will make the presentation of users' sessions status inconsistent during the time