Docker Deployment
1. Environment Preparation đâ
For server hardware, software, operating system, and dependent components, please refer to this document.
2. Deploy OpenIMServerâ
2.1 Clone the Repository đī¸â
Use the latest official release tag marked with the green Latest badge on the GitHub Releases page. Do not sort tags manually, and do not use pre-release versions such as alpha or rc.
git clone https://github.com/openimsdk/openim-docker && cd openim-docker
git fetch --tags
LATEST_STABLE_TAG=$(basename "$(curl -fsSLI -o /dev/null -w '%{url_effective}' https://github.com/openimsdk/openim-docker/releases/latest)")
git checkout "$LATEST_STABLE_TAG"
echo "using openim-docker stable release tag: $LATEST_STABLE_TAG"
Here,
latestmeans the latest official release marked with the green Latest badge on GitHub Releases. It does not include alpha, beta, rc, or other pre-releases.mainis the development branch and should not be used directly in production.
2.2 Configuration Changes đ§â
-
Edit
.envand configure the MinIO external IP to support image and file sending. Replaceyour-server-ipwith your server's public IP.MINIO_EXTERNAL_ADDRESS="http://your-server-ip:10005"
2.3 Start Services đâ
- Start services:
docker compose up -d
The first run pulls large images and may take some time. After startup, wait
30-60sbefore running health checks or API verification.
This document assumes a clean environment. If the machine already has containers with the same names such as
mongo,redis,kafka,etcd,minio,openim-server, oropenim-chat,docker compose up -dwill fail because ofcontainer_nameconflicts. In that case, stop and remove those containers first, or reuse the existing components after adjusting configuration.
If startup shows warnings such as missing
ETCD_USERNAME,ETCD_PASSWORD,KAFKA_USERNAME, orKAFKA_PASSWORD, and you have not enabled authentication for those components, these warnings can usually be ignored.
- Stop services:
docker compose down
- View logs:
docker logs -f openim-server
2.4 Monitoring & Alerting (Optional)â
If you also want to start Prometheus, Alertmanager, Grafana, and node-exporter, run:
docker compose --profile m up -d
Default ports follow the current .env. Common values are:
19090: Prometheus19093: Alertmanager13000: Grafana19100: node-exporter
3. Quick Experience âĄâ
To quickly experience core OpenIMSDK capabilities and verify whether OpenIMServer / ChatServer deployment is working, refer to Quick Verification.
Additional note for the current project layout: if you deploy from the two source repositories
open-im-serverandchat,open-im-server/docker-compose.ymlis mainly used for dependency components, and ChatServer still needs to be started withmage startin thechatdirectory. See Source Code Deployment.
4. FAQâ
Troubleshooting unhealthyâ
- Run
docker exec -it openim-server mage checkand confirm whether the state lasts longer than one minute. - Run
docker logs -f openim-serverto inspect logs. - If
openim-chatbriefly reportsconnect: connection refusedduring startup, wait30-60sand check again. This is usually a startup ordering issue whileopenim-serveris still becoming ready.
Configuration Changesâ
Editing files under the container config directory does not work.
Configuration changes must be made through environment variables. See the environment variable guide.