# Object storage for app files

Connect Azure Blob Storage, Amazon S3, or an S3-compatible bucket such as Cloudflare R2 for builds, symbols, images, and crash diagnostic files.

Source: https://appportal.io/docs/enterprise/object-storage

Object storage holds **installable builds, debug symbols, branding images, build icons, and eligible
crash diagnostic attachments**. AppPortal's APIs authorize uploads and downloads while the file bytes
live in your storage account. Telemetry records and file metadata use a
[database](https://appportal.io/docs/enterprise/telemetry-storage) separately.

Choose a private destination for your organization. AppPortal supports Azure Blob Storage, Amazon
S3, and S3-compatible buckets, including Cloudflare R2. Your apps and CI keep using their normal
AppPortal credentials; bucket credentials stay on the server.

## Azure Blob Storage

Prepare the storage account, private container, region, and an Azure connection credential.
Permissions must cover container setup and blob upload, download, properties, listing, deletion,
and the leases used to coordinate diagnostic attachments.

AppPortal can create a missing container when the agreed credential permits it. See Microsoft's
[connection-string guidance](https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string)
when preparing the credential with your onboarding contact.

## Amazon S3

Choose a private general-purpose bucket name and provide its AWS region and a dedicated access
key ID and secret access key. During staff-guided setup, AppPortal can create a missing bucket when
creation is explicitly requested and the credential permits it. Existing buckets are confirmed without
changing their settings. AppPortal selects the regional AWS endpoint from the region.
It uses Signature Version 4 authentication and supports multipart uploads for large builds.

Limit access to the agreed bucket and object namespace. The required S3 operations are:

- Bucket listing: `s3:ListBucket`.
- Object upload and download, including metadata reads: `s3:PutObject` and `s3:GetObject`.
- Object deletion and failed multipart cleanup: `s3:DeleteObject` and `s3:AbortMultipartUpload`.

Missing-bucket setup additionally requires `s3:CreateBucket` for the agreed bucket. AppPortal does
not grant permissions or change ACLs, ownership, bucket policies, lifecycle, or public access settings.
Your onboarding contact uses `createContainer: true` for creation, or `false` to require an existing
bucket. Denied or uncertain bucket checks never trigger creation; an unsuccessful setup leaves the
previous active storage binding in place and never deletes a bucket.

Coordinate bucket setup with your storage owner so no other tool creates the same bucket concurrently.
AWS `us-east-1` has a [legacy behavior](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
that can reset a bucket's ACL if an external same-account create races with AppPortal's missing-bucket
check. AppPortal never sends an ACL change or retries an uncertain create. If your bucket uses a
customer-managed KMS key, arrange the corresponding encrypt,
data-key, and decrypt permissions with your AWS administrator.

## S3-compatible services, including Cloudflare R2

Provide the same bucket credentials plus the service's **HTTPS S3 API endpoint** and signing region.
AppPortal uses path-style bucket addressing for a custom endpoint. The endpoint is the service
origin, without a bucket path, query string, or signed URL.

For Cloudflare R2, use the account's S3 endpoint
`https://<account-id>.r2.cloudflarestorage.com` and region `auto`. Generate S3 credentials scoped to
the bucket. Use the API endpoint, not a public `r2.dev` URL or custom download domain. Cloudflare's
[S3 setup guide](https://developers.cloudflare.com/r2/get-started/s3/) explains where to obtain these values.

Creating a missing compatible bucket also requires private S3 CreateBucket support. Services without that capability require a precreated bucket; AppPortal
does not fall back to a provider management API.

Other compatible services must support the operations above, multipart upload, object metadata,
conditional object creation, and consistent reads/listing after writes. Validate these operations
against your destination during onboarding; compatibility means the complete workflow works,
not just that an upload returns success.

## Upload, investigate, and retain

Builds and symbols follow the normal [distribution workflow](https://appportal.io/docs/guides/distribution).
AppPortal retains references to the destination where each file was registered. Replacing a bucket
sends new files to the new destination; older files still download from their original destination.
Keep its credentials available until historical access and cleanup are complete.

Diagnostic attachments use the same selected object-storage service, after privacy processing.
They require a PostgreSQL app-data source and enabled retention cleanup. S3 attachment uploads and
cleanup coordinate through AppPortal's database so concurrent requests cannot bypass size/count
limits. Support-ticket attachments remain in separate AppPortal-managed storage.

AppPortal deletes current objects through its retention and cleanup workflows. Bucket versioning,
Object Lock, legal holds, replication, and backups can preserve additional copies or prevent deletion.
Agree policies for those copies with your storage owner. Configure cleanup of incomplete multipart
uploads as a backstop for interrupted processes.

Follow [Connect your services](https://appportal.io/docs/enterprise/connect-your-services) for secure credential handoff,
activation, and verification with disposable files.
