Skip to content

Store Files

Create an S3-compatible storage bucket and start uploading files. Works with any S3 client, SDK, or CLI tool.

What you are building

A private or public storage bucket with S3-compatible access, API key authentication, and per-bucket access control.

When to use this approach

  • You need to store files, backups, or static assets
  • You want S3 API compatibility (works with existing tools)
  • You need programmatic access to file storage

If you need file sync with desktop/mobile clients and team sharing, use WAYSCloud Drive instead.

What you need

  • A WAYSCloud account
  • An API key with storage permissions (for the API path)

Step 1 — Create a bucket

Dashboard

  1. Open ServicesData & StorageObject Storage in the dashboard
  2. Click Create Bucket
  3. Enter a bucket name (lowercase, 3–63 characters, only letters, numbers, and hyphens)
  4. Choose visibility: Private (default) or Public (anonymous read)
  5. Click Create

API

bash
curl -X POST https://api.wayscloud.services/v1/storage/buckets \
  -H "X-API-Key: $WAYSCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "bucket_name": "my-app-uploads",
    "is_public": false
  }'

Response:

json
{
  "success": true,
  "bucket_name": "my-app-uploads",
  "endpoint": "https://storage.wayscloud.services",
  "region": "no"
}

Bucket names are globally unique and cannot be reused after deletion.


Step 2 — Get your credentials

When you create a bucket, a default access key is generated automatically. You can also create additional keys.

API

bash
curl -X POST https://api.wayscloud.services/v1/storage/buckets/my-app-uploads/keys \
  -H "X-API-Key: $WAYSCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Upload Script"}'

Response:

json
{
  "access_key": "wayscloud_s3_my-app-uploads_abc123",
  "secret_key": "xyz789secretkey...",
  "endpoint": "https://storage.wayscloud.services"
}

Important: The secret key is only shown once. Save it immediately.


Step 3 — Upload files

Use any S3-compatible tool with your credentials.

AWS CLI:

bash
export AWS_ACCESS_KEY_ID="wayscloud_s3_my-app-uploads_abc123"
export AWS_SECRET_ACCESS_KEY="xyz789secretkey..."

aws s3 cp myfile.pdf s3://my-app-uploads/ \
  --endpoint-url https://storage.wayscloud.services

Python (boto3):

python
import boto3

s3 = boto3.client('s3',
    endpoint_url='https://storage.wayscloud.services',
    aws_access_key_id='wayscloud_s3_my-app-uploads_abc123',
    aws_secret_access_key='xyz789secretkey...'
)

s3.upload_file('myfile.pdf', 'my-app-uploads', 'myfile.pdf')

cURL (presigned URL):

bash
curl -X PUT "https://storage.wayscloud.services/my-app-uploads/myfile.pdf" \
  -H "Content-Type: application/pdf" \
  --data-binary @myfile.pdf

Step 4 — Next steps

  • Serve static assets — Set your bucket to public and use it as a CDN origin
  • Backup databases — Schedule automated dumps to your storage bucket
  • Connect from a VPS — Access storage from your servers. See Deploy a VPS.
  • Lifecycle policies — Configure automatic expiration for temporary files

API reference

WAYSCloud AS