Skip to content

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

  1. Create a private bucket. Grant Umbod's identity s3:GetObject, s3:PutObject, and s3:AbortMultipartUpload on it.
  2. Give Umbod AWS credentials through the standard AWS environment variables in your existingSecret, or through workload identity. Never put them in chart values.
  3. Add the settings to both core.api.env and core.mcp.env:

    core:
      api:
        env:
          UMBOD_FILESYSTEM_CONTENT_BACKEND: s3
          UMBOD_FILESYSTEM_S3_BUCKET: your-bucket
          UMBOD_FILESYSTEM_S3_REGION: eu-west-1
      mcp:
        env:
          UMBOD_FILESYSTEM_CONTENT_BACKEND: s3
          UMBOD_FILESYSTEM_S3_BUCKET: your-bucket
          UMBOD_FILESYSTEM_S3_REGION: eu-west-1
    
  4. Allow browser uploads: add a bucket CORS rule for your Umbod origin with the PUT method and the headers Umbod sends.

  5. Add a lifecycle rule that removes incomplete multipart uploads.
  6. Run the helm upgrade --install command 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.

  1. Stop Umbod so nothing writes files:

    kubectl -n umbod scale deploy/umbod-core --replicas=0
    
  2. Back up the database and the file contents.

  3. Start a temporary Pod with the same core image, the data volume, and the S3 settings and credentials. Grant its identity s3:ListBucket as well.
  4. Preview the copy, then run it:

    umbod migrate files-to-s3 --offline --dry-run
    umbod migrate files-to-s3 --offline
    

    The copy verifies every file and never overwrites. If it stops, run it again.

  5. 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.