|
| 1 | +# OpenIM Chat Configuration Files and Common Configuration Item Modifications Guide |
| 2 | + |
| 3 | +## Configuration Files Explanation |
| 4 | + |
| 5 | +| Configuration File | Description | |
| 6 | +| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | |
| 7 | +| **redis.yml** | Configurations for Redis password, address, etc. | |
| 8 | +| **mongodb.yml** | Configurations for MongoDB username, password, address, etc. | |
| 9 | +| **share.yml** | Common configurations needed by various OpenIM services, such as secret. | |
| 10 | +| **discovery.yml** | Service discovery account, password, service name and other configurations. | |
| 11 | +| **chat-api-chat.yml** | Configurations for listening IP, port, etc., in chat-api-chat service. | |
| 12 | +| **chat-api-admin.yml** | Configurations for listening IP, port, etc., in chat-api-admin service. | |
| 13 | +| **chat-rpc-chat.yml** | Configurations for listening IP, port, login registration verification code, registration allowance, and livekit in chat-rpc-chat service. | |
| 14 | +| **chat-rpc-admin.yml** | Configurations for listening IP, port, chat backend token expiration policy, and chat backend Secret in chat-rpc-admin service. | |
| 15 | + |
| 16 | +## Common Configuration Item Modifications |
| 17 | + |
| 18 | +| Configuration Item to Modify | Configuration File | |
| 19 | +| ----------------------------------------- | -------------------- | |
| 20 | +| Modify OpenIM secret | `share.yml` | |
| 21 | +| Production environment logs | `log.yml` | |
| 22 | +| Modify chat Admin username and password | `share.yml` | |
| 23 | +| Modify verification code | `chat-rpc-chat.yml` | |
| 24 | +| Allow user registration | `chat-rpc-chat.yml` | |
| 25 | +| Modify chat Admin token expiration policy | `chat-rpc-admin.yml` | |
| 26 | +| Modify chat Admin Secret | `chat-rpc-admin.yml` | |
| 27 | + |
| 28 | +## Starting Multiple Instances of an OpenIM Service |
| 29 | + |
| 30 | +To launch multiple instances of an OpenIM service, you just need to increase the corresponding number of ports and modify the `start-config.yml` file in the project's root directory, then restart the service for the changes to take effect. For example, the configuration for launching 2 instances of `chat-rpc` is as follows: |
| 31 | + |
| 32 | +```yaml |
| 33 | +rpc: |
| 34 | + registerIP: "" |
| 35 | + listenIP: 0.0.0.0 |
| 36 | + ports: [30300, 30301] |
| 37 | +``` |
| 38 | +
|
| 39 | +Modify `start-config.yml`: |
| 40 | + |
| 41 | +```yaml |
| 42 | +serviceBinaries: |
| 43 | + chat-rpc: 2 |
| 44 | +``` |
0 commit comments