| title | Docker Deployment |
|---|---|
| sidebar_position | 2 |
For server hardware, software, operating system, and dependent components, please refer to this document.
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.
-
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"
- Start services:
docker compose up -dThe 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 compose logs -f openim-server openim-chatIf you also want to start Prometheus, Alertmanager, Grafana, and node-exporter, run:
docker compose --profile m up -dDefault ports follow the current .env. Common values are:
19090: Prometheus19093: Alertmanager13000: Grafana19100: node-exporter
To quickly experience core OpenIMSDK capabilities and verify whether OpenIMServer / ChatServer deployment is working, refer to Quick Verification.
- Run
docker exec -it openim-server mage checkanddocker exec -it openim-chat mage check, then confirm whether either state lasts longer than one minute. - Run
docker compose logs -f openim-server openim-chatto 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.
Editing files under the container config directory does not work.
Configuration changes must be made through environment variables. See the environment variable guide.