S3 Storage
By default, SkySend stores encrypted upload files on the local filesystem. You can switch to any S3-compatible object storage provider for more scalable or managed file storage.
For the full list of configuration variables, see Environment Variables.
Setup
Enable S3 by setting STORAGE_BACKEND=s3 and providing the required credentials:
environment:
STORAGE_BACKEND: s3
S3_BUCKET: your-bucket-name
S3_REGION: your-region
S3_ACCESS_KEY: your-access-key
S3_SECRET_KEY: your-secret-keyTIP
When using S3, the /uploads volume mount is no longer needed - only the /data volume for the SQLite database.
Provider Examples
Cloudflare R2
environment:
STORAGE_BACKEND: s3
S3_BUCKET: skysend-uploads
S3_REGION: auto
S3_ENDPOINT: "https://<account-id>.r2.cloudflarestorage.com"
S3_ACCESS_KEY: your-access-key
S3_SECRET_KEY: your-secret-keyA bucket created with a jurisdiction has an endpoint of its own, https://<account-id>.eu.r2.cloudflarestorage.com for the EU. With the endpoint above, R2 answers the check at startup with 403 and the server does not start.
AWS S3
environment:
STORAGE_BACKEND: s3
S3_BUCKET: skysend-uploads
S3_REGION: eu-central-1
S3_ACCESS_KEY: your-access-key
S3_SECRET_KEY: your-secret-keyLeave S3_ENDPOINT unset for AWS S3 - the endpoint is derived automatically from the region.
Hetzner Object Storage
environment:
STORAGE_BACKEND: s3
S3_BUCKET: skysend-uploads
S3_REGION: eu-central-1
S3_ENDPOINT: "https://eu-central-1.your-objectstorage.com"
S3_ACCESS_KEY: your-access-key
S3_SECRET_KEY: your-secret-keyMinIO (Self-Hosted)
environment:
STORAGE_BACKEND: s3
S3_BUCKET: skysend-uploads
S3_REGION: us-east-1
S3_ENDPOINT: "https://minio.example.com:9000"
S3_ACCESS_KEY: your-access-key
S3_SECRET_KEY: your-secret-key
S3_FORCE_PATH_STYLE: "true"MinIO requires S3_FORCE_PATH_STYLE=true. Use the same setting for Garage and other self-hosted providers that do not support virtual-hosted-style URLs.
CORS Configuration
Required for downloads
When using S3 storage, your bucket needs a CORS policy to allow browser downloads. Without it, downloads will fail with No 'Access-Control-Allow-Origin' header errors. The policy must allow GET and HEAD methods from your SkySend domain.
Cloudflare R2
Go to R2 > your bucket > Settings > CORS Policy and add:
[
{
"AllowedOrigins": [
"https://skysend.example.com"
],
"AllowedMethods": [
"GET",
"HEAD"
]
}
]AWS S3
Go to your bucket > Permissions > CORS configuration and add a similar policy.
MinIO
Use mc admin config set or the MinIO Console to configure CORS.
Replace https://skysend.example.com with your actual SkySend BASE_URL. For local development, also add http://localhost:5173.
Many Simultaneous Uploads
Each upload holds the part it is filling in memory until the part is complete. All uploads together may hold half of S3_MEMORY_LIMIT in such parts. Beyond that, a part fills up in a file under DATA_DIR/tmp/s3-parts/ instead. Nothing is refused and nothing fails, a part on disk only costs some CPU for the copies through the file.
With two or more CPU cores those copies cost nothing measurable, so the default needs no change however many uploads run at once. On a server with one core they compete with the rest of the server for that core, and a higher limit keeps the parts in memory:
| Uploads at once, at the peak | S3_MEMORY_LIMIT with one core | With two or more cores | RAM at least, with the higher value |
|---|---|---|---|
| Up to about 30 | Default | Default | - |
| 64 | 1GB | Default | 4 GB |
| 128 | 2GB | Default | 8 GB |
| 256 | 4GB | Default | 16 GB |
A higher limit also lets more parts be on their way to a slow bucket at once. The RAM column leaves room for that, for the WebSocket buffers and for the rest of the server. The table says how to set the limit, not how many uploads a server can carry.
Incomplete Multipart Uploads
SkySend sends every file to the bucket as a multipart upload and aborts it itself when an upload fails or the sender leaves. One case it cannot clean up: a server that stops mid-upload, through a crash, a restart or a redeploy, leaves the parts uploaded so far in the bucket. They do not show up as objects, but the provider stores and bills them until the multipart upload is aborted.
Add a lifecycle rule that aborts incomplete multipart uploads after a day, or after more days if a single upload to your instance can take longer than that. The rule only removes multipart uploads that are still incomplete when their time is up.
Cloudflare R2
Every bucket has a default rule that removes incomplete multipart uploads seven days after they started. To shorten it, go to R2 > your bucket > Settings > Object Lifecycle Rules and edit or add a rule.
AWS S3
AWS has no such rule by default. Go to your bucket > Management > Create lifecycle rule, apply it to all objects, select Delete expired object delete markers or incomplete multipart uploads and then Delete incomplete multipart uploads with 1 day. With the AWS CLI:
{
"Rules": [
{
"ID": "abort-incomplete-multipart-uploads",
"Status": "Enabled",
"Filter": { "Prefix": "" },
"AbortIncompleteMultipartUpload": { "DaysAfterInitiation": 1 }
}
]
}aws s3api put-bucket-lifecycle-configuration --bucket skysend-uploads --lifecycle-configuration file://lifecycle.jsonOther providers
Most S3-compatible stores accept the same AbortIncompleteMultipartUpload rule through put-bucket-lifecycle-configuration. Check your provider's documentation for whether it applies one by default.