Configure the network for a Dify instance

Updated at:

Enable private and public endpoints for a Dify instance to make it accessible over your internal network or the internet, then restrict access using an IP whitelist.

Prerequisites

Before you begin, ensure that you have:

Limitations

  • Private and public endpoints must be enabled at the same time. You cannot enable one without the other.

  • Once enabled, endpoints cannot be manually disabled. They are released automatically when you release the Dify instance resources.

  • The vSwitch you select for the standby zone must be in a different zone from the Dify instance.

Enable endpoints

During one-click deployment

During a one-click deployment, turn on the Private and Public Network Access Address switch, then complete the deployment.

image

For an existing instance

Prerequisite: A Dify instance is already deployed. For deployment instructions, see One-click deployment or Manual deployment.

  1. Log on to the .

  2. Go to the Workspace Management page using one of the following methods:

    Method 1

    Move the pointer over the 2023-01-28_15-57-17.png icon in the upper-left corner, then choose All Features > Data+AI > Dify.

    Note

    In normal mode, choose Data+AI > Dify in the top navigation bar.

    image

    Method 2

    In the left-side navigation pane, click the image icon, then click Workspace.

    Note

    In normal mode, choose Digital Intelligence Factory > Workspace in the top navigation bar.

  3. Click the target workspace name.

  4. In the navigation pane on the left, choose image > Dify Resources.

    screenshot_2025-08-20_10-21-43

  5. In the Basic Configuration section, click Activate the intranet/public address of the instance next to Instance intranet address.

  6. In the dialog box, select a Standby zone and switch, then click Confirm.

    image

  7. Wait for the endpoints to be enabled.

    After the endpoints are enabled, the private and public endpoints appear in the Basic Configuration section.

    To access the Dify instance, configure an IP whitelist as described in the next section.

    image

Configure an IP whitelist

After endpoints are enabled, configure an IP whitelist to control which IP addresses can reach the Dify instance.

Entry format

When adding multiple entries in bulk, use the following format:

<IP address or CIDR block>|<description>

Example: 192.168.1.0/24|Office network

Enter one entry per line. Press Enter to start a new line.

Add whitelist entries

  1. In the Basic Configuration section, click Configure Whitelist next to Instance intranet address or Public network address of the instance.

  2. On the page that appears, add entries using one of the following methods:

    • Add a single entry: Click Add Entry. In the dialog box, enter an IP Address/CIDR Block and a Remarks, and then click Add.

    • Bulk add entries: Click Add ACL Entries and enter the entries in the following format:

      • Enter one entry per line. Press the Enter key to start a new line.

      • Separate the IP address or CIDR block from its description with a vertical bar (|). For example, 192.168.1.0/24|description.

  3. The Dify instance is now accessible from the IP addresses or CIDR blocks you added.