Open Source Instant Messaging (IM) Project OpenIM Source Code

本文涉及的产品
对象存储 OSS,20GB 3个月
对象存储 OSS,恶意文件检测 1000次 1年
对象存储 OSS,内容安全 1000次 1年
简介: Open Source Instant Messaging (IM) Project OpenIM Source Code

Deploying OpenIM involves multiple components and supports various methods, including source code, Docker, and Kubernetes. This requires ensuring compatibility between different deployment methods while effectively managing differences between versions. Indeed, these are complex issues involving in-depth technical details and precise system configurations. Our goal is to simplify the deployment process while maintaining the system’s flexibility and stability to suit different users’ needs. Currently, version 3.5 has simplified the deployment process, and this version will be maintained for a long time. We welcome everyone to use it.

  1. Environment and Component Requirements

🌐 Environmental Requirements

NoteDetailed Description

OSLinux system

HardwareAt least 4GB of RAM

Golangv1.19 or higher

Dockerv24.0.5 or higher

Gitv2.17.1 or higher

Storage Component Requirements

Storage ComponentRecommended Version

MongoDBv6.0.2 or higher

Redisv7.0.0 or higher

Zookeeperv3.8

Kafkav3.5.1

MySQLv5.7 or higher

MinIOLatest version

  1. Deploying OpenIM Server (IM)

2.1 Setting OPENIM_IP

If the server has an external IPexportOPENIM_IP="external IP"# If only providing internal network servicesexportOPENIM_IP="internal IP"

2.2 🏗️ Deploying Components (mongodb/redis/zookeeper/kafka/MinIO, etc.)

gitclone https://github.com/OpenIMSDK/open-im-server&&cdopen-im-server# It's recommended to switch to release-v3.5 or later release branchesmakeinit&&docker compose up -d

2.3 🛠️ Compilation

makebuild

2.4 Starting/Stopping/Checking

Startmakestart# Stopmakestop# Checkmakecheck

  1. Deploying App Server (Chat)

3.1 🏗️ Deploying Components (mysql)

Go back to the previous directorycd..# Clone the repository, recommended to switch to release-v1.5 or later release branchesgitclone https://github.com/OpenIMSDK/chat chat&&cdchat# Deploy mysqldocker run -d --name mysql2 -p13306:3306 -p33306:33060 -v"$(pwd)/components/mysql/data:/var/lib/mysql"-v"/etc/localtime:/etc/localtime"-eMYSQL_ROOT_PASSWORD="openIM123"--restart always mysql:5.7

3.2 🛠️ Compilation

makeinitmakebuild

3.3 Starting/Stopping/Checking

Startmakestart# Stopmakestop# Checkmakecheck

  1. Quick Validation

Open Ports

IM Ports

TCP PortDescriptionAction

TCP:10001ws protocol, messaging port, for client SDKAllow port

TCP:10002API port, like user, friend, group, message interfacesAllow port

TCP:10005Required when choosing MinIO storage (OpenIM defaults to MinIO storage)Allow port

Chat Ports

TCP PortDescriptionAction

TCP:10008Business system, like registration, login, etc.Allow port

TCP:10009Management backend, like statistics, account banning, etc.Allow port

PC Web and Management Backend Frontend Resource Ports

TCP PortDescriptionAction

TCP:11001PC Web frontend resourcesAllow port

TCP:11002Management backend frontend resourcesAllow port

Grafana Port

TCP PortDescriptionAction

TCP:13000Grafana portAllow port

Verification

PC Web Verification

Note: Enter http://ip:11001 in your browser to access the PC Web. This IP should be the server’s OPENIM_IP to ensure browser accessibility. For first-time use, please register using your mobile phone number, with the default verification code being 666666.
webwxgetmsgimg.jpg

Image: PC Web Interface Example

App Verification

Scan the following QR code or click here to download.

Image: App Download QR Code

Note: Double-click on OpenIM and change the IP to the server’s OPENIM_IP then restart the App. Please ensure related ports are open, and restart the App after making changes. For first-time use, please register first through your mobile phone number, with the default verification code being 666666.
2.jpg

Image: Server Address Modification - Step 1
3.jpg

Image: Server Address Modification - Step 2

  1. Modifying Configuration Items

5.1 🛠️ Modifying Shared Configuration Items

Configuration ItemFiles to be ModifiedAction

mongo/kafka/minio related.env, openim-server/config/config.yamlRestart components and IM

redis/zookeeper related.env, openim-server/config/config.yaml, chat/config/config.yamlRestart components, IM, and Chat

SECRETopenim-server/config/config.yaml, chat/config/config.yamlRestart IM and Chat

5.2 🔄 Modifying Special Configuration Items

Special configuration items: API_OPENIM_PORT/MINIO_PORT/OPENIM_IP/GRAFANA_PORT

Modify the special configuration items in the .env file

Modify the configuration in openim-server/config/config.yaml according to the rules

Modify the configuration in chat/config/config.yaml according to the rules

Restart IM and Chat

5.3 🛠️ Modifying Other Configuration Items

For other configuration items in .env, chat/config/config.yaml, and openim-server/config/config.yaml, you can modify these items directly in the respective files.

5.4 Modifying Ports

Note that for any modification of IM-related ports, it’s necessary to synchronize the changes in open-im-server/scripts/install/environment.sh.

  1. Frequently Asked 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:

Components IM depends on: mongo/redis/kafka/zookeeper/minio, etc.

IM

Components Chat depends on: mysql

Cha

t

6.3 Docker Version

The new version of Docker has integrated docker-compose.

Older versions of Docker might not support the gateway feature. It’s recommended to upgrade to a newer version, such as 23.0.1.

  1. About OpenIM

Thanks to widespread developer support, OpenIM maintains a leading position in the open-source instant messaging (IM) field, with the number of stars on Github exceeding 12,000. In the current context of increasing attention to data and privacy security, the demand for IM private deployment is growing, which aligns with the rapid development trend of China’s software industry. Especially in government and enterprise sectors, with the rapid development of information technology and the widespread application of innovative

industries, the demand for IM solutions has surged. Further, the continuous expansion of the collaborative office software market has made “secure and controllable” a key attribute.

Repository address: https://github.com/openimsdk
4.jpg

目录
相关文章
|
6月前
|
安全 开发者 Docker
总结反思 持续进步-开源即时通讯(IM)项目OpenIM 新版本release-v3.7发布
背景 过去,我们团队对开源项目的认知较浅,过分追求进度,而忽视了代码的质量和规范。这导致了一些问题,例如部署流程设计不当:流程复杂、不规范,以及Mac与Windows部署的明显缺陷。这些问题不仅给开发者带来了困扰,也增加了社区维护的难度。 针对这些挑战,我们团队进行了深刻的反思并总结出了相关问题。目前,我们正在专注于提高代码质量和规范化工作,并在完善我们的开源贡献流程,以吸引更多贡献者参与。我们相信这是关键步骤,以扩大社区的影响力并将OpenIM发展成为一流的开源项目。 为此,我们已规划推出release-v3.7版本,该版本将全面改造部署、规范和流程等方面,并且与3.6版本数据完全兼容。
140 0
|
6月前
|
网络协议 NoSQL 关系型数据库
注册 🛠 开源即时通讯(IM)项目OpenIM源码部署指南 OpenIM
注册 🛠 开源即时通讯(IM)项目OpenIM源码部署指南 OpenIM
464 0
|
网络协议 关系型数据库 开发者
开源即时通讯(IM)项目OpenIM源码部署流程
开源即时通讯(IM)项目OpenIM源码部署流程
896 0
开源即时通讯(IM)项目OpenIM源码部署流程
|
前端开发 小程序 测试技术
靠谱:开源IM项目OpenIM压测程序介绍-自己动手测试性能和稳定性
靠谱:开源IM项目OpenIM压测程序介绍-自己动手测试性能和稳定性
705 0
|
Rust JavaScript 前端开发
即时通讯(IM)开源项目OpenIM对WebAssembly支持,提升web端体验
即时通讯(IM)开源项目OpenIM对WebAssembly支持,提升web端体验
338 0
|
网络协议 应用服务中间件 开发工具
IM开源项目OpenIM部署文档-从准备工作到nginx配置
IM开源项目OpenIM部署文档-从准备工作到nginx配置 2022-11-14 22:27·OpenIM 一、准备工作 运行环境 linux系统即可, Ubuntu 7.5.0-3ubuntu1~18.04最优 图片视频文件存储 支持cos/MinIO https/wss协议 1. 需申请域名或者子域名(web im端登录注册及im 服务端使用)建议:web.xx.xx 2. 若使用MinIO作为对象存储,建议:storage.xx.xx 3. 管理后台子域名,建议:admin.xx.xx 4. 部署nginx,并配置证书。 离线推送(app被杀死或未启动时推送) 国内申请
773 0
IM开源项目OpenIM部署文档-从准备工作到nginx配置
|
消息中间件 固态存储 NoSQL
开源IM项目OpenIM单聊及万人群压测报告
开源IM项目OpenIM单聊及万人群压测报告
464 0
开源IM项目OpenIM单聊及万人群压测报告
|
前端开发 小程序 API
期盼已久全平台支持-开源IM项目OpenIM之uniapp更新
期盼已久全平台支持-开源IM项目OpenIM之uniapp更新
684 0
|
JSON API 开发工具
即时通讯(IM)开源项目OpenIM重构版本发布- v2.0.0
OpenIM开发团队花费了2个月时间,加班加点对代码进行了局部重构,优化代码结构,规范代码开发流程,为社区未来深度参与开发打好基础
1574 0
即时通讯(IM)开源项目OpenIM重构版本发布- v2.0.0