RC global data center guide

IM Service offers data centers in China (Beijing), Southeast Asia (Singapore), and North America (Oregon) to support your global business.

If your app is deployed overseas and your users are mainly outside China, choose a global data center based on your message transmission needs and compliance requirements. For pricing details, see:

This guide explains how to use RC’s global data centers.

Create a global data center application

  1. Go to the Application Management page in the RC Console.

  2. Click Create Application. In the pop-up, select your data center.

  3. In the Create Application dialog, enter your Application Name, Application Description, Application Type, Operation phase, and Data Center.

    :tipping_hand_man: Once created, the data center can’t be changed. Choose carefully. Currently, you can’t directly select Singapore B, North America, or Saudi Arabia data centers. To use these, submit a ticket.

Integrate client SDK with global data center

IM SDK works across all data centers. Choose the right SDK based on your business needs, tech stack, and scenarios.

Configure using area codes

What’s an area code?

In older SDK versions, using a global data center required manually configuring navigation and statistics server addresses in the client SDK. Missing any configuration could cause issues.

To simplify this, newer SDKs encapsulate global data center configurations into area codes. If your App Key uses a global data center, just pass a valid area code (AreaCode / RCAreaCode) during initialization. In most cases, you no longer need to manually change domain addresses.

How to use and configure area codes

:point_up: First, confirm the data center associated with your App Key. RC offers global data centers in Singapore, Singapore B, North America, Saudi Arabia, and more.


You can verify your Application Name, Environment, App Key, and associated data center on the RC Console homepage.


:point_up: After confirming your App Key’s data center, choose to configure using area codes or manually set related domains based on your OS platform and SDK version.


:white_check_mark: Only the following platforms and SDK versions support configuring global data centers using area codes:

  • Android IMLib/IMKit: SDK ≧ 5.4.2

    First, check your App Key’s data center and find the corresponding enumeration value in the API documentation AreaCode. The sample code sets the area code to AreaCode.SG (Singapore data center).

    String appKey = "Singapore_dev_AppKey";
    AreaCode areaCode = AreaCode.SG;
    
    InitOption initOption = new InitOption.Builder()
        .setAreaCode(areaCode)
        .build();
    
    RongCoreClient.init(context, appKey, initOption);
    
  • iOS IMLib/IMKit: SDK ≧ 5.4.2

    First, check your App Key’s data center and find the corresponding enumeration value in the API documentation RCAreaCode. The sample code sets the area code to RCAreaCodeSG (Singapore data center).

    NSString *appKey = @"Your_AppKey"; // example: bos9p5rlcm2ba
    RCInitOption *initOption = [[RCInitOption alloc] init];
    initOption.areaCode = RCAreaCodeSG;
    
    [[RCCoreClient sharedCoreClient] initWithAppKey:appKey option:initOption];
    
  • Web IMLib: SDK ≧ 5.7.9

    First, check your App Key’s data center and find the corresponding enumeration value in the API documentation AreaCode. The sample code sets the area code to AreaCode.SG (Singapore data center).

    // App initialization. Ensure this process is executed only once.
    RongIMLib.init({ appkey: '<Your-App-Key>', areaCode: AreaCode.SG});
    

Manually configure global data center domains

If you’re using the following platforms and SDK versions, area codes aren’t supported. Manually configure navigation server and statistics server addresses as described below.

  • Android IMLib/IMKit: SDK < 5.4.2
  • iOS IMLib/IMKit: SDK < 5.4.2
  • Web IMLib: SDK < 5.7.9
  • Flutter IMLib/IMKit: SDK < 5.2.4
  • uni-app IMLib/IMKit: SDK < 5.2.4
  • Unity IMLib: SDK < 5.2.4
  • React Native IMLib: SDK < 5.2.4

Android

For versions before 5.4.2.

Before initializing the SDK, set the navigation and statistics server addresses for the global data center:

  1. Use the setServerInfo method to set the navigation server address:

    /**
    * Set the navigation and media server addresses for the global data center.
    * Call this method before {@link #init(Context, String)}.
    *
    * @param naviServer The navigation server address for the global data center.
    * @param fileServer The file server address (for Dedicated Cloud only).
    */
    public static void setServerInfo(final String naviServer, final String fileServer) {
        if (TextUtils.isEmpty(naviServer)) {
            RLog.e(TAG, "setServerInfo naviServer should not be null.");
            throw new IllegalArgumentException("naviServer should not be null.");
            }
            RongIMClient.setServerInfo(naviServer, fileServer);
    }
    
  2. Use the setStatisticDomain method to set the statistics server address:

iOS

For versions before 5.4.2.

Before initializing the SDK, set the navigation and statistics server addresses for the global data center:

  1. Use the setServerInfo method to set the navigation server address:

    /*!
    Set the navigation and file server addresses for the global data center.
    @param naviServer    The navigation server address for the global data center. See format details below.
    @param fileServer    The file server address (for Dedicated Cloud only). See format details below.
    @return              Whether the setup was successful.
    @warning Only for global data centers. Contact sales to enable this feature. Must be set before SDK initialization.
    @discussion
    naviServer must be a valid server address. Pass nil for fileServer to use the default.
    Format details:
    1. For HTTPS, use https://cn.xxx.com:port or https://cn.xxx.com. The domain can also be an IP. If no port is specified, 443 is used by default.
    2. For HTTP, use cn.xxx.com:port or cn.xxx.com. The domain can also be an IP. If no port is specified, 80 is used by default.
    */
    -(BOOL)setServerInfo:(NSString *)naviServer fileServer:(NSString *)fileServer;
    
  2. Use the setStatisticServer method to set the statistics server address:

    /**
     Set the statistics server address.
    
     @param statisticServer The statistics server address. See format details below.
     @return Whether the setup was successful.
    
     @warning Only for independent data centers. Contact sales to enable this feature. Must be set before SDK initialization and setDeviceToken.
     @discussion
     statisticServer must be a valid server address. Otherwise, push notifications and other features may not work.
     Format details:
     1. For HTTPS, use https://cn.xxx.com:port or https://cn.xxx.com. The domain can also be an IP. If no port is specified, 443 is used by default.
     2. For HTTP, use cn.xxx.com:port or cn.xxx.com. The domain can also be an IP. If no port is specified, 80 is used by default. (iOS defaults to HTTPS. For HTTP, refer to iOS documentation for ATS settings.)
    
     @remarks Feature settings
     */
    - (BOOL)setStatisticServer:(NSString *)statisticServer;
    

Web

Set the navigation server address for the global data center in the SDK’s init method:

// IMLib v2
RongIMClient.init('<Your-AppKey>', null, { navi: 'https://nav.sg-light-edge.com' } });
// or IMLib v4
RongIMLib.init({ appkey: '<Your-AppKey>', navigators: ['https://nav.sg-light-edge.com'] });
// or IMLib v5
RongIMLib.init({ appkey: '<Your-AppKey>', navigators: ['https://nav.sg-light-edge.com'] });

Mini Program

Not supported.

Flutter

Only for versions 5.2.4 and later.

In the SDK engine configuration, set the navigation and statistics server addresses for the global data center:

RCIMIWEngineOptions options = RCIMIWEngineOptions.create();
options.naviServer = 'Configured navigation address';
options.statisticServer = 'Configured statistics server';
RCIMIWEngine engine = await RCIMIWEngine.create(appKey, options);

uni-app

Only for versions 5.2.4 and later.

In the SDK engine configuration, set the navigation and statistics server addresses for the global data center:

let options = { naviServer: 'Configured navigation address' }
let options = { statisticServer: 'Configured statistics server' }
let engine = await RCIMIWEngine.create(appKey, options);

React Native

Only for versions 5.2.4 and later.

In the SDK engine configuration, set the navigation and statistics server addresses for the global data center:

let options: RCIMIWEngineOptions = {};
let options: RCIMIWEngineOptions = {naviServer: 'Configured navigation address'};
let options: RCIMIWEngineOptions = {statisticServer: 'Configured statistics server'};
let engine: RCIMIWEngine = RCIMIWEngine.create(appkey, options);
* **NaviServer**
    - Singapore: nav.sg-light-edge.com (primary), nav-b.sg-light-edge.com (backup)
    - Singapore B: nav.sg-b-light-edge.com (primary), nav-b.sg-b-light-edge.com (backup)
    - North America: nav.us-light-edge.com (primary), nav-b.us-light-edge.com (backup)
    - Saudi Arabia: nav.sau-light-edge.com (primary), nav-b.sau-light-edge.com (backup)
* **StatisticServer**
    - Singapore: stats.sg-light-edge.com
    - Singapore B: stats.sg-b-light-edge.com
    - North America: stats.us-light-edge.com
    - Saudi Arabia: stats.sau-light-edge.com
* If your App Key belongs to another data center, check the relevant addresses on the [App Key](https://console.rongcloud.io/agile/formwork/app/appService) page in the developer console.

#### uni-app

> Only for version 5.2.4 and later.

In the SDK engine configuration, set the `naviServer` and `statisticServer` for overseas data centers:

```typescript
let options = { naviServer: 'naviServer' }
let options = { statisticServer: 'statisticServer' }
let engine = await RCIMIWEngine.create(appKey, options);

React Native

Only for version 5.2.4 and later.

In the SDK engine configuration, set the naviServer and statisticServer for overseas data centers:

let options: RCIMIWEngineOptions = {};
let options: RCIMIWEngineOptions = {naviServer: 'naviServer'};
let options: RCIMIWEngineOptions = {statisticServer: 'statisticServer'};
let engine: RCIMIWEngine = RCIMIWEngine.create(appkey, options);

Unity

Only for version 5.2.4 and later.

In the SDK engine configuration, set the naviServer and statisticServer for overseas data centers:

RCIMEngineOptions options = new RCIMEngineOptions();
options.naviServer = "naviServer";
options.statisticServer = "statisticServer";
RCIMEngine engine = RCIMEngine.create(appkey, options);

Overseas data center server API configuration

When calling the server API, use the domain based on the data center where your app was created. The domains for different data centers are as follows:

RC overseas data center domains:

Overseas access nodes

Applicable to IM and RTC signaling services.

Overseas access nodes are located in over 100 locations globally. The combination of access points in use may change without notice. Due to equipment maintenance, failures, new access point rollouts, old access point removals, and other events, the following list may not accurately reflect the current access points in use.

Many cities have multiple access points to support service demands.

North America

Ashburn, VA; Atlanta, GA; Charleston, SC; Chicago, IL; Council Bluffs, IA; Dallas/Fort Worth, TX; Denver, CO; Las Vegas, NV; Lenoir, NC; Los Angeles, CA; Miami, FL; Montreal, Quebec, Canada; New York, NY; Querétaro, Mexico; Salt Lake City, UT; San Francisco, CA; Seattle, WA; The Dalles, OR; Toronto, Ontario, Canada; Tulsa, OK

South America

Bogotá, Colombia; Buenos Aires, Argentina; Rio de Janeiro, Brazil; Santiago, Chile; São Paulo, Brazil

Europe

Amsterdam, Netherlands; Budapest, Hungary; Dublin, Ireland; Frankfurt, Germany; Groningen, Netherlands; Hamburg, Germany; Hamina, Finland; Helsinki, Finland; London, UK; Madrid, Spain; Marseille, France; Milan, Italy; Munich, Germany; Paris, France; Prague, Czech Republic; Sofia, Bulgaria; Saint-Ghislain, Belgium; Stockholm, Sweden; Warsaw, Poland; Zurich, Switzerland

Middle East

Fujairah, UAE; Muscat, Oman

Asia-Pacific

Changhua County, Taiwan; Chennai, India; Hong Kong SAR, China; Jakarta, Indonesia; Kuala Lumpur, Malaysia; Mumbai, India; Delhi, India; Osaka, Japan; Seoul, South Korea; Singapore; Taipei, Taiwan; Tokyo, Japan

Oceania

Sydney, Australia; Melbourne, Australia

Africa

Johannesburg, South Africa; Lagos, Nigeria; Mombasa, Kenya

Security and compliance

Before going global, apps must comply with local data protection laws to ensure data compliance and avoid legal risks. RC IM provides overseas data centers for selection, ensuring data does not return to China. Your business data is stored in the data center chosen when creating the app, and each data center supports global access.

Includes but is not limited to the following data:

  • User profiles (e.g., nickname, avatar fields)
  • Group-related (group name, group members)
  • Message-related (text, images, videos, voice, files, custom messages)