# Bucket management

> Create, view, and delete buckets, and find the endpoint, region, and access domains of a bucket.

A bucket is the space where you store files. Files, permissions, public rules, mirror back-to-origin, and other settings all belong to a specific bucket. This page covers how to create, view, and delete buckets.

## Create a bucket

### Open the creation dialog

Go to **Object Storage (对象存储) › [Bucket list (桶列表)](https://console.bitiful.com/buckets)** and click **Create bucket (创建桶)** in the upper-right corner.

### Enter a bucket name

A bucket name is unique across the whole platform and can't be changed after creation. The rules are:

- 4 \~ 63 characters long.
- Only lowercase letters `a ~ z`, digits `0 ~ 9`, and hyphens `-`.
- Must begin and end with a lowercase letter or digit.

### Choose whether to make it public

The **Public bucket (公开桶)** switch is off by default, in which case "存储的对象将不能被匿名读取" (stored objects can't be read anonymously).

When you turn it on, anyone can read every file in the bucket anonymously. Creating a public bucket requires an account balance greater than 0. Otherwise, the bucket is still created but stays private.

If you're not sure, leave it off. You can later make the whole bucket or specific directories public in [Access management (访问管理)](https://docs.bitiful.com/en/bitiful-s4/handbook/public-read.md).

### Confirm

Click **OK (确定)**. After the message "创建成功" (created successfully) appears, the bucket shows up in the list immediately.

Prerequisites for creating a bucket:

| Condition                                                            | Message when not met                                                                              |
| :------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [Identity verification](https://console.bitiful.com/users) completed | An **Identity verification (实名认证)** notice appears. Click **Verify now (去认证)**                    |
| No overdue balance                                                   | "您当前已欠费，请先充值" (you are overdue, please top up first)                                              |
| Bucket quota not reached                                             | `TooManyBuckets`                                                                                  |
| Bucket name not taken                                                | `BucketAlreadyExists` (used by another account) or `BucketAlreadyOwnedByYou` (you already own it) |

Each primary account can create up to 10 buckets by default, and the current usage appears next to the bucket list title, for example `Bucket list (桶列表) (3/10)`. There is no limit on the number of files or the total capacity of each bucket.

> **Info**
>
> A sub-user's AccessKey can't create or delete buckets. Create the bucket in the console before you sync files with a tool.

## View the bucket list

| Column      | Meaning                                                                                                                                                                          |
| :---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**    | The bucket name. Click it to open file management                                                                                                                                |
| **ACL**     | `PRIVATE`: private by default. `PUBLIC-READ`: public by default. `部分公开` (partially public): some directories are set to public or private individually. Hover to see the default |
| **Size**    | The total capacity of files in the bucket (calculated in units of 1000) and the file count                                                                                       |
| **Created** | How long ago the bucket was created                                                                                                                                              |
| **Actions** | Click **…** to jump to **Access management (访问管理)**, **Website settings (网站设置)**, **Mirror back-to-origin (镜像回源)**, or **Delete bucket (删除桶)**                                   |

Capacity and file counts are near-real-time statistics and usually update within 1 minute after an upload.

## Feature pages in a bucket

Click a bucket name to enter the bucket. The top shows the bucket name and a copyable default access domain. The tabs below are:

| Tab                              | Purpose                                               | Documentation                                                                                                                                                                                                                   |
| :------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **File management (文件管理)**       | Browse, upload, move, and delete files                | [Manage files](https://docs.bitiful.com/en/bitiful-s4/handbook/objects.md)                                                                                                                                                      |
| **Bucket info (桶信息)**            | View the endpoint and region                          | See the next section                                                                                                                                                                                                            |
| **Access management (访问管理)**     | Public read, HTTP/3, CORS, hotlink protection         | [Public read](https://docs.bitiful.com/en/bitiful-s4/handbook/public-read.md), [CORS](https://docs.bitiful.com/en/bitiful-s4/handbook/cors.md), [Access control](https://docs.bitiful.com/en/bitiful-s4/handbook/anti-leech.md) |
| **Media processing (媒体处理)**      | Original file protection and Style rules              | [Original file protection](https://docs.bitiful.com/en/coreix/handbook/origin-protect.md), [Style](https://docs.bitiful.com/en/coreix/handbook/styles.md)                                                                       |
| **CDN acceleration (CDN加速)**     | Manage CDN domains that use this bucket as the origin | [CDN domains](https://docs.bitiful.com/en/cdn/handbook/domains.md)                                                                                                                                                              |
| **Website settings (网站设置)**      | Default home page, 404 page, bound domains            | [Static websites and domains](https://docs.bitiful.com/en/bitiful-s4/handbook/website.md)                                                                                                                                       |
| **Mirror back-to-origin (镜像回源)** | Fetch files from another origin when they don't exist | [Mirror back-to-origin](https://docs.bitiful.com/en/bitiful-s4/handbook/mirror.md)                                                                                                                                              |
| **Statistics (统计)**              | Capacity, traffic, requests                           | [Usage statistics](https://docs.bitiful.com/en/bitiful-s4/handbook/statistics.md)                                                                                                                                               |
| **Other (其他)**                   | Delete the bucket                                     | See below                                                                                                                                                                                                                       |

## Endpoint, region, and access domains

On the **Bucket info** tab, you can copy the **Endpoint (服务端点)** and **Region (服务可用区)**.

| Name                  | Value                                | Purpose                                                                           |
| :-------------------- | ------------------------------------ | --------------------------------------------------------------------------------- |
| Endpoint              | `s3.bitiful.net`                     | Configure SDKs and third-party tools. Usually written as `https://s3.bitiful.net` |
| Region                | `cn-east-1`                          | Configure SDKs and third-party tools                                              |
| Bucket default domain | `https://bucket-name.s3.bitiful.net` | Access files in the bucket over HTTP                                              |

For example, the default access address of the object `images/logo.png` in the bucket `my-bucket` is:

```text
https://my-bucket.s3.bitiful.net/images/logo.png
```

The following limits apply when you access through the bucket default domain (or directly through the endpoint):

- Opening a file in a browser triggers a download instead of displaying it.
- You can't download `.apk` or `.ipa` files. S4 returns `403 FileTypeForbidden`.
- Single-thread downloads are limited to 5 MB/s by default.

These limits don't affect access through a [CDN domain](https://docs.bitiful.com/en/cdn/intro.md).

## Delete a bucket

> **Warning**
>
> Deleting a bucket erases all files, domain bindings, and related settings in it, and **can't be undone**. After the name is released, other accounts can reuse it.

### Delete bound CDNs first

If any CDN domains use this bucket as the origin, delete them first in [Static acceleration management (静态加速管理)](https://console.bitiful.com/cdn/list). Otherwise, you see "请先删除该桶绑定的CDN，然后再删除该桶" (delete the CDNs bound to this bucket first, then delete the bucket).

### Open the deletion dialog

Go to the bucket's **Other** tab and click **Delete (删除)**. You can also click **Delete bucket** in the **…** menu in the bucket list.

### Enter the bucket name to confirm

The dialog text is in English. In short, it says the bucket and all objects in it will be permanently deleted, and asks you to enter the bucket name to confirm. Enter the full bucket name in the **Enter the name of this Space** box, then click **Delete**.

If the bucket has many files, deletion can take a few minutes.

## FAQ

<details>
<summary>Can I rename a bucket?</summary>

No. To change the name, create a new bucket and copy the files over with a tool such as Rclone, or migrate gradually with [mirror back-to-origin](https://docs.bitiful.com/en/bitiful-s4/handbook/mirror.md).

</details>

<details>
<summary>Can I transfer a bucket to another account?</summary>

The console doesn't offer this. Create a bucket in the target account and migrate the files.

</details>

<details>
<summary>I get Bad Bucket Name</summary>

The bucket name contains unsupported characters such as uppercase letters, underscores, dots, or Chinese characters, or it begins or ends with a hyphen.

</details>

<details>
<summary>10 buckets isn't enough</summary>

Use directories to separate workloads first, and grant different sub-users access with [directory-level permissions](https://docs.bitiful.com/en/bitiful-s4/handbook/permissions.md).

</details>
