Skip to content

File Storage

Ryot stores the files you upload, such as images, videos and backup archives. You can keep them on a local volume or in S3-compatible object storage like Amazon S3, Cloudflare R2 or MinIO. Ryot picks S3 automatically when its settings are complete, and a local volume otherwise.

Kind Where it lives What to do
Permanent /home/ryot/storage, or your S3 bucket when S3 is configured. Keep it on a persistent volume or in S3, and back it up.
Temporary /home/ryot/work, always on local disk. Do not persist it. Give it enough free space for big imports.

Temporary files are uploads waiting to be processed, imports, backups being built or restored, and plugin working files. Ryot cleans them up on its own.

If you do not configure S3, mount a persistent volume at /home/ryot/storage. The installation guide already does this:

docker-compose.yml
services:
ryot:
volumes:
- ryot_storage:/home/ryot/storage
volumes:
ryot_storage:
  • Back up the ryot_storage volume along with your database. See Back up and restore.
  • Keep the volume when you replace or upgrade the container.
  • Do not mount /home/ryot/work.
  • The volume must be writable by Ryot’s user, UID/GID 1001.

Set these variables to store permanent files in a bucket:

Variable Value
FILE_STORAGE_S3_URL Your provider’s S3 endpoint.
FILE_STORAGE_S3_BUCKET_NAME The bucket name.
FILE_STORAGE_S3_ACCESS_KEY_ID An access key with read and write access to the bucket.
FILE_STORAGE_S3_SECRET_ACCESS_KEY The matching secret key.
FILE_STORAGE_S3_REGION Optional. The bucket’s region, if your provider uses one.

All four required values must be set. If any is missing, Ryot quietly uses local storage for permanent files instead, so check your settings if files appear in /home/ryot/storage.

With S3 configured, you no longer need the /home/ryot/storage volume. Temporary files still use /home/ryot/work.

Create a bucket and an API token with read and write access, then set:

Terminal window
FILE_STORAGE_S3_URL=https://<ACCOUNT_ID>.r2.cloudflarestorage.com
FILE_STORAGE_S3_BUCKET_NAME=ryot-storage
FILE_STORAGE_S3_ACCESS_KEY_ID=your-access-key-id
FILE_STORAGE_S3_SECRET_ACCESS_KEY=your-secret-access-key
FILE_STORAGE_S3_REGION=auto

With S3, browsers upload files straight to your bucket. Add a CORS rule that allows PUT requests with a Content-Type header from each address you open Ryot at:

CORS policy
[
{
"AllowedOrigins": ["https://ryot.example.com", "https://localhost"],
"AllowedMethods": ["PUT"],
"AllowedHeaders": ["content-type"]
}
]
  • Each uploaded file can be up to 50 MiB.
  • A .zip file being uploaded for processing, such as a backup you are restoring, can be up to 1,088 MiB.
  • An upload must finish within 15 minutes of starting.
  • Uploaded files waiting to be processed are kept for 15 minutes, or for up to 24 hours once processing starts.
  • Abandoned temporary files are cleaned up on Ryot’s frequent schedule, every 5 minutes by default.

Uploads fail with S3 but work locally. Check the bucket’s CORS rule. The origin must match FRONTEND_URL exactly, including https:// and any port.

Uploads fail behind a reverse proxy. Raise the proxy’s request size limit. See Reverse proxies.

Images disappeared after an update. The container was replaced without a persistent volume at /home/ryot/storage. Restore the files from your backup and add the volume.