Azure Blob Storage backend
SFTPGo can use Azure Blob Storage as a storage backend. The behavior and limitations are similar to the S3 backend.
Authentication
SFTPGo supports three authentication methods:
- Shared Key — Provide an account name and account key. The container name is required.
- Shared Access Signature (SAS) — Provide a SAS URL. If the URL includes the container name, the container field is optional; otherwise, it must be specified separately.
- Default Azure Credentials — Leave both the account key and SAS URL blank. SFTPGo will use Azure's default credential chain (environment variables, managed identity, Azure CLI, etc.). This is the recommended approach for deployments on Azure.
The account key and SAS URL are stored encrypted according to your KMS configuration.
Selecting a managed identity
With the default credential chain, a host (Azure VM, AKS pod with workload identity, App Service, ...) authenticates through its managed identity. When a single system-assigned identity is in use, it is selected automatically. When more than one user-assigned managed identity is available, the credential cannot pick one on its own and you must indicate which one to use.
Set the Managed identity client ID to the client ID of the user-assigned managed identity SFTPGo should authenticate with. This value applies only when account key and SAS URL are blank; leave it empty to keep the default credential chain behavior. Each storage configuration (user or virtual folder) can target a different managed identity, so a single SFTPGo instance can serve multiple identities.
Configuration
| Parameter | Description |
|---|---|
| Container | Azure Blob Storage container name. Must already exist. Optional if embedded in the SAS URL. |
| Account name | Azure storage account name. Required when using shared key authentication. |
| Account key | Storage account key. Leave blank to use SAS URL or default credentials. |
| SAS URL | Shared Access Signature URL. Leave blank to use shared key or default credentials. |
| Managed identity client ID | Client ID of the user-assigned managed identity to authenticate with. Set this when account key and SAS URL are blank and more than one user-assigned managed identity is available. |
| Endpoint | Azure Blob Storage endpoint. Default: blob.core.windows.net. Set a custom endpoint for emulators like Azurite (e.g., http://127.0.0.1:10000). |
| Key prefix | Optional. Restricts the user to a "folder" within the container. 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 container root is not allowed. |
| Access tier | Blob access tier for uploaded objects: Hot, Cool, or Archive. Leave blank for the container's default tier. |
| Skip TLS verify | Accept any TLS certificate. |
Multipart upload and download tuning
SFTPGo uses multipart operations for transferring files to/from Azure Blob Storage.
| Parameter | Default | Range | Description |
|---|---|---|---|
| Upload part size | 5 MB | 1–2000 MB | Size of each block in a block upload. |
| Upload concurrency | 5 | 0–64 | Number of blocks uploaded in parallel. |
| 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. |
If the upload bandwidth between the client and SFTPGo is greater than the bandwidth between SFTPGo and Azure, the client may need to wait for the final blocks to be uploaded, potentially causing a timeout. Adjust part size and concurrency accordingly.
Checksum verification
Every upload sends a CRC64 transactional checksum (x-ms-content-crc64 header) that Azure verifies server-side on each Put Blob and Put Block request. The checksum is precomputed over the in-memory buffer, so no extra data is buffered or re-read.
This is enabled by default and can be disabled by setting the SFTPGO_HOOK__AZBLOB__DISABLE_CHECKSUM environment variable to 1. Useful for emulators or gateways that do not accept the x-ms-content-crc64 header.
Concurrent changes
Uploads, copies and removals are conditional: an upload fails if, while it is in progress, another session or another SFTPGo instance creates, replaces or removes the target file, a copy fails if the target was created or replaced after SFTPGo read it, a removal fails if the file was replaced in the meantime. The file is then left as the other change made it.
A rename is a copy followed by the removal of the source, and both steps are conditional: if the source is replaced after the copy, the removal fails and both the source and the copy at the target are kept.
Limitations
This backend has the same limitations as the S3 backend:
chown,chmod,truncate,symlink, andreadlinkare not supported.- Opening a file for both reading and writing at the same time is not supported.
renameis implemented as server-side copy + delete — not atomic.- Renaming non-empty directories is not supported.
- The container 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, 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 container allows: their missing parent directories appear implicitly and, written below an existing file, they create such a name. Setting
SFTPGO_HOOK__AZBLOB_CHECK_PARENT_DIRto1checks them too. 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. - 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. - 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 blob. An interrupted upload leaves something to resume only with the flag that stores partial files (16). - 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 container, and two folders are the same storage only when they name the same container on the same endpoint. Do not map folders onto overlapping containers or key prefixes, also through different endpoints, and keep copy targets outside their source: see Copy and move onto the same entry.
Unlike S3, Azure Blob Storage supports setting modification times via object metadata.