Swush
Configuration

Storage

Local and S3 storage configuration.

Swush supports local disk storage and S3-compatible object storage.

Local storage

Set:

  • STORAGE_DRIVER=local
  • UPLOAD_ROOT=/absolute/path

Files are stored under UPLOAD_ROOT/{userId}/....

S3 storage

Set:

  • STORAGE_DRIVER=s3
  • S3_ENDPOINT
  • S3_REGION
  • S3_BUCKET
  • S3_ACCESS_KEY
  • S3_SECRET_KEY
  • S3_FORCE_PATH_STYLE (true for MinIO)

Switching

Changing storage backends does not migrate existing files. Plan a migration if you already have data.

When you have already uploaded files on S3, you can switch to Local and still view them, as long as you don't delete the S3 data in environment variables. And vice verse for Local to S3. This allows you to switch back and forth without losing access to your files, but it also means you need to keep the old storage credentials if you want to access old files after switching.

On this page