ossfs lets you mount an Object Storage Service (OSS) bucket to a Linux directory. Your applications can then read and write OSS objects using standard file system operations — open, read, write, and list — without any code changes. ossfs translates these operations into OSS API calls automatically.
When to use ossfs 2.0
ossfs 2.0 is a good fit if your application:
Runs AI training, inference, or autonomous driving simulation workloads
Needs high read throughput to large objects stored in OSS
Cannot use an OSS SDK or the OSS Connector for AI/ML directly
ossfs 2.0 is not the right fit if your application:
Requires broad POSIX semantics (for example, file locking, hard links, or directory rename) — use ossfs 1.0 instead
Does not have high throughput requirements and needs general-purpose file access — ossfs 1.0 is better suited
If your application can use an OSS SDK or the OSS Connector for AI/ML, prefer those over ossfs for better performance.
Prerequisites
Before you begin, ensure that you have:
An Alibaba Cloud account (register here)You have registered an Alibaba Cloud account
An OSS bucket (activate OSS and create a bucket)
Supported operating environments
ossfs 2.0 uses Filesystem in Userspace (FUSE).
| Architecture | Operating system | Supported versions |
|---|---|---|
| x86_64 | CentOS | CentOS 7, CentOS 8 |
| x86_64 | Alibaba Cloud Linux | Alibaba Cloud Linux 2, Alibaba Cloud Linux 3 |
| x86_64 | Ubuntu | Ubuntu 20.04 LTS and later LTS versions |
| x86_64 | Debian | Debian 11 and later |
| aarch64 | Alibaba Cloud Linux | Alibaba Cloud Linux 3 |
Step 1: Install ossfs 2.0
Select the instructions for your operating system.
Alibaba Cloud Linux and CentOS
x86_64
Download the installation package.
sudo wget https://gosspublic.alicdn.com/ossfs/ossfs2_2.0.5_linux_x86_64.rpmInstall ossfs 2.0.
sudo yum install ossfs2_2.0.5_linux_x86_64.rpm -y
aarch64 (Alibaba Cloud Linux only)
Download the installation package.
sudo wget https://gosspublic.alicdn.com/ossfs/ossfs2_2.0.5_linux_aarch64.rpmInstall ossfs 2.0.
sudo yum install ossfs2_2.0.5_linux_aarch64.rpm -y
Ubuntu
Download the installation package.
sudo wget https://gosspublic.alicdn.com/ossfs/ossfs2_2.0.5_linux_x86_64.debInstall ossfs 2.0.
sudo dpkg -i ossfs2_2.0.5_linux_x86_64.deb
Verify the installation
Run the following command on any supported distribution to confirm ossfs 2.0 is installed:
ossfs2 --versionExpected output:
Version ID: 2.0.5
Commit ID: 08539976558311f7a8f5282c30d94198d48c125c
Build Time: 2025-12-19.01:50:42.UTCThe ossfs2 executable is installed at/usr/local/bin/ossfs2. If yourPATHdoes not include that directory, run the command using its absolute path:/usr/local/bin/ossfs2.
Step 2: Configure credentials and bucket settings
ossfs 2.0 reads its settings from a configuration file. The file stores the bucket name, endpoint, and access mode.
Get an AccessKey pair
Create an AccessKey pair for a Resource Access Management (RAM) user that has OSS management permissions.
Set credentials as environment variables
export OSS_ACCESS_KEY_ID=LTAI******************
export OSS_ACCESS_KEY_SECRET=8CE4**********************Create the configuration file
Create the configuration file.
sudo touch /etc/ossfs2.confChoose an access mode for your bucket:
Mode Description When to use Read-only Write operations are rejected Model inference or any workload that only reads data Read/write Both reads and writes are allowed Applications that write output back to OSS Open
/etc/ossfs2.confand add the bucket settings. Replace the placeholder values with your bucket name and endpoint. Read-only mode:To find the endpoint for your bucket, go to the Buckets page, select the bucket, click Overview in the left navigation pane, and look in the Port section. Use an internal or OSS accelerator endpoint rather than a public endpoint — public endpoints introduce higher latency and can cause stuttering.

# Endpoint of the region where the bucket is located --oss_endpoint=https://oss-cn-hangzhou-internal.aliyuncs.com # Bucket name --oss_bucket=<your-bucket-name> # Mount in read-only mode --ro=trueRead/write mode: use the same configuration but omit the
--ro=trueline.
Step 3: Mount and access the bucket
Create a mount directory.
mkdir /tmp/ossfs2-bucketMount the bucket.
ossfs2 mount /tmp/ossfs2-bucket/ -c /etc/ossfs2.confVerify the mount. List the objects in the bucket:
sudo ls -lh /tmp/ossfs2-bucket/
When you no longer need the mounted bucket, unmount it.
sudo umount /tmp/ossfs2-bucket/
Next steps
ossfs 2.0 overview — architecture details and feature comparison
Configure ossfs 2.0 — full list of configuration options
Mount options for ossfs 2.0 — all mount flags and their defaults
Mount a bucket to a local system using ossfs 2.0 — advanced mounting scenarios

