Skip to content

fix(backup): AWS S3 regional namespace buckets - #1434

Merged
DavidePrincipi merged 2 commits into
mainfrom
bug-8241
Dec 2, 2026
Merged

DavidePrincipi merged 2 commits into
mainfrom
bug-8241

Conversation

@DavidePrincipi

Copy link
Copy Markdown
Member

Amazon S3 backup destinations cannot be added when the bucket is in the new AWS "account regional namespace" (the AWS console default since March 2026), or when the access key is not allowed to create buckets. When the check fails, the real error from rclone (the tool that checks the destination) is lost, so the problem is hard to troubleshoot. NethServer/dev#8241

New and edited Amazon S3 destinations now use the regional endpoint built from the region field, and expect the bucket to already exist. Existing destinations are not changed. Rclone error messages are now visible in the task log, in the system logs, and on the terminal.

  • Amazon S3: the endpoint is s3.<region>.amazonaws.com instead of s3.amazonaws.com, and no_check_bucket = true is set, as already done for Synology and IDrive.
  • The rclone image no longer sets RCLONE_LOG_SYSTEMD=1: it sent every message to the journald socket, which is not available inside the rclone-gateway container, so they were silently dropped. Rclone now writes to stderr, as it did in the former rclone-webdav service.
  • The destination check copies rclone errors to the task log, and checks write access by writing and removing a small temporary file, instead of a directory that does not really exist on object storage.

How to test

  • In the AWS console, create a bucket in the "account regional namespace", in a region other than us-east-1, and an access key for a user that can read, write and delete objects in it, but cannot create buckets.
  • Add an "Amazon S3" backup destination with that bucket, region and key: it is added, and a backup to it succeeds.
  • Add a destination with a wrong secret key: the check fails, and the task log shows the AWS error returned by rclone.
  • Run podman exec rclone-gateway rclone lsd <destination-id>: on a node: errors are printed on the terminal. Gateway messages appear with journalctl -t rclone-gateway.
  • Existing destinations of any provider keep working after the core update.

See also


Generated by Claude Code:claude-opus-5-5 with nethserver-pr

The Amazon S3 destination always used the global endpoint. Buckets
created in the "account regional namespace", the AWS console default
since March 2026, are reachable only through the regional endpoint
outside us-east-1, so the destination check failed with a permission
error.

Build the endpoint from the region field. Also set no_check_bucket,
like the Synology and IDrive settings: the bucket must exist, and the
access key no longer needs the permission to create buckets.

Existing destination configurations are not changed: the new settings
apply when a destination is added or edited, after validation.

Assisted-by: Claude Code:claude-opus-5-5
Rclone messages were lost: the image enabled systemd logging, which
writes to the journald socket, but that socket is not available in
the rclone-gateway container. Messages of the gateway, of the
destination check, and of rclone run by hand with podman exec were
silently dropped. Without that setting rclone writes to stderr, as it
did in the former rclone-webdav service.

The destination check now copies the rclone error messages to the
task log.

Write access was checked by creating and removing a directory, but
directories do not really exist on object storage, so the check could
pass without writing anything. Write and remove a small temporary
file instead.

Assisted-by: Claude Code:claude-opus-5-5
@DavidePrincipi DavidePrincipi self-assigned this Dec 1, 2026
@DavidePrincipi
DavidePrincipi merged commit a26731a into main Dec 2, 2026
4 checks passed
@DavidePrincipi
DavidePrincipi deleted the bug-8241 branch December 2, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants