Object storage
S3-compatible buckets for uploads, exports, and generated files. Each bucket has its own key, and your app is configured the moment it’s ready.
Create a bucket
apprail buckets create shop uploads --quota 10
apprail buckets shopThe quota is 1–100 GB (10 by default); an upload that would go past it is refused. Bucket names only need to be unique within your environment.
Use it from your app
The environment’s default bucket sets the variables most S3 libraries read on their own:
| Variable | Value |
|---|---|
S3_BUCKET | The bucket’s name on the server |
S3_ENDPOINT, AWS_ENDPOINT_URL_S3 | The private S3 endpoint |
S3_REGION, AWS_REGION | The region name to sign requests with |
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY | A key for this bucket only |
S3_FORCE_PATH_STYLE | true |
Every bucket also gets APPRAIL_BUCKET_<NAME>_ENDPOINT, _NAME, _REGION, _ACCESS_KEY_ID, and _SECRET_ACCESS_KEY.
// Node.js (AWS SDK v3)
const s3 = new S3Client({ forcePathStyle: true }); // endpoint, region, and key come from the environment
await s3.send(new PutObjectCommand({ Bucket: process.env.S3_BUCKET, Key: "avatars/42.png", Body: file }));Use path-style requests (forcePathStyle: true, or S3_FORCE_PATH_STYLE). The endpoint is private to your environment, so browsers can’t reach it directly: serve files through your app, or have your app stream uploads and downloads.
Keys, deletion, and copies
- One key per bucket. It can read and write that bucket and nothing else — not other buckets, and not other customers’.
- Rotation without downtime.
apprail buckets rotate-key shop uploadsadds a new key, updates your services, and removes the old key three minutes later, so both work during the switch. - Deleting never destroys data.
apprail buckets delete shop uploads --confirm uploadsrefuses while the bucket holds objects; empty it first. - Offsite copy. Buckets are copied to offsite storage nightly. It’s a copy of your objects, not a point-in-time archive, and objects written since the last copy aren’t in it yet. Restoring from it is done by Apprail on request.
- Size and object count are measured about every five minutes and shown in usage.
Not available yet: public or website buckets, versioning, lifecycle rules, and browser-facing presigned URLs.
Take your files with you
Any S3 tool works with the bucket’s credentials from inside the environment, for example with apprail run and aws s3 sync to another provider.