Skip to content

配置参数

重要性

即时通讯的业务场景繁多,因此不同业务对硬件资源有着天差地别的要求(比如:需要数据库的架构与不需要数据库的架构)。 为了有效利用服务器资源,请务必细心了解Turms服务端所提供的配置参数。

  • 场景一:100%的消息可达率 vs 主动抛弃消息

    • 在社交应用中,一般都会要求消息有100%的可达率。反之,对于在直播聊天室应用中,服务端甚至会专门根据消息优先级与服务端负载,来主动地抛弃用户消息或是把消息只发送给聊天室中的部分用户。
    • 对于前者,Turms使用Redis来拉取会话级别的递增sequence ID来实现消息的100%必达。对于后者,Turms会根据内存中的消息与服务端负载信息来主动抛弃消息。二者对于消息可达率有着完全不同但又都合理的需求,因此二者的实现对于硬件配置也有着截然不同的要求。
  • 场景二:读扩散消息存储 vs 零消息存储

    • A应用是一款主要面向商务客户的即时通讯应用。这款应用有一个需求:当一名用户在商务群里发送了一条消息,该用户能够得知群组中其他每一名用户是否已读该消息,就算该用户发完消息就下线了,当其再次上线时,仍能查询其他人对该消息的已读状态。

      因此,如果一个商务群有100名用户,当其中一名用户发出一条消息时,Turms需要存储1条Message与1条Conversation(Turms采用读扩散消息模型,另外请注意:该条Conversation记录会携带99个群成员的最后已读时间)。

    • B应用是一款直播弹幕聊天应用,它对消息的处理非常随意。当一名用户在一个直播频道发出一条消息后,该用户不仅无需得知其他用户的已读状态,甚至连消息本身都不要求存储(即无离线消息需求)。

      因此,如果一个直播频道有100名,当其中一名用户发出一条消息时,Turms需要存储0条Message与0条Conversation记录。

    • 对比A应用需要消息存储功能,而B应用不用。因此在B应用的架构设计中甚至都不要用到存储消息的表(当然,实际应用中一般还是会存储用户消息来做用户行为分析)。因此二者对硬件需求也截然不同。

本地配置与全局配置

Turms服务端具有本地配置与全局配置两大类配置,其中:

本地配置全局配置
应用域仅对当前节点生效对集群中所有节点生效
存储位置存储在本地的application-[profile].yaml文件中存储在MongoDB数据库中turms-config/shared-cluster-properties集合中
可变对于标有MutableProperty注释的属性,用户都能通过供管理员专用的API接口在Turms集群运行时进行零停机实时更新同左

配置分类

配置分为两大类,一类是JVM的配置,一类是Turms服务端的配置。

JVM配置

turms-gateway的JVM默认配置文件为:turms-gateway/dist/config/jvm.options

turms-service的JVM默认配置文件为:turms-service/dist/config/jvm.options

用户一般使用默认的JVM配置即可,不需要自行修改JVM配置。

如果用户想修改JVM配置,可以通过以下两种方式:

  1. 修改环境变量TURMS_GATEWAY_JVM_CONF(对于turms-gateway)或TURMS_SERVICE_JVM_CONF(对于turms-service),并指向自定义的JVM配置文件,以使用完全自定义的JVM配置。下文以修改turms-gateway的JVM配置为例,具体修改方法:

    1. 如果通过run.sh脚本启动,则可以使用类似export TURMS_GATEWAY_JVM_CONF=<your-jvm-options-file-path> && sh run.sh -f来设置环境变量并启动。

    2. 如果通过Docker镜像启动,则可以使用类似:

      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

      注意:上述的TURMS_GATEWAY_JVM_CONF路径指向的是镜像内部的路径,而非宿主机的路径。如果想使用宿主机里的配置文件,则需要使用Docker的挂载机制,如:

      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. 如果通过Docker Compose,则可以使用类似:

      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

      注意:上述的TURMS_GATEWAY_JVM_CONF路径指向的是镜像内部的路径,而非宿主机的路径。如果想使用宿主机里的配置文件,则需要修改docker-compose.standalone.yml配置文件,以使用Docker的挂载机制,如:

      yaml
      turms-gateway:
        volumes:
          - <your-jvm-options-file-path>:/opt/turms/turms-gateway/config/jvm.options:ro
  2. 修改环境变量TURMS_GATEWAY_JVM_OPTS(对于turms-gateway)或TURMS_SERVICE_JVM_OPTS(对于turms-service),以在JVM配置文件的基础上,附加自定义的JVM配置,并覆盖已声明的JVM配置。具体修改方法同上,故不赘述。

    注意:该变量的格式为:-D<name>=<value> -D<name>=<value>,如:-Dspring.profiles.active=DEV -Dturms.cluster.discovery.address.advertise-host=myturms

Turms服务端配置

Turms配置分为四大类:

  • Turms Gateway配置:对应turms-gateway服务端独有的配置
  • Turms Service配置:对应turms-service服务端独有的配置。
  • Common通用配置:Common通用配置可以被turms-gateway和turms-service服务端共用。
  • 插件自身的配置:Turms服务端插件自身提供的配置。

配置方法

  1. 前文提到的TURMS_GATEWAY_JVM_CONFTURMS_SERVICE_JVM_CONF,与TURMS_GATEWAY_JVM_OPTSTURMS_SERVICE_JVM_OPTS也都可以被用来配置Turms服务端的参数。
  2. 修改application.yaml下的配置文件。具体方法:
    1. 直接修改仓库内服务端下的application.yaml文件。因为如果修改了配置源文件,那用户就不能使用Turms官方提供的Docker镜像了,并且还需要自行打包成JAR包并制作镜像,因此这种方式一般只用于本地开发测试用,不用于线上环境。
    2. 使用前文提到的Docker挂载的方式,将自定义的服务端配置文件挂载到/opt/turms/turms-gateway/config/application.yaml路径上。
  3. 调用Admin HTTP API进行修改,其路径为:PUT /cluster/settings

提醒:对于插件自身的配置,其配置方法跟Turms服务端的配置方法一样,除了暂时不支持使用Admin HTTP API动态修改外,同样可以基于上述的①②两个方法进行配置。举例来说,如果一个插件是给turms-gateway服务端使用的插件,那么用户可以将插件自身的配置放到turms-gateway服务端的TURMS_GATEWAY_JVM_OPTS环境变量当中。

配置集(Profiles)

如果开发者需要对同一个Turms服务端配置与切换使用不同的配置,则可以使用配置集。

默认情况下,Turms服务端源码中硬编码的配置与application.yaml文件中指定的配置就是默认生产环境的配置。如果开发者想要切换使用其他配置集,则可以通过修改application.yaml文件中的spring.profiles.active配置来使用其他配置集。

比如常见的用例:在本地开发调试时,想将生产环境配置,切换成默认的开发环境配置,则开发者可以将application.yaml文件中的spring.profiles.active值修改为dev,这样Turms服务端就会采用application.yamlapplication-dev.yaml(默认开发环境配置)两个文件中指定的配置,且application-dev.yaml文件中的配置优先级更高,将覆盖默认配置。

配置参数介绍

由于Turms服务端的配置项高达上百个,本小节仅对配置类别做简要的介绍。如果读者想查阅具体的配置项,可以查阅im.turms.server.common.infra.property包下的各配置类代码,或者继续浏览下文配置项小节所提供的配置项说明。

提醒:您在本地编译turms/turms-gateway服务端项目后,编译器会生成target/classes/META-INF/spring-configuration-metadata.json文件。IntelliJ IDEA 能够自动检测到该文件,并在您输入Turms相关配置的时提供配置提示与补全功能,如下图所示:

Tumrs Service配置
类别字段名描述补充
管理员APIAdminApiPropertiesadminApi管理员API接口相关配置
客户端APIClientApiPropertiesclientApi客户端API接口相关配置
Fake数据FakePropertiesfakeFake数据相关配置
数据源MongoPropertiesmongoMongoDB数据库相关配置Turms完全复用MongoDB的URI配置。参考文档:
https://docs.mongodb.com/manual/reference/connection-string/
TurmsRedisPropertiesredisRedis数据库相关配置
统计StatisticsPropertiesstatistics统计相关配置
通知NotificationPropertiesnotification通知相关配置
文件存储StoragePropertiesstorage存储相关配置
业务行为UserPropertiesuser用户相关配置
GroupPropertiesgroup群组相关配置
ConversationPropertiesconversation消息会话服务相关配置
MessagePropertiesmessage消息服务相关配置
Turms Gateway配置
类别字段名描述
管理员APIAdminApiPropertiesadminApi管理员API接口相关配置
客户端APIClientApiPropertiesclientApi面向客户端的HTTP接入层相关配置(即ReasonController的相关配置)
NotificationLoggingPropertiesnotificationLogging通知日志相关配置
服务接口UdpPropertiesudpUDP服务端相关配置
TcpPropertiestcpTCP服务端相关配置
WebSocketPropertieswebsocketWebSocket服务端相关配置
DiscoveryPropertiesserviceDiscovery服务发现相关配置
Fake数据FakePropertiesfakeFake数据相关配置
数据源MongoPropertiesmongoMongoDB数据库相关配置
TurmsRedisPropertiesredisRedis数据库相关配置
业务行为SimultaneousLoginPropertiessimultaneousLogin多端登录相关配置
SessionPropertiessession会话相关配置
Common通用配置
字段名描述
ClusterPropertiescluster集群相关配置。包括配置当前运行节点信息、服务发现注册信息、配置中心信息、RPC参数
HealthCheckPropertieshealthCheck监控节点健康状态
IpPropertiesip公网IP探测相关配置
LocationPropertieslocation用户坐标相关配置
LoggingPropertieslogging基础日志配置
PluginPropertiesplugin插件相关配置
SecurityPropertiessecurity用户与管理员密码加密相关配置
UserStatusPropertiesuserStatus用户会话(连接)状态相关配置
插件自身的配置

如果用户想查阅Turms服务端官方插件的配置项,可以阅读对应的插件文档,这些文档都会罗列该插件所提供的配置项。

服务端端口号配置

服务端配置项端口作用
turms-admin6510(HTTP)提供后台管理员系统的Web页面
turms-service/turms-gatewayturms.cluster.connection.server.port7510(TCP)供turms-service与turms-gateway服务端的RPC使用
turms-serviceturms.service.admin-api.http.port8510(HTTP)提供admin API与metrics API
turms-gatewayturms.gateway.admin-api.http.port9510(HTTP)提供metrics API
turms-gatewayturms.gateway.websocket.port10510(WebSocket)与turms-client-js客户端交互
turms-gatewayturms.gateway.tcp.port11510(TCP)与客户端交互
turms-gatewayturms.gateway.udp.port12510(UDP)与客户端交互(客户端均暂不支持)。
注意:UDP服务端为实验性功能,并不在第一版发布计划中

配置项

注意:下表不包括Turms服务端插件的配置。

配置项全局属性可变属性数据类型默认值说明
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
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