Browse OpenIM Guides
Guides

Ports and Network

Configure firewall rules, exposed ports, and SDK access addresses.

Copy

Without a domain or TLS certificate

Allow the following ports through the server firewall. Do not expose other ports publicly.

ModulePortPurposeAction
OpenIMServerTCP 10001WebSocket messaging for OpenIMClientSDKAllow
OpenIMServerTCP 10002User, friend, group, message, and other APIsAllow
OpenIMServerTCP 10005MinIO object storageAllow
ChatServerTCP 10008App business APIs such as registration and loginAllow
ChatServerTCP 10009App Administrator APIs such as statistics and account suspensionAllow
Web frontend (optional)TCP 11001PC Web frontend, required for browser verificationAllow as needed
Admin frontend (optional)TCP 11002App Administrator frontendAllow as needed

Initialize OpenIMClientSDK with:

apiAddr: http://your_server_ip:10002
wsAddr: ws://your_server_ip:10001

With a domain and TLS certificate

Only expose the default HTTPS port, TCP 443; restrict all other service ports to the private network. Configure DNS and bind the IP first, then follow Domain configuration to configure certificates and reverse proxies.

Initialize OpenIMClientSDK with:

apiAddr: https://your_domain.com/api
wsAddr: wss://your_domain.com/msg_gateway

If you use the browser procedure in Deployment verification to access port 11001 directly, that port must be reachable. Otherwise, do not expose 11001 or 11002 publicly.