π Environment Requirements
Considerations | Details |
---|---|
Operating System | Linux, ideally Ubuntu 22.04, root user |
Hardware Resources | At least 4GB RAM, for user volume <100,000, single machine deployment: 8C 16G 10Mb 1T regular disk |
golang | 1.18 and above |
docker | Docker version 24.0.5, build ced0996 or newer |
git | 2.17.1 and above |
π¦ Storage Component Requirements
Storage Component | Recommended Version |
---|---|
mongodb | 6.0.2 and above |
redis | 7.0.0 and above |
zookeeper | latest |
kafka | latest |
mysql | 5.7 and above |
minio | latest |
π 1. Set Common Environment Variables
-
CHAT_BRANCH
- Description: chat version
-
Default:
release-v1.3
- Consideration: Supports version 1.3 and above
export CHAT_BRANCH="release-v1.3"
-
SERVER_BRANCH
- Description: OpenIMServer version
-
Default:
release-v3.3
- Consideration: Supports version 3.3 and above
export SERVER_BRANCH="release-v3.3"
-
PASSWORD
- Description: Component password (mysql/mongodb/redis/minio)
-
Default:
openIM123
- Consideration: Password should be β₯8 characters and without special characters
export PASSWORD="openIM123"
-
USER
- Description: Component username (mysql/mongodb/redis/minio)
-
Default:
root
export USER="root"
-
API_URL
- Description: API address
- Note: Automatically fetched if there's an external IP; for internal network, set it to the server IP
export API_URL="http://ip:10002"
-
DATA_DIR
- Description: Data volume directory
-
Default:
./
export DATA_DIR="./"
π More Environment Variables
π’ For a detailed understanding of various environment variables, please refer to this document.
β οΈ Note: Variables set using
export
have higher priority than the ones in the script.
π 2. Pull and Launch Image
git clone https://github.com/openim-sigs/openim-docker openim/openim-docker && export openim=$(pwd)/openim && cd $openim/openim-docker && make init && docker compose up -d
π’ If your docker doesn't support compose, it's recommended to upgrade following this guide.
π View Logs
docker compose logs openim-server
docker compose logs openim-chat
π’ More logs can be found at: openim-server/branch/logs/
and openim-chat/branch/logs
π©Ί Check Health Status
docker ps
3. Quick Verification
Please refer to the Quick Verification document.
β Frequently Asked Questions π§
1. How to modify using external components? π οΈ
Example: Using external mysqlπ:
- π Edit
docker-compose.yaml
and comment out mysql configuration and its corresponding depends_on. - π Edit
scripts/install/environment.sh
and change the mysql configuration. - π» Run the command:
make init
- π Run the command:
docker compose up -d
2. Health status is starting
? π
Initially, before the health check, Docker's default status is starting
β³. Approximately after 1 minute, the status changes to healthy
β
.
3. Port Mapping π
Docker networks allow for user-defined settingsπ§. You can map ports as usualπ.
4. About 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
π.
About OpenIM
Open source, and universal instant messaging components
OpenIM includes server and client SDKs, achieving high performance, lightweight, and easy-to-extend features. Developers can integrate instant messaging and real-time networking capabilities quickly into their applications by integrating the OpenIM SDK and deploying the server privately, ensuring the security and privacy of business data.
Currently, the github star is over 12,000, including iOS, Android, Flutter, ReactNative, web, pc, and Uniapp platforms.
GitHub: https://github.com/openimsdk/open-im-server
Official Website: https://docs.openim.io/
Top comments (0)