All Products
Search
Document Center

Object Storage Service:Mount over a private network by using PrivateLink

Last Updated:Mar 20, 2026

After you create a PrivateLink endpoint for OSS in a virtual private cloud (VPC), use ossfs 1.0 to mount a bucket over the private network. Compared to the public internet, a PrivateLink connection is more secure and stable.

Prerequisites

Before you begin, ensure that you have:

  • Created a PrivateLink endpoint for OSS in your VPC. See Access OSS resources through the private network

  • Installed ossfs 1.0 version 1.91.1 or later (version 1.91.1 is the minimum version that supports the -ouse_path_request_style parameter)

Mount a bucket over a private network

  1. Get your endpoint domain name from the PrivateLink console. On the Endpoints page, find the endpoint you created for OSS and copy the endpoint domain name. It follows the format:

    ep-<endpoint-id>.oss.<region-id>.privatelink.aliyuncs.com
  2. Run the mount command with the endpoint domain name:

    ossfs <bucket-name> <mount-point> \
      -ourl=<endpoint-domain-name> \
      -ouse_path_request_style \
      -osigv4 \
      -oregion=<region-id>

    Replace the placeholders with your values:

    PlaceholderDescriptionExample
    <bucket-name>Name of the OSS bucket to mountexamplebucket
    <mount-point>Local directory to use as the mount point/mnt/oss
    <endpoint-domain-name>Endpoint domain name from the PrivateLink consoleep-bp1a****.oss.cn-hangzhou.privatelink.aliyuncs.com
    <region-id>Region where the bucket is locatedcn-hangzhou

    Parameter descriptions:

    ParameterDescription
    -ourlSets the endpoint URL that ossfs uses to connect to OSS. Set this to your PrivateLink endpoint domain name, not the standard OSS endpoint.
    -ouse_path_request_styleSwitches ossfs to path-style URL mode, required for PrivateLink endpoints.
    -osigv4Enables SigV4 (Signature Version 4) request signing.
    -oregionSpecifies the region for SigV4 signing.
  3. Verify the mount succeeded:

    df -h | grep <mount-point>

    If the bucket is mounted, the output shows the mount point and available space.

Example: The following command mounts examplebucket in the China (Hangzhou) region using ossfs 1.91.6:

ossfs examplebucket /mnt/oss \
  -ourl=ep-bp1a****.oss.cn-hangzhou.privatelink.aliyuncs.com \
  -ouse_path_request_style \
  -osigv4 \
  -oregion=cn-hangzhou

What's next