# Object Storage: S3 API

> Endpoints, regions and the settings for aws-cli, rclone, s3cmd, desktop apps and backup tools.

Source: https://docs.phluit.com/reference/object-storage-s3/

Phluit Object Storage speaks the S3 API, so any S3-compatible tool works with it.

## Addresses

| Setting | Value |
|---|---|
| Endpoint | On your bucket's page in the portal (**Overview** and **Connect** tabs). Written `https://YOUR-ENDPOINT` below. |
| Bucket address | `https://<bucket>.<region>.digitaloceanspaces.com` |
| CDN address (when the CDN is on) | `https://<bucket>.<region>.cdn.digitaloceanspaces.com` |
| Region field | Any value works, for example `us-east-1`. The endpoint decides the region. |
| Provider (in apps with a list) | **DigitalOcean Spaces**, otherwise **Other S3-compatible** |
| Protocol | HTTPS only, port 443 |

The **Connect** tab of your bucket has these settings ready to paste, filled in with your bucket's endpoint and key.

## Regions

| Area | Regions |
|---|---|
| Americas | `nyc3` New York, `sfo3` and `sfo2` San Francisco, `tor1` Toronto, `atl1` Atlanta, `ric1` Richmond, `mkc1` Kansas City |
| Europe | `ams3` Amsterdam, `fra1` Frankfurt, `lon1` London |
| Asia Pacific | `sgp1` Singapore, `blr1` Bangalore, `syd1` Sydney |

A bucket stays in the region you chose when you created it.

## Tools

**aws-cli**

```sh
aws configure --profile phluit        # access key, secret key, region us-east-1
aws --profile phluit --endpoint-url https://YOUR-ENDPOINT s3 sync ./backups s3://my-bucket/backups
```

**rclone** (remote settings)

```ini
type = s3
provider = DigitalOcean
endpoint = YOUR-ENDPOINT
acl = private
```

**s3cmd**

```ini
host_base = YOUR-ENDPOINT
host_bucket = %(bucket)s.YOUR-ENDPOINT
```

**Desktop apps** (Cyberduck, Transmit, WinSCP): protocol S3, server `<region>.digitaloceanspaces.com`, port 443, then your access key and secret key.

**Backups:** UpdraftPlus (S3-compatible (generic) or DigitalOcean Spaces), Vaultkeeper (S3-compatible storage), restic (`s3:https://YOUR-ENDPOINT/my-bucket`) and Duplicati (S3 compatible). Use a **Read and write** key.

## Sharing one file

While the bucket stays restricted, make one file public with your tool, or create a link that expires:

```sh
aws s3 cp file s3://my-bucket/file --acl public-read --endpoint-url https://YOUR-ENDPOINT
aws s3 presign s3://my-bucket/file --expires-in 3600 --endpoint-url https://YOUR-ENDPOINT
```

## Good to know

- Large files are uploaded in parts automatically by these tools. Unfinished multipart uploads are cleaned up after 7 days.
- **SignatureDoesNotMatch:** the secret key is wrong (copy it again) or your computer's clock is far off.
- **NoSuchBucket:** the bucket name or the region in the endpoint is wrong.

See also: [Object Storage guides](/products/object-storage/) and [plans and prices](/products/object-storage/plans-and-prices/).
