---
title: "CLI Storage Commands"
description: "Manage object storage buckets and files from the command line."
url: https://edge.network/docs/cli/storage/
---

# CLI Storage Commands

CLI

# Storage Commands

Manage S3-compatible object storage with familiar commands.

## Buckets

### List Buckets

```
$ edge storage list
NAME              OBJECTS    SIZE       CREATED
my-assets         1,234      2.3 GB     2025-01-15
backups           456        45.6 GB    2025-02-01
website-static    89         123 MB     2025-02-10
```

### Create a Bucket

```
$ edge storage create my-new-bucket

Creating bucket... done

Name:   my-new-bucket
Region: london
```

### Delete a Bucket

```
# Delete empty bucket
edge storage delete my-bucket

# Delete bucket and all contents
edge storage delete my-bucket --force
```

### Bucket Info

```
$ edge storage info my-assets
Name:    my-assets
Region:  london
Objects: 1,234
Size:    2.3 GB
Created: 2025-01-15
```

## Objects

### List Objects

```
$ edge storage ls my-bucket
NAME                          SIZE        MODIFIED
images/                       -           -
documents/                    -           -
index.html                    4.2 KB      2025-02-10 14:30
styles.css                    12.3 KB     2025-02-10 14:30
app.js                        45.6 KB     2025-02-10 14:32

# List contents of a folder
$ edge storage ls my-bucket/images/
NAME                          SIZE        MODIFIED
logo.png                      23.4 KB     2025-02-08
hero.jpg                      1.2 MB      2025-02-08
icons/                        -           -

# List all objects recursively (note: -R uppercase)
$ edge storage ls my-bucket -R
```

### Upload Files

```
# Upload a single file
edge storage cp ./logo.png my-bucket/images/

# Upload to specific path
edge storage cp ./file.pdf my-bucket/documents/report.pdf

# Upload multiple files
edge storage cp ./dist/* my-bucket/static/

# Recursive upload (folder, note: -R uppercase)
edge storage cp -R ./public my-bucket/website/
```

### Download Files

```
# Download a single file
edge storage cp my-bucket/images/logo.png ./downloads/

# Download to specific path
edge storage cp my-bucket/report.pdf ./local-report.pdf

# Recursive download (folder, note: -R uppercase)
edge storage cp -R my-bucket/backups/ ./local-backups/
```

### Delete Objects

```
# Delete a single object
edge storage rm my-bucket/old-file.txt

# Delete multiple objects
edge storage rm my-bucket/file1.txt my-bucket/file2.txt

# Recursive delete (folder, note: -R uppercase)
edge storage rm -R my-bucket/old-folder/

# Delete without confirmation
edge storage rm -R my-bucket/temp/ --force
```

### Move/Rename

```
# Rename an object
edge storage mv my-bucket/old-name.txt my-bucket/new-name.txt

# Move to different folder
edge storage mv my-bucket/file.txt my-bucket/archive/file.txt
```

## Sync

Synchronize directories between your local filesystem and storage:

```
# Sync local folder to bucket
edge storage sync ./dist my-bucket/website/

# Sync bucket to local folder
edge storage sync my-bucket/backups/ ./local-backups/

# Sync with delete (remove files not in source)
edge storage sync --delete ./dist my-bucket/website/

# Dry run (show what would change)
edge storage sync --dry-run ./dist my-bucket/website/
```

## Presigned URLs

Generate temporary URLs for private objects:

```
# Generate presigned URL (default 1 hour)
$ edge storage presign my-bucket/private/document.pdf
https://storage.edge.network/my-bucket/private/document.pdf?X-Amz-...

# Custom expiry
edge storage presign my-bucket/file.zip --expires 24h

# Expiry options: 5m, 1h, 24h, 7d (max 7 days)
```

## Usage & Metrics

### Overall Usage

```
$ edge storage usage
Total Size:    48.2 GB
Total Objects: 12,345
Buckets:       5
```

### Bucket Metrics

```
$ edge storage metrics my-bucket
Bucket: my-bucket
Region: london

Storage Used: 2.3 GB
Objects:      1,234
Created:      2025-01-15

$ edge storage metrics
Overall Storage Metrics

Total Storage: 48.2 GB
Total Objects: 12,345
Buckets:       5
```

## Common Flags

| Flag | Description |
| -R, --recursive | Operate recursively on folders (uppercase R) |
| -f, --force | Force delete bucket with contents / skip confirmation |
| --delete | Delete files not in source (sync only) |
| --dry-run | Show what would change without making changes (sync only) |
| --expires | Expiry time for presigned URLs (e.g., 1h, 24h, 7d) |
| -r, --region | Global flag for region selection |

Note: Recursive uses uppercase -R

The lowercase `-r` is reserved for the global `--region` flag. Use uppercase `-R` for recursive operations.

## Tips

Quiet Mode for Scripting

Use `-q` flag to suppress progress output in scripts.

Very Large Files (1GB+)

For uploading very large files, consider using S3-compatible tools like `aws s3 cp` or `rclone` which support multipart uploads with automatic retry and resumption.

Upload Limits

The control panel has a 1GB upload limit. Use the CLI or S3 API for larger files.

## See Also

[Configuration Customize CLI settings](https://edge.network/docs/cli/configuration) [Storage Docs Full Storage documentation](https://edge.network/docs/storage)
[Back to Docs](https://edge.network/docs) [Need help?](https://edge.network/support)
