Use S4 with Rclone
Rclone is a command-line sync tool for Windows, macOS, and Linux. It suits bulk uploads, backups, cross-cloud migration, and mounting.
Prerequisites
- You have created a bucket. Sub-users cannot create buckets, and
rclone mkdirfor a new bucket returns 403; - You have created a sub-user and AccessKey and granted it read, write, and list permissions on the bucket.
Install
winget install Rclone.Rclonebrew install rclonecurl https://rclone.org/install.sh | sudo bashOn Windows, run the commands in PowerShell and replace D:\ in the examples with your own directory.
Configure
Run rclone config file to find the configuration file location, and write the following content:
[s4]
type = s3
provider = Other
env_auth = false
access_key_id = Your AccessKey
secret_access_key = Your SecretKey
endpoint = https://s3.bitiful.net
region = cn-east-1
list_version = 2
no_check_bucket = true| Setting | Notes |
|---|---|
endpoint, region | Fixed to the values above |
list_version = 2 | Use ListObjectsV2 |
no_check_bucket = true | Do not check or create the bucket before uploading. Sub-users have no permission to create buckets, so this is required |
Or create it with one command:
rclone.exe config create s4 s3 provider=Other env_auth=false access_key_id="Your AccessKey" secret_access_key="Your SecretKey" endpoint=https://s3.bitiful.net region=cn-east-1 list_version=2 no_check_bucket=truerclone config create s4 s3 provider=Other env_auth=false access_key_id="Your AccessKey" secret_access_key="Your SecretKey" endpoint=https://s3.bitiful.net region=cn-east-1 list_version=2 no_check_bucket=truerclone config create s4 s3 provider=Other env_auth=false access_key_id="Your AccessKey" secret_access_key="Your SecretKey" endpoint=https://s3.bitiful.net region=cn-east-1 list_version=2 no_check_bucket=trueVerify the configuration by listing the bucket contents:
rclone.exe lsf s4:my-bucketrclone lsf s4:my-bucketrclone lsf s4:my-bucketKeys in the configuration file are not encrypted. On shared machines, set a configuration password with rclone config, or use the environment variables RCLONE_CONFIG_S4_ACCESS_KEY_ID and RCLONE_CONFIG_S4_SECRET_ACCESS_KEY.
Upload and download
# Upload a single file to a directory
rclone.exe copy D:\logo.png s4:my-bucket/images/
# Upload a directory, showing progress
rclone.exe copy D:\documents s4:my-bucket/documents -P
# Set the browser cache time
rclone.exe copy D:\assets s4:my-bucket/assets --header-upload "Cache-Control: max-age=31536000"
# Back up a database and upload it
mysqldump.exe mydb --result-file=D:\backup\mydb.sql
rclone.exe copy D:\backup\mydb.sql s4:my-bucket/backup/
# Download
rclone.exe copy s4:my-bucket/images/logo.png D:\# Upload a single file to a directory
rclone copy ./logo.png s4:my-bucket/images/
# Upload a directory, showing progress
rclone copy ./documents s4:my-bucket/documents -P
# Set the browser cache time
rclone copy ./assets s4:my-bucket/assets --header-upload "Cache-Control: max-age=31536000"
# Write command output directly to an object
mysqldump mydb | gzip | rclone rcat s4:my-bucket/backup/mydb.sql.gz
# Download
rclone copy s4:my-bucket/images/logo.png ./# Upload a single file to a directory
rclone copy ./logo.png s4:my-bucket/images/
# Upload a directory, showing progress
rclone copy ./documents s4:my-bucket/documents -P
# Set the browser cache time
rclone copy ./assets s4:my-bucket/assets --header-upload "Cache-Control: max-age=31536000"
# Write command output directly to an object
mysqldump mydb | gzip | rclone rcat s4:my-bucket/backup/mydb.sql.gz
# Download
rclone copy s4:my-bucket/images/logo.png ./copy only transfers new and changed files, so you can run it repeatedly.
View and manage
rclone.exe lsf s4:my-bucket/images # List file names
rclone.exe lsl s4:my-bucket/images # List sizes and times
rclone.exe tree s4:my-bucket/images # Show as a tree
rclone.exe size s4:my-bucket/documents # Count objects and total size
rclone.exe cat s4:my-bucket/notes/todo.txt # View contents
rclone.exe moveto s4:my-bucket/a.txt s4:my-bucket/b.txt # Rename
rclone.exe delete s4:my-bucket/tmp --min-age 30d # Delete files older than 30 days
rclone.exe purge s4:my-bucket/tmp # Delete a whole directory, cannot be undone
rclone.exe link s4:my-bucket/images/logo.png --expire 1h # Temporary download link, up to 7 daysrclone lsf s4:my-bucket/images # List file names
rclone lsl s4:my-bucket/images # List sizes and times
rclone tree s4:my-bucket/images # Show as a tree
rclone size s4:my-bucket/documents # Count objects and total size
rclone cat s4:my-bucket/notes/todo.txt # View contents
rclone moveto s4:my-bucket/a.txt s4:my-bucket/b.txt # Rename
rclone delete s4:my-bucket/tmp --min-age 30d # Delete files older than 30 days
rclone purge s4:my-bucket/tmp # Delete a whole directory, cannot be undone
rclone link s4:my-bucket/images/logo.png --expire 1h # Temporary download link, up to 7 daysrclone lsf s4:my-bucket/images # List file names
rclone lsl s4:my-bucket/images # List sizes and times
rclone tree s4:my-bucket/images # Show as a tree
rclone size s4:my-bucket/documents # Count objects and total size
rclone cat s4:my-bucket/notes/todo.txt # View contents
rclone moveto s4:my-bucket/a.txt s4:my-bucket/b.txt # Rename
rclone delete s4:my-bucket/tmp --min-age 30d # Delete files older than 30 days
rclone purge s4:my-bucket/tmp # Delete a whole directory, cannot be undone
rclone link s4:my-bucket/images/logo.png --expire 1h # Temporary download link, up to 7 daysmoveto copies and then deletes. For large files, use S4's native move.
Sync
# Dry run first, without making any changes
rclone.exe sync D:\site s4:my-bucket/site --dry-run
# Make the destination identical to the source; extra files in the destination are deleted
rclone.exe sync D:\site s4:my-bucket/site -P# Dry run first, without making any changes
rclone sync ./site s4:my-bucket/site --dry-run
# Make the destination identical to the source; extra files in the destination are deleted
rclone sync ./site s4:my-bucket/site -P# Dry run first, without making any changes
rclone sync ./site s4:my-bucket/site --dry-run
# Make the destination identical to the source; extra files in the destination are deleted
rclone sync ./site s4:my-bucket/site -Psync deletes files in the destination that are not in the source, and S4 has no recycle bin. When in doubt, use copy, or add --dry-run first.
Keep a backup of deleted and overwritten files:
rclone.exe sync D:\site s4:my-bucket/site --backup-dir s4:my-bucket/site-old/2026-11-25rclone sync ./site s4:my-bucket/site --backup-dir s4:my-bucket/site-old/2026-11-25rclone sync ./site s4:my-bucket/site --backup-dir s4:my-bucket/site-old/2026-11-25Exclude some files:
rclone.exe sync D:\project s4:my-bucket/project --exclude "node_modules/**" --exclude "*.tmp"rclone sync ./project s4:my-bucket/project --exclude "node_modules/**" --exclude "*.tmp"rclone sync ./project s4:my-bucket/project --exclude "node_modules/**" --exclude "*.tmp"Scheduled backups
Run an incremental backup at 3:00 every day. Do not start a new run before the previous one finishes.
Create a task in Task Scheduler: set the trigger to Daily at 3:00 and the action to Start a program. Enter the full path of rclone.exe (find it with where.exe rclone) as the program and the following as arguments:
copy D:\data s4:my-bucket/backup --log-file=D:\rclone-backup.log --log-level INFOOn the Settings tab, set If the task is already running to Do not start a new instance.
crontab -e0 3 * * * /opt/homebrew/bin/rclone copy /Users/username/data s4:my-bucket/backup --log-file=/Users/username/rclone-backup.log --log-level INFOFind the path of Rclone with which rclone. To back up folders such as Documents and Desktop, give cron Full Disk Access in System Settings.
crontab -e0 3 * * * /usr/bin/rclone copy /data s4:my-bucket/backup --log-file=/var/log/rclone-backup.log --log-level INFOWrap the command with flock to avoid overlapping runs.
Verify
# Compare sizes and checksums
rclone.exe check D:\documents s4:my-bucket/documents
# Download and compare byte by byte, which generates download traffic
rclone.exe check D:\documents s4:my-bucket/documents --download# Compare sizes and checksums
rclone check ./documents s4:my-bucket/documents
# Download and compare byte by byte, which generates download traffic
rclone check ./documents s4:my-bucket/documents --download# Compare sizes and checksums
rclone check ./documents s4:my-bucket/documents
# Download and compare byte by byte, which generates download traffic
rclone check ./documents s4:my-bucket/documents --downloadMany files and large files
# Many small files: increase concurrency
rclone.exe copy D:\data s4:my-bucket/data -P --transfers 32 --checkers 32 --fast-list
# Large files: increase the chunk size and per-file concurrency
rclone.exe copy D:\video.mp4 s4:my-bucket/videos/ -P --s3-chunk-size 64M --s3-upload-concurrency 8# Many small files: increase concurrency
rclone copy ./data s4:my-bucket/data -P --transfers 32 --checkers 32 --fast-list
# Large files: increase the chunk size and per-file concurrency
rclone copy ./video.mp4 s4:my-bucket/videos/ -P --s3-chunk-size 64M --s3-upload-concurrency 8# Many small files: increase concurrency
rclone copy ./data s4:my-bucket/data -P --transfers 32 --checkers 32 --fast-list
# Large files: increase the chunk size and per-file concurrency
rclone copy ./video.mp4 s4:my-bucket/videos/ -P --s3-chunk-size 64M --s3-upload-concurrency 8Memory usage is about --transfers × --s3-upload-concurrency × --s3-chunk-size. Excessive concurrency triggers the QPS limit. When you see 429, lower --transfers, or add --tpslimit 100.
Interrupted multipart uploads occupy space. Clean up those older than 24 hours:
rclone.exe backend list-multipart-uploads s4:my-bucket
rclone.exe cleanup s4:my-bucketrclone backend list-multipart-uploads s4:my-bucket
rclone cleanup s4:my-bucketrclone backend list-multipart-uploads s4:my-bucket
rclone cleanup s4:my-bucketMigrate from other clouds
Add another remote to the configuration file, for example Alibaba Cloud OSS:
[oss]
type = s3
provider = Alibaba
access_key_id = Source AccessKey
secret_access_key = Source SecretKey
endpoint = oss-cn-hangzhou.aliyuncs.comThen copy directly between the two clouds and verify when finished:
rclone.exe copy oss:old-bucket s4:my-bucket -P --transfers 16
rclone.exe check oss:old-bucket s4:my-bucket --size-onlyrclone copy oss:old-bucket s4:my-bucket -P --transfers 16
rclone check oss:old-bucket s4:my-bucket --size-onlyrclone copy oss:old-bucket s4:my-bucket -P --transfers 16
rclone check oss:old-bucket s4:my-bucket --size-onlyThe data passes through the machine running Rclone, and the source provider may charge for outbound internet traffic. With many files, run it on a cloud server. To migrate without interrupting your service, combine it with mirror back-to-origin.
Client-side encryption
Encrypt file names and contents locally before uploading, so S4 only stores ciphertext:
rclone.exe config create s4crypt crypt remote=s4:my-bucket/encrypted password=$(rclone.exe obscure "your encryption password")
rclone.exe copy D:\private s4crypt:
rclone.exe lsf s4crypt:rclone config create s4crypt crypt remote=s4:my-bucket/encrypted password=$(rclone obscure "your encryption password")
rclone copy ./private s4crypt:
rclone lsf s4crypt:rclone config create s4crypt crypt remote=s4:my-bucket/encrypted password=$(rclone obscure "your encryption password")
rclone copy ./private s4crypt:
rclone lsf s4crypt:If you look at s4:my-bucket/encrypted directly, file names and contents are unreadable.
If you lose the password, the data cannot be recovered. Encrypted files cannot be previewed in the console, processed as images, or served directly by the CDN.
Mount as a local directory
Linux requires fuse3, macOS requires macFUSE, and Windows requires WinFsp.
rclone.exe mount s4:my-bucket S: --vfs-cache-mode full --vfs-cache-max-size 10G --vfs-cache-max-age 24h --vfs-read-chunk-size 16M --vfs-read-chunk-size-limit 256M --dir-cache-time 1mRclone runs in the foreground, so keep the window open. To unmount, press Ctrl+C in the window.
mkdir -p ~/s4
rclone mount s4:my-bucket ~/s4 \
--daemon \
--vfs-cache-mode full \
--vfs-cache-max-size 10G \
--vfs-cache-max-age 24h \
--vfs-read-chunk-size 16M \
--vfs-read-chunk-size-limit 256M \
--dir-cache-time 1m \
--log-file ~/rclone.logUnmount:
umount ~/s4mkdir -p ~/s4
rclone mount s4:my-bucket ~/s4 \
--daemon \
--vfs-cache-mode full \
--vfs-cache-max-size 10G \
--vfs-cache-max-age 24h \
--vfs-read-chunk-size 16M \
--vfs-read-chunk-size-limit 256M \
--dir-cache-time 1m \
--log-file ~/rclone.logUnmount:
fusermount3 -u ~/s4Mounting suits browsing and sequential reads and writes, but not programs such as databases that need random writes or file locks. Writes go to the local cache first and are uploaded in the background, so make sure uploads have finished before you shut down. For Bitiful's official mounting tool, see Bitifs.
Serve over WebDAV
Let software that only supports WebDAV (notes, media players, NAS sync, and so on) use S4:
rclone.exe serve webdav s4:my-bucket --addr 127.0.0.1:8080 --user demo --pass your-password --vfs-cache-mode writesrclone serve webdav s4:my-bucket --addr 127.0.0.1:8080 --user demo --pass your-password --vfs-cache-mode writesrclone serve webdav s4:my-bucket --addr 127.0.0.1:8080 --user demo --pass your-password --vfs-cache-mode writesIf you expose it to the internet, put it behind an HTTPS reverse proxy.
FAQ
403 AccessDenied
Check the sub-user grants. If only a directory is granted, point the path to the granted directory, for example s4:my-bucket/images, and do not operate on the bucket root.
Uploading reports no permission to create the bucket
no_check_bucket = true is missing from the configuration.
Why are there requests when only the modification time changed?
Rclone updates the modification time stored with the object without re-uploading the content. If you don't need to keep modification times, use --checksum to compare by size and checksum, --size-only to compare by size only, or add --no-update-modtime.
rclone about is not supported
Object storage has no total capacity. Use rclone size to check used capacity, or see Usage statistics in the console.