Docker Compose Deployment
Start OpenIMServer, ChatServer, and dependencies with openim-docker.
Prepare the environment
Review Environment and components for server hardware, software, operating system, and dependency requirements.
Deploy OpenIMServer
Clone the repository and pin a version
Use the latest official release tag marked with the green Latest badge on GitHub Releases. Do not sort tag names to infer the latest version, and do not use alpha, beta, rc, or other prerelease versions.
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"main is the development branch. Do not use it directly in production.Configure the public object storage address
Edit .env and set the external MinIO address to one that clients can access:
MINIO_EXTERNAL_ADDRESS="http://your-server-ip:10005"Start and stop services
Start the services:
docker compose up -dThe first run downloads large images. Wait 30-60s after startup before running health checks or API verification.
This guide assumes a clean environment. If the machine already has containers named mongo, redis, kafka, etcd, minio, openim-server, or openim-chat, docker compose up -d fails because of container_name conflicts. Resolve the duplicate containers first, or reuse the existing components and update the configuration accordingly.
Warnings that ETCD_USERNAME, ETCD_PASSWORD, KAFKA_USERNAME, or KAFKA_PASSWORD are unset can usually be ignored when authentication is not enabled for those components.
Stop the services:
docker compose downFollow OpenIMServer and ChatServer logs:
docker compose logs -f openim-server openim-chatStart monitoring and alerting (optional)
To start Prometheus, Alertmanager, Grafana, and node-exporter as well, run:
docker compose --profile m up -dDefault ports come from the current .env. Common values are:
| Port | Component |
|---|---|
19090 | Prometheus |
19093 | Alertmanager |
13000 | Grafana |
19100 | node-exporter |
Verify the deployment
After startup, follow Deployment verification to check OpenIMServer, ChatServer, the API, WebSocket, and optional frontends.
Common issues
Containers remain unhealthy
- Run
docker exec -it openim-server mage checkanddocker exec -it openim-chat mage check, and confirm whether the problem persists for more than one minute. - Run
docker compose logs -f openim-server openim-chatto inspect the logs. - If
openim-chatbriefly reportsconnect: connection refusedduring startup, wait30-60sand check again. This usually meansopenim-serveris not fully ready yet.
Configuration changes do not take effect
Changes made directly under the container's config directory do not persist. Configure the service with environment variables instead; see the openim-docker environment variable guide.