Store files in S3¶
Store file contents in an S3 bucket instead of on the local volume. The application database still holds names, ownership, and permissions, so keep persistence on.
Set up¶
- Create a private bucket. Grant Umbod's identity
s3:GetObject,s3:PutObject, ands3:AbortMultipartUploadon it. - Give Umbod AWS credentials through the standard AWS environment variables in your
existingSecret, or through workload identity. Never put them in chart values. -
Add the settings to both
core.api.envandcore.mcp.env: -
Allow browser uploads: add a bucket CORS rule for your Umbod origin with the
PUTmethod and the headers Umbod sends. - Add a lifecycle rule that removes incomplete multipart uploads.
- Run the
helm upgrade --installcommand from Install again.
Check: upload a file in the workspace, restart the core Pod with kubectl -n umbod rollout restart deploy/umbod-core, and open the file again.
| Optional setting | Use |
|---|---|
UMBOD_FILESYSTEM_S3_PREFIX |
Store objects under a prefix. No leading or trailing slash |
UMBOD_FILESYSTEM_S3_ENDPOINT_URL |
An S3-compatible service |
UMBOD_FILESYSTEM_S3_ADDRESSING_STYLE |
path for compatible services that need it. Default auto |
How transfers work¶
Uploads and downloads go directly between the client and the bucket through short-lived signed URLs. This means:
- Browsers and agents must be able to reach the bucket endpoint.
- A signed download URL works for up to five minutes, even if access is revoked in that time.
- Signed URLs are credentials. Keep them out of logs.
With an S3-compatible service, test that it supports multipart uploads, signed PUT with If-None-Match: *, and signed GET with response-header overrides.
Migrate existing files¶
Do this before you switch a running installation to S3.
-
Stop Umbod so nothing writes files:
-
Back up the database and the file contents.
- Start a temporary Pod with the same core image, the data volume, and the S3 settings and credentials. Grant its identity
s3:ListBucketas well. -
Preview the copy, then run it:
The copy verifies every file and never overwrites. If it stops, run it again.
-
Add the S3 settings from Set up and run
helm upgrade --install. This starts Umbod again.
Check: open a file that existed before the migration, then upload a new one.
Keep the old local files and the backup. The command copies only: it does not delete or sync, so going back after new uploads needs a migration in the other direction.