Deploying OpenIM comes to more than one elements and helps quite a lot of strategies, together with supply code, Docker, and Kubernetes. This calls for making sure compatibility between other deployment strategies whilst successfully managing variations between variations. Certainly, those are complicated problems involving in-depth technical main points and actual device configurations. Our purpose is to simplify the deployment procedure whilst keeping up the device’s flexibility and steadiness to fit other customers’ wishes. Lately, model 3.5 has simplified the deployment procedure, and this model can be maintained for a very long time. We welcome everybody to make use of it.
1. Atmosphere and Part Necessities
 Environmental Necessities
Observe | Detailed Description |
---|---|
OS | Linux device |
{Hardware} | No less than 4GB of RAM |
Golang | v1.19 or upper |
Docker | v24.0.5 or upper |
Git | v2.17.1 or upper |
Garage Part Necessities
Garage Part | Really useful Model |
---|---|
MongoDB | v6.0.2 or upper |
Redis | v7.0.0 or upper |
Zookeeper | v3.8 |
Kafka | v3.5.1 |
MySQL | v5.7 or upper |
MinIO | Newest model |
2. Deploying OpenIM Server (IM)
2.1 Atmosphere OPENIM_IP
# If the server has an exterior IP
export OPENIM_IP="exterior IP"
# If handiest offering inside community services and products
export OPENIM_IP="inside IP"
2.2 Â Deploying Parts (MongoDB/Redis/Zookeeper/Kafka/MinIO, and many others.)
git clone https://github.com/OpenIMSDK/open-im-server && cd open-im-server
# It is really useful to modify to release-v3.5 or later launch branches
make init && docker compose up -d
2.3 Compilation
2.4 Beginning/Preventing/Checking
# Get started
make get started
# Forestall
make prevent
# Take a look at
make test
3. Deploying App Server (Chat)
3.1 Â Deploying Parts (MySQL)
# Return to the former listing
cd ..
# Clone the repository, really useful to modify to release-v1.5 or later launch branches
git clone https://github.com/OpenIMSDK/chat chat && cd chat
# Deploy mysql
docker run -d --name mysql2 -p 13306:3306 -p 33306:33060 -v "$(pwd)/elements/mysql/information:/var/lib/mysql" -v "/and many others/localtime:/and many others/localtime" -e MYSQL_ROOT_PASSWORD="openIM123" --restart at all times mysql:5.7
3.2 Â Compilation
3.3 Beginning/Preventing/Checking
# Get started
make get started
# Forestall
make prevent
# Take a look at
make test
4. Fast Validation
Open Ports
IM Ports
TCP Port | Description | Motion |
---|---|---|
TCP:10001 | ws protocol, messaging port, for shopper SDK | Permit port |
TCP:10002 | API port, like person, buddy, staff, message interfaces | Permit port |
TCP:10005 | Required when opting for MinIO garage (OpenIM defaults to MinIO garage) | Permit port |
Chat Ports
TCP Port | Description | Motion |
---|---|---|
TCP:10008 | Industry device, like registration, login, and many others. | Permit port |
TCP:10009 | Control backend, like statistics, account banning, and many others. | Permit port |
PC Internet and Control Backend Frontend Useful resource Ports
TCP Port | Description | Motion |
---|---|---|
TCP:11001 | PC Internet frontend sources | Permit port |
TCP:11002 | Control backend frontend sources | Permit port |
Grafana Port
TCP Port | Description | Motion |
---|---|---|
TCP:13000 | Grafana port | Permit port |
Verification
PC Internet Verification
Observe: Input http://ip:11001
for your browser to get admission to the PC Internet. This IP will have to be the server’s OPENIM_IP
to verify browser accessibility. For first-time use, please check in the use of your cell phone quantity, with the default verification code being 666666
.
PC Internet Interface Instance
App Verification
Scan the next QR code or click on right here to obtain.
App Obtain QR Code
Observe: Double-click on OpenIM and alter the IP to the server’s OPENIM_IP
then restart the App. Please be certain that linked ports are open and restart the App after making adjustments. For first-time use, please check in first thru your cell phone quantity, with the default verification code being 666666
.
Server Cope with Amendment: Step 1
Server Cope with Amendment: Step 2
5. Enhancing Configuration Pieces
5.1 Enhancing Shared Configuration Pieces
Configuration Merchandise | Recordsdata to be Changed | Motion |
---|---|---|
mongo/kafka/minio linked | .env, openim-server/config/config.yaml | Restart elements and IM |
redis/zookeeper linked | .env, openim-server/config/config.yaml, chat/config/config.yaml | Restart elements, IM, and Chat |
SECRET | openim-server/config/config.yaml, chat/config/config.yaml | Restart IM and Chat |
5.2 Enhancing Particular Configuration Pieces
Particular configuration pieces: API_OPENIM_PORT/MINIO_PORT/OPENIM_IP/GRAFANA_PORT
- Regulate the particular configuration pieces within the
.env
record - Regulate the configuration in
openim-server/config/config.yaml
in step with the foundations - Regulate the configuration in
chat/config/config.yaml
in step with the foundations - Restart IM and Chat
5.3 Â Enhancing Different Configuration Pieces
For different configuration pieces in .env
, chat/config/config.yaml
, and openim-server/config/config.yaml
, you’ll be able to regulate this stuff at once within the respective recordsdata.
5.4 Enhancing Ports
Observe that for any amendment of IM-related ports, it is important to synchronize the adjustments in open-im-server/scripts/set up/atmosphere.sh
.
6. Continuously Requested Questions
6.1 Viewing Logs
- Runtime logs:
logs/OpenIM.log.all.*
- Startup logs:
_output/logs/openim_*.log
6.2 Startup Order
The startup order is as follows:
- Parts IM is dependent upon mongo/redis/kafka/zookeeper/minio, and many others.
- IM
- Parts Chat is dependent upon MySQL
- Chat
6.3 Docker Model
- The brand new model of Docker has built-in docker-compose.
- Older variations of Docker may now not improve the gateway function. It is really useful to improve to a more recent model, reminiscent of
23.0.1
.
7. About OpenIM
Due to in style developer improve, OpenIM maintains a number one place within the open-source fast messaging (IM) box, with the selection of stars on Github exceeding 12,000. Within the present context of accelerating consideration to information and privateness safety, the call for for IM personal deployment is rising, which aligns with the fast building pattern of China’s tool business. Particularly in govt and endeavor sectors, with the fast building of knowledge generation and the in style utility of cutting edge industries, the call for for IM answers has surged. Additional, the continual growth of the collaborative place of work tool marketplace has made “protected and controllable” a key characteristic.
View the GitHub repository right here.