---
title: 'Openim Offline Deployment Design'
description: "OpenIM community offline deployment design scheme, and implementation scheme"
ShowRssButtonInSectionTermList: true
date: 2023-05-19T15:20:58+08:00
draft: false
cover:
  image: "https://sm.nsddd.top/sm202309161529285.jpg"
showtoc: true
tocopen: false
author: ["Xinwei Xiong", "Me"]
keywords: []
tags:
  - Blog
categories:
  - AI & Technology
tldr:
  - "OpenIM offline deployment requires pulling six base images including Kafka, Redis, MongoDB, MySQL, ZooKeeper, and MinIO before transferring to intranet"
  - "Images must be saved as tar files using docker save and imported on offline servers using docker load to enable deployment without internet"
  - "Complete offline deployment uses docker-compose after code cloning and image import to activate all OpenIM services within isolated network environments"
---



## 1. Base Images

Below are the base images and their versions you'll need:

- wurstmeister/kafka
- redis:7.0.0
- mongo:6.0.2
- mysql:5.7
- wurstmeister/zookeeper
- minio/minio

Use the following commands to pull these base images:

```
docker pull wurstmeister/kafka
docker pull redis:7.0.0
docker pull mongo:6.0.2
docker pull mysql:5.7
docker pull wurstmeister/zookeeper
docker pull minio/minio
```

## 2. OpenIM & Chat Images

**For detailed understanding of version management and storage of OpenIM and Chat**: [version.md](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md)

### OpenIM Image

- Get image version info: [images.md](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/images.md)
- Depending on the required version, execute the following command:

```bash
docker pull ghcr.io/openimsdk/openim-server:<version-name>
```

### Chat Image

- Execute the following command to pull the image:

```bash
docker pull ghcr.io/openimsdk/openim-server:<version-name>
```

## 3. Image Storage Selection

**Repositories**:

- Alibaba Cloud: `registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server`
- Docker Hub: `openim/openim-server`

**Version Selection**:

- Stable: e.g. release-v3.2 (or 3.1, 3.3)
- Latest: latest
- Latest of main: main

## 4. Version Selection

You can select from the following versions:

- Stable: e.g. release-v3.2
- Latest: latest
- Latest from main branch: main

## 5. Offline Deployment Steps

1. **Pull images**: Execute the above `docker pull` commands to pull all required images locally.
2. **Save images**:

```
docker save -o <tar-file-name>.tar <image-name>
```

1. **Fetch code**: Clone the repository:

```
git clone https://github.com/OpenIMSDK/openim-docker.git
```

Or download the code from [Releases](https://github.com/OpenIMSDK/openim-docker/releases/).

1. **Transfer files**: Use `scp` to transfer all images and code to the intranet server.

```
scp <tar-file-name>.tar user@remote-ip:/path/on/remote/server
```

Or choose other transfer methods such as a hard drive.

1. **Import images**: On the intranet server:

```
docker load -i <tar-file-name>.tar
```

1. **Deploy**: Navigate to the `openim-docker` repository directory and follow the README guide for deployment.
2. **Deploy using Docker-compose**:

```
docker-compose up -d

# Verify
docker-compose ps
```

> **Note**: If you're using a version of Docker prior to 20, make sure you've installed `docker-compose`.

## 6. Reference Links

- [OpenIMSDK Issue #432](https://github.com/OpenIMSDK/Open-IM-Server/issues/432)
- [Notion Link](https://nsddd.notion.site/435ee747c0bc44048da9300a2d745ad3?pvs=25)
- [OpenIMSDK Issue #474](https://github.com/OpenIMSDK/Open-IM-Server/issues/474)