> For the complete documentation index, see [llms.txt](https://docs.mikopbx.com/mikopbx/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mikopbx.com/mikopbx/manual/maintenance/storage/digitalocean.md).

# Подключение S3 хранилища DigitalOcean

Инструкция по подключению DigitalOcean Spaces Object Storage в качестве S3-хранилища

## Создание бакета и ключей

1. Перейдите в консоль DigitalOcean ([ссылка](https://cloud.digitalocean.com/)).
2. Перейдите в раздел "**Manage**" -> "**Spaces Object Storage**". Нажмите "**Create a Spaces Bucket**" для создания нового бакета.

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FVK7KARzqZUsYmMaUQvLR%2FS3DOSpacesObjectStorage.png?alt=media&amp;token=2a385cec-2b1f-4b8e-b491-dc2e2a7c7ee6" alt=""><figcaption><p>Раздел "Spaces Object Storage"</p></figcaption></figure>

3. На странице создания бакета, в разделе "**Choose a datacenter region**", выберите ближайший к серверу MikoPBX регион. Выберите "**Standart Storage**".

{% hint style="info" %}
Запомните название Вашего региона (**sgp1** на скриншоте ниже), оно понадобится в будущем для настройки внутри MikoPBX.
{% endhint %}

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FnyI8RTHCbA9v4hGdoLMw%2FS3DOBucketParameters1.png?alt=media&amp;token=62933c8a-ff17-4198-a21b-978c055b161b" alt=""><figcaption><p>Параметры создаваемого бакета #1</p></figcaption></figure>

4. В поле "**Choose a unique Spaces Bucket name**" укажите произвольное название для бакета.

Нажмите "**Subscribe & Create Bucket**".

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FC2XDjvi1y6Ugv9dARIPy%2FS3DOBucketParameters2.png?alt=media&amp;token=556f34a6-a04c-4cda-b3b6-a0b7bd78663f" alt=""><figcaption><p>Параметры создаваемого бакета #2</p></figcaption></figure>

5. Перейдите на страницу созданного бакета (нажмите на его название в разделе "**Buckets**").

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FVD597vzvnZCZHwYdTRa3%2FS3DOcreatedBucket.png?alt=media&amp;token=1c0513ec-c460-48af-b7cd-699869083be6" alt=""><figcaption><p>Созданный бакет в разделе "Buckets".</p></figcaption></figure>

6. Перейдите на вкладку "**Settings**".

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FEjtupbIbiWxTdJwQ5JlA%2FS3DOCreatedBucketSettings.png?alt=media&amp;token=6b0a7ae5-eb5b-44fe-bc78-6e1559d172d4" alt=""><figcaption><p>Вкладка "Settings" на странице созданного бакета</p></figcaption></figure>

7. Пролистайте до раздела "**Access Keys**". Нажмите "**Create Access Key**" для создания новой связки ключей.

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2F5cbrEgmxvC6AJD7RplWo%2FS3DOCreateAccessKeyBtn.png?alt=media&amp;token=6e251505-877b-4a22-a4a5-1caa1d0f9772" alt=""><figcaption><p>Раздел "Access Keys"</p></figcaption></figure>

8. Заполните необходимые параметры для создаваемого ключа:

* **Select access scope** - Limited Access.
* **Buckets** - выберите ранее созданный бакет.
* **Permissions** - Read/Write/Delete.
* **Give this access key a name** - укажите произвольное название для идентификации связки ключей.

Нажмите "**Create Access Key**".

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FDBh6g6jFBH4OByNlBAiz%2FS3DOAccessKeysParameters.png?alt=media&amp;token=15ecccd6-5c50-4a4a-8cc0-284c71f1f03b" alt=""><figcaption><p>Параметры создаваемой связки ключей</p></figcaption></figure>

Будет отображены значения связки ключей (Access Key ID и Secret Key). Сохраните эти значения, они понадобятся в будущем при настройке на стороне MikoPBX.

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2Few8gT5d0HEmNNI77keKf%2FS3DOCreatedAccessKeys'.png?alt=media&amp;token=decb29ee-e22b-4590-ba80-1e8ec08f0657" alt=""><figcaption><p>Связка access ключей</p></figcaption></figure>

#### Подключение к MikoPBX <a href="#podklyuchenie-k-mikopbx" id="podklyuchenie-k-mikopbx"></a>

1. Перейдите во вкладку "**Обслуживание**" -> "**Хранилище**".

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FVh9ckEtlndQrQYo5RgKY%2FMikoPBXstorageSection-cut.png?alt=media&amp;token=19e1d9f5-252b-4942-a780-33314b3b4490" alt=""><figcaption><p>Раздел "Хранилище"</p></figcaption></figure>

2. Перейдите на вкладку "**Облачное хранилище S3**" и заполните следующие поля:

* **Автоматическая загрузка записей в облачное хранилище** — включите переключатель.
* **URL точки доступа S3** — введите `https://sgp1.digitaloceanspaces.com` - замените sgp1 на Ваш регион.
* **Регион S3** — укажите регион Вашего бакета в DigitalOcean, в этой инструкции - `sgp1`.
* **Имя бакета S3** — укажите имя бакета, созданного в DigitalOcean (например, `mikopbx-s3-storage` в этой инструкции)
* **Ключ доступа** и **Секретный ключ** — вставьте значения, полученные в первой части этой инструкции (связка Access ключей).

Настройте ползунок **«Локальное хранение (режим S3)»** — выберите, как долго записи будут храниться локально до удаления после выгрузки в облако.

{% hint style="info" %}
Более короткое локальное хранение быстрее освобождает дисковое пространство.
{% endhint %}

Нажмите **«Сохранить»**.

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FrzUhS8bveVIzSFB9xMPk%2FS3DOMikoPBXCredentials-RU.png?alt=media&amp;token=1d063513-9b7f-4c7e-b586-6580af558191" alt=""><figcaption><p>Параметры для подключения S3 DigitalOcean</p></figcaption></figure>

После сохранения настроек нажмите "**Проверить соединение**". При успешном подключении появится сообщение «**Соединение с S3 успешно**» и начнется синхронизация записей телефонных разговоров.

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FU3U49RwiWvcSNPIHJNSQ%2FS3DOSuccesfulConnection-RU.png?alt=media&amp;token=57ef2a09-7d1f-4475-a01c-74a14ca8f040" alt=""><figcaption><p>Успешное подключение</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mikopbx.com/mikopbx/manual/maintenance/storage/digitalocean.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
