Rclone Serve S3 does not list files in a sorted order

What is the problem you are having with rclone?

The rclone serve s3 feature serves an S3 server and it’s not compatible with the official aws s3 sync cli utility. The root cause is because ListObjects operation does not return a sorted list of objects (it’s sorted by mod time, not object names). The official aws s3 sync command assumes a sorted list by name returned by the API when it processes src and dest iterators (src). When used with a custom S3 backend served by rclone, the aws s3 sync command mistakenly identifies missing files at the destination and redownload already up-to-date files.

Run the command 'rclone version' and share the full output of the command.

rclone v1.72.0
- os/version: alpine 3.22.2 (64 bit)
- os/kernel: 5.15.0-69-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.25.4
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Amazon AWS S3

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone serve s3 mirror-server:

The rclone config contents with secrets removed.

[mirror-server]
type = s3
provider = AWS
access_key_id = [redacted]
secret_access_key = [redacted]
region = us-west-2

A log from the command with the -vv flag

2025/11/28 19:07:56 NOTICE: S3 root: Starting s3 server on [https://[::]:8080/]
2025/11/28 19:08:01 DEBUG : serve s3: LIST BUCKET
2025/11/28 19:08:01 DEBUG : serve s3: bucketname: [redacted] prefix: prefix:"[redacted]" page: {Marker: HasMarker:false MaxKeys:1000}

I'd say this is a bug. Can you report in on GitHub please? Thank you

Issue reported in Github. Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.