# Creating a Supabase Instance

1. In the console, navigate to "Cloud Database UDB PostgreSQL" > "Supabase Management" and click "Create Supabase."

2. On the creation page, select the region and availability zone.

3. Configure the Supabase password and port. The Dashboard username is fixed as Supabase.

4. Configure PostgreSQL. Click "Modify" next to the database version to change the version and configuration file; click "Modify" below the database port field to update the database port.

5. Configure the network by selecting the required VPC and subnet.

6. Enter the Supabase instance name.

7. Review all configuration details and the associated cost, then confirm and complete payment.

8. After payment, the page redirects to the Supabase Management page. The instance will enter an initializing state and will be ready to use once initialization is complete.

9. On the Supabase Management page, select an instance and click "Details" to view its detailed information.

# Configuring External Network Access

1. On the instance details page, enable external network access. The Supabase service will restart when external access is enabled, and access will take effect after the restart completes.

2. External network access supports different billing methods. Select bandwidth-based billing or traffic-based billing as needed, and adjust the bandwidth limit. Complete payment and wait for Supabase to restart, after which external network access will be available. (Traffic-based billing is postpaid.)

3. SSL encrypted connections are supported. To disable SSL, you must first disable external network access.

4. Configure the allowlist. After external network access is enabled, the allowlist is empty by default and Supabase cannot be accessed. Add the allowed IP addresses or CIDR ranges to the allowlist to enable access.

# Configuring S3 Storage

1. On the Supabase instance details page, click "Storage Configuration" to update the settings. After submitting the changes, the Supabase service will restart and the configuration will take effect after the restart.

Configuration parameters:

- **AWS_ACCESS_KEY_ID**: The S3 storage public key, corresponding to the public key in US3 token management.
- **AWS_SECRET_ACCESS_KEY**: The S3 storage private key, corresponding to the private key in US3 token management.
- **FILE_SIZE_LIMIT**: The file size limit for uploads, in bytes.
- **GLOBAL_S3_BUCKET**: The name of the primary bucket for storing all files. Supabase organizes data within this bucket using a specific path structure.
- **GLOBAL_S3_ENDPOINT**: The S3 storage access domain. An AWS S3-compatible endpoint must be used. For US3 endpoints, refer to the [US3 documentation](/docs/ufile/introduction/region).
- **REGION**: The geographic region of the S3 bucket. For region names, refer to the [region list documentation](/docs/api/summary/get_project_list).
- **S3_PROTOCOL_ACCESS_KEY_ID**: The access key ID used when S3 protocol mode is enabled.
- **S3_PROTOCOL_ACCESS_KEY_SECRET**: The secret key corresponding to S3 protocol mode.
- **S3_PROTOCOL_ENABLED**: A boolean value (true/false). When enabled, Supabase allows communication via S3-compatible mode, rather than being limited to the standard AWS environment.
- **TENANT_ID**: The tenant ID.

# Third-Party Login

Supabase provides a unified user authentication system with built-in support for popular third-party login methods such as WeChat, Alipay, GitHub, and Apple. These methods can be connected with a single click, eliminating the cost of multi-platform integration and debugging, significantly reducing development effort and accelerating product launch.

## Prerequisites

1. External network access must be enabled for the Supabase instance before you can use third-party login.

<!-- image-todo -->

2. To use third-party login, configure the URL first, including the business URL and redirect URL, and configure or edit the authentication provider credentials. All enable/disable and edit actions on this page take effect only after the Supabase instance is restarted. The restart takes about 1 minute, so perform this operation during periods of low traffic.

## Procedure

1. Ensure that the Supabase instance has external network access enabled and that its status is Running.

2. Configure the business URL.

<!-- image-todo -->

3. Configure the authentication provider credentials. Obtain the OAuth credentials as prompted based on the login method required by your business. Using Alipay login as an example, enable the Alipay login button, paste the callback URL into the Alipay Open Platform developer settings, and then fill in the APP ID, Private Key, and Alipay Public Key provided by Alipay. This step only saves the configuration.

<!-- image-todo -->

4. After changing the URL and OAuth credential configuration, manually restart the Supabase instance for the changes to take effect. After confirming that the configuration is successfully enabled, test the configuration in the business environment to verify that it is correct.

<!-- image-todo -->

5. After successful configuration, end users can click Alipay login on the page and log in after authorization.

<!-- image-todo -->
