Back to Open Im Server

OpenIM Configuration File Descriptions and Common Configuration Modifications

config/README.md

3.8.35.0 KB
Original Source

OpenIM Configuration File Descriptions and Common Configuration Modifications

External Component Configurations

Configuration FileDescription
kafka.ymlConfiguration for Kafka username, password, address, etc.
redis.ymlConfiguration for Redis password, address, etc.
minio.ymlConfiguration for MinIO username, password, address, etc.
mongodb.ymlConfiguration for MongoDB username, password, address, etc.
discovery.ymlService discovery and etcd credentials and address.
Configuration FileDescription
log.ymlConfiguration for logging levels and storage directory
notification.ymlEvent notification settings (e.g., add friend, create group)
share.ymlCommon settings for all services (e.g., secrets)
webhooks.ymlWebhook URLs and related settings
local-cache.ymlLocal cache settings (generally do not modify)
openim-rpc-third.ymlopenim-rpc-third listen IP, port, and object storage settings
openim-rpc-user.ymlopenim-rpc-user listen IP and port settings
openim-api.ymlopenim-api listen IP, port, and other settings
openim-crontask.ymlopenim-crontask scheduled task settings
openim-msggateway.ymlopenim-msggateway listen IP, port, and other settings
openim-msgtransfer.ymlSettings for openim-msgtransfer service
openim-push.ymlopenim-push listen IP, port, and offline push settings
openim-rpc-auth.ymlopenim-rpc-auth listen IP, port, token validity settings
openim-rpc-conversation.ymlopenim-rpc-conversation listen IP and port settings
openim-rpc-friend.ymlopenim-rpc-friend listen IP and port settings
openim-rpc-group.ymlopenim-rpc-group listen IP and port settings
openim-rpc-msg.ymlopenim-rpc-msg listen IP and port settings
Configuration FileDescription
prometheus.ymlPrometheus configuration
instance-down-rules.ymlAlert rules
alertmanager.ymlAlertmanager configuration
email.tmplEmail alert template
grefana-template/Demo.jsonDefault Grafana dashboard

Common Configuration Modifications

Configuration ItemConfiguration File
Configure MinIO as object storage (focus on the externalAddress field)minio.yml
Adjust log level and number of log fileslog.yml
Enable or disable friend verification when sending messagesopenim-rpc-msg.yml
OpenIMServer secretshare.yml
Configure OSS, COS, AWS, or Kodo as object storageopenim-rpc-third.yml
Multi-end mutual kick strategy and max concurrent connections per gatewayopenim-msggateway.yml
Offline message push configurationopenim-push.yml
Configure webhooks for callback notifications (e.g., before/after message send)webhooks.yml
Whether new group members can view historical messagesopenim-rpc-group.yml
Token expiration time settingsopenim-rpc-auth.yml
Scheduled task settings (e.g., how long to retain messages)openim-crontask.yml

Starting Multiple Instances of a Service and Maximum File Descriptors

To start multiple instances of an OpenIM service, simply add the corresponding port numbers and modify the start-config.yml file in the project’s root directory, then restart the service. For example, to start 2 instances of openim-rpc-user:

yaml
rpc:
  registerIP: ''
  listenIP: 0.0.0.0
  ports: [ 10110, 10111 ]

prometheus:
  enable: true
  ports: [ 20100, 20101 ]

Modifystart-config.yml:

yaml
serviceBinaries:
  openim-rpc-user: 2

To set the maximum number of open file descriptors (typically one per online user):

maxFileDescriptors: 10000