Skip to content

S3 Compatible Object Storage backends

SFTPGo can use any S3-compatible object storage service as a storage backend, including AWS S3, Wasabi, Backblaze B2, and others.

For concrete configuration examples against specific providers — Cloudflare R2, Backblaze B2, MinIO, Ceph, Wasabi, Hetzner, Scaleway, OVHcloud, DigitalOcean Spaces, Oracle OCI, Alibaba OSS, IBM COS, SeaweedFS, Storj, and more — see S3-compatible services.

Authentication

SFTPGo supports multiple credential methods:

  1. Access Keys — Provide an Access Key ID and Secret Access Key directly.
  2. IAM Roles for EC2 — Assign an IAM role to the EC2 instance running SFTPGo.
  3. IAM Roles for ECS — Use IAM roles attached to ECS task definitions.
  4. IAM Roles for Service Accounts (IRSA) — For SFTPGo running on AWS EKS.
  5. Assume Role — Specify an IAM Role ARN to assume via STS, optionally with a session token for temporary credentials.

To use options 2–4, leave the access keys blank — SFTPGo will use the AWS SDK's default credential chain. To use option 5, set the Role ARN field (and optionally a session token).

Configuration

Parameter Description
Bucket Required. The S3 bucket to use. Must already exist.
Region AWS region (e.g., eu-central-1). Required unless an endpoint is specified. See the list of available regions.
Access Key / Access Secret AWS credentials. Leave both blank to use IAM roles or the default credential chain.
Role ARN IAM Role ARN to assume via STS. When set, overrides explicit access keys.
Session Token Optional temporary session token (for STS-based credentials).
Endpoint Custom endpoint URL (required for S3-compatible services). Must include the protocol (e.g., https://s3.example.com:9000).
Key prefix Optional. Restricts the user to a "folder" within the bucket. Each user can only access objects under their assigned prefix. The prefix does not need to exist beforehand. It is normalized when saved: a leading / is removed, a trailing / is added, and ./.. segments are resolved; a non-empty value that resolves to the bucket root is not allowed.
Storage class S3 storage class for uploaded objects (e.g., STANDARD, GLACIER). Leave blank for the default.
ACL Canned ACL to apply to uploaded objects. Leave blank for the default.
Force path style Use path-style addressing (http://s3.amazonaws.com/BUCKET/KEY) instead of virtual-hosted style. Required for some S3-compatible services.
SSE Customer Key Customer-provided key for server-side encryption (SSE-C). When set, all objects are encrypted/decrypted using this key. The key is stored encrypted according to your KMS configuration. It must be high-entropy random key material — see generating a strong secret — and is validated against common.secret_min_entropy. ⚠ Keep a safe backup of this key: if it is lost, objects encrypted with it cannot be decrypted, by SFTPGo or by AWS.
Skip TLS verify Accept any TLS certificate. ⚠ Only for testing — susceptible to man-in-the-middle attacks.
Checksum algorithm Optional. One of CRC32, CRC32C, CRC64NVME, SHA1, SHA256. When set, the AWS SDK computes the checksum and sends it with PutObject, multipart upload parts, and CopyObject so S3 can verify payload integrity on upload. Required if Object Lock is enabled on the bucket: uploads to an Object Lock-protected bucket must include a checksum, otherwise they are rejected. The same requirement applies to S3-compatible services that implement Object Lock. Leave empty otherwise for maximum compatibility with S3-compatible services that do not support all algorithms.

Multipart upload and download tuning

SFTPGo uses multipart uploads and parallel downloads for transferring files to/from S3.

Parameter Default Range Description
Upload part size 5 MB 5–2000 MB Size of each part in a multipart upload.
Upload concurrency 5 0–64 Number of parts uploaded in parallel.
Upload part max time 0 (no limit) — Maximum seconds to upload a single part.
Download part size 5 MB 1–2000 MB Size of each part in a parallel download.
Download concurrency 5 0–64 Number of parts downloaded in parallel.
Download part max time 0 (no limit) — Maximum seconds to download a single part.

ℹ If the upload bandwidth between the client and SFTPGo is greater than the bandwidth between SFTPGo and S3, the client may need to wait for the final parts to be uploaded after finishing its transfer, potentially causing a timeout. Adjust part size and concurrency accordingly.

Concurrent changes

Uploads to AWS S3 are conditional: an upload fails if, while it is in progress, another session or another SFTPGo instance creates, replaces or removes the target file. The file is then left as the other change made it. Without this check the last upload to complete would win. Server-side copies are conditional too: a copy fails if the target was created or replaced, or the source replaced, after SFTPGo read them. A rename is a copy followed by the removal of the source: the copy is conditional, the removal is not, see Limitations.

On S3-compatible services uploads and copies are not conditional by default and the last change wins: some services ignore the conditional requests, others reject valid ones and every overwrite would fail. Set SFTPGO_HOOK__S3_CONDITIONAL_WRITES to 1 to enable them on a service that supports them, see Environment variables.

Limitations

  • chown and chmod are not supported. Set setstat_mode to 1 or 2 in the configuration to silently ignore these commands.
  • truncate, symlink, and readlink are not supported.
  • Opening a file for both reading and writing at the same time is not supported.
  • rename is implemented as server-side copy + delete — not atomic.
  • Renaming non-empty directories is not supported (each object would require a separate API call).
  • Directories are derived from object names. The key prefix of a user, or a directory inside it, exists in the bucket once an object is stored below it: right after login the root is listed as empty and no folder appears in the bucket until the first upload or the first directory created there. Nothing needs to be created beforehand, and the root itself cannot be created by an Event Manager action. An object whose key has an empty, . or .. segment names no entry: it is not listed, and removing the directory that holds it keeps the directory until the object is removed with the provider tools.
  • The bucket accepts an object below an existing file, which creates a name that is both a file and a directory: clients cannot open it as a directory. Standard clients upload into the directories they browse to, so they work as expected: such a name comes from a client that writes to a path below an existing file. Uploads that create their missing parent directories (WebClient folder uploads, mkdir_parents in the REST API), copies, renames and the filesystem actions of the Event Manager check, before writing, that every existing component of the target path is a directory. Plain uploads and directory creations are written directly, as the bucket allows: their missing parent directories appear implicitly and, written below an existing file, they create such a name. Setting SFTPGO_HOOK__S3_CHECK_PARENT_DIR to 1 checks them too (see Environment variables). This is off by default because every plain upload and directory creation then costs extra requests to read its parent directory and requires that directory to exist, so clients must create directories before uploading into them. Each check is a separate request from the write: an object stored by another client in between can still create such a name.
  • Modification time (chtime) is not supported.
  • Removing a file is not conditional. S3 reports success when removing an object that no longer exists, so concurrent removals of the same file all succeed and each one subtracts it from the usage counters, which stay below the actual usage until the quota is recalculated.
  • Upload resume is disabled by default. It can be enabled for files up to a configurable size via resume_max_size: on resume SFTPGo rewrites the whole object. An interrupted upload leaves something to resume only with the flag that stores partial files (4).
  • A local home directory is required for temporary files, unless in-memory pipes are enabled via SFTPGO_HOOK__MEMORY_PIPES__ENABLED=1.
  • Clients that require advanced filesystem-like features (e.g., sshfs) are not supported.
  • Object keys are compared as written within the bucket, and two folders are the same storage only when they name the same bucket on the same endpoint. Do not map folders onto overlapping buckets or key prefixes, also through different endpoints, and keep copy targets outside their source: see Copy and move onto the same entry.
  • Two folders with the same endpoint and bucket name are considered the same bucket, even if their credentials differ, and renames and copies between them run inside the bucket. Some services let one bucket name refer to different buckets depending on the access key or tenant: on these services, give each bucket a name that is unique on the endpoint.
  • An S3-compatible service that resolves different spellings of a key to one object, for example by storing keys on a file system that ignores letter case, lets another spelling reach a restricted directory with the settings of the path as written, see Names that reach the same entry.
  • For server-side encryption with AWS-managed keys (SSE-S3 or SSE-KMS), configure the bucket's default encryption settings in the AWS Console. SFTPGo natively supports SSE-C (customer-provided keys) via the SSE Customer Key field.