ScalixScalix Docs
Sign up

Storage

S3-compatible object storage

Overview

Scalix Storage provides S3-compatible object storage. Upload files, serve static assets, and manage buckets through a unified API.

CLI

bash
# Create a bucket
scalix-cloud storage mb scalix://my-bucket
 
# Upload a file
scalix-cloud storage cp ./image.png scalix://my-bucket/images/
 
# List files
scalix-cloud storage ls scalix://my-bucket/images/
 
# Download a file
scalix-cloud storage cp scalix://my-bucket/images/image.png ./downloaded.png
 
# Remove a file
scalix-cloud storage rm scalix://my-bucket/images/image.png
 
# Remove a bucket
scalix-cloud storage rb scalix://my-bucket

REST API

Create a Bucket

bash
curl -X POST https://api.scalix.world/v1/storage/buckets \
  -H "Authorization: Bearer $SCALIX_API_KEY" \
  -d '{"name": "my-bucket"}'

Upload

bash
curl -X PUT https://api.scalix.world/v1/storage/buckets/my-bucket/objects/images/photo.jpg \
  -H "Authorization: Bearer $SCALIX_API_KEY" \
  -H "Content-Type: image/jpeg" \
  --data-binary @photo.jpg

Download

bash
curl https://api.scalix.world/v1/storage/buckets/my-bucket/objects/images/photo.jpg \
  -H "Authorization: Bearer $SCALIX_API_KEY" \
  -o photo.jpg

List Objects

bash
curl "https://api.scalix.world/v1/storage/buckets/my-bucket/objects?prefix=images/" \
  -H "Authorization: Bearer $SCALIX_API_KEY"

Presigned URLs

Generate a time-limited URL for direct upload or download without sharing your API key. Expiry is capped at 7 days. Requires an S3-compatible storage backend.

bash
curl -X POST https://api.scalix.world/v1/storage/presign \
  -H "Authorization: Bearer $SCALIX_API_KEY" \
  -d '{
    "bucket": "my-bucket",
    "key": "images/photo.jpg",
    "method": "PUT",
    "expires_secs": 3600
  }'

Migration

Import from existing cloud storage:

bash
scalix-cloud migrate storage sync \
  --source-endpoint https://s3.amazonaws.com \
  --source-bucket my-aws-bucket \
  --source-access-key AKIA... \
  --source-secret-key ... \
  --target-bucket my-bucket

Works with any S3-compatible source (AWS S3, Google Cloud Storage, MinIO, and others).