Melobox

Как подключить свою музыку из Cloudflare R2How to connect your music in Cloudflare R2

Сверено с документацией Cloudflare (ноябрь 2026). Кнопки названы так, как в интерфейсе Cloudflare — по-английски.Checked against the Cloudflare documentation (November 2026). Buttons are named as in the Cloudflare dashboard.

Что это и сколько стоитWhat it is and what it costs

Cloudflare R2 — облачное хранилище файлов. Вы кладёте туда свою музыку, Melobox её играет и скачивает.Cloudflare R2 is cloud file storage. You put your music there; Melobox plays and downloads it.

Чтобы включить R2, Cloudflare просит оформить подписку (checkout) — обычно это значит привязать банковскую карту. В пределах бесплатного лимита списаний нет.To enable R2, Cloudflare asks you to check out — usually that means adding a bank card. Within the free tier nothing is charged.

1. Аккаунт Cloudflare1. A Cloudflare account

Зайдите на dash.cloudflare.com и зарегистрируйтесь (почта и пароль) или войдите. Подтвердите почту по ссылке из письма.Go to dash.cloudflare.com and sign up (email and password) or log in. Confirm your email from the link you receive.

2. Включите R22. Enable R2

В левом меню: Storage & databases → R2 → Overview. Если R2 ещё не включён, пройдите оформление (checkout): тариф — бесплатный, оплата только сверх лимита.In the left menu: Storage & databases → R2 → Overview. If R2 is not enabled yet, go through checkout: the plan is free, you pay only beyond the free tier.

3. Создайте бакет3. Create a bucket

  1. R2 → Overview → Create bucket.R2 → Overview → Create bucket.
  2. Bucket name — например, melobox-music: маленькие латинские буквы, цифры и дефис, 3–63 символа.Bucket name — for example melobox-music: lowercase letters, digits and hyphens, 3–63 characters.
  3. Location — Automatic. Не выбирайте Specify jurisdiction без необходимости: её потом не изменить, а адрес такого бакета другой.Location — Automatic. Don't pick Specify jurisdiction unless you need it: it can't be changed later and such a bucket has a different address.
  4. Default storage class — Standard. Нажмите Create bucket.Default storage class — Standard. Click Create bucket.

Бакет закрытый — так и оставьте. Публичный доступ (r2.dev, свой домен) Melobox не нужен: иначе вашу музыку сможет скачать любой, кто узнает адрес.The bucket is private — keep it that way. Melobox doesn't need public access (r2.dev, a custom domain): with it, anyone who learns the address could download your music.

4. Загрузите музыку4. Upload your music

Удобнее всего раскладывать так: Исполнитель/Альбом/01 - Название.flac — тогда даже файлы без тегов попадут в правильный альбом. Обложку можно положить рядом файлом cover.jpg.The easiest layout is Artist/Album/01 - Title.flac — then even untagged files land in the right album. A cover can sit next to them as cover.jpg.

Немного файлов — через браузер: откройте бакет → Upload, перетащите файлы; папки создаются кнопкой Create folder.A few files — in the browser: open the bucket → Upload and drop the files; Create folder makes folders.

Много файлов — программой rclone (версия 1.59 или новее) на компьютере. Ей нужен отдельный ключ с правом записи (как в шаге 5, но с разрешением Object Read & Write). Этот ключ храните только на компьютере и в телефон не вводите.Many files — with rclone (1.59 or newer) on a computer. It needs a separate key with write access (as in step 5, but with Object Read & Write). Keep that key on the computer only; never enter it on the phone.

[r2]
type = s3
provider = Cloudflare
access_key_id = <Access Key ID>
secret_access_key = <Secret Access Key>
endpoint = https://<account-id>.r2.cloudflarestorage.com
acl = private
no_check_bucket = true

Загрузка папки:Upload a folder: rclone copy "D:\Music" r2:melobox-music --progress

5. Ключ только на чтение для телефона5. A read-only key for the phone

Melobox ничего не пишет в облако, поэтому ему хватает ключа, который умеет только читать. Если телефон потеряется, таким ключом нельзя удалить или испортить музыку.Melobox never writes to the cloud, so a key that can only read is all it needs. If the phone is lost, such a key can't delete or damage your music.

  1. R2 → Overview, блок Account Details → Manage рядом с API Tokens.R2 → Overview, the Account Details box → Manage next to API Tokens.
  2. Create Account API token, имя — например, melobox-phone.Create Account API token, name it e.g. melobox-phone.
  3. Permissions — Object Read only.Permissions — Object Read only.
  4. Specify bucket(s) — Apply to specific buckets only, ваш бакет.Specify bucket(s) — Apply to specific buckets only, your bucket.
  5. Нажмите Create Account API token.Click Create Account API token.
Secret Access Key показывается один раз. Не закрывайте страницу, пока не подключите телефон, или сохраните ключ в менеджер паролей.The Secret Access Key is shown only once. Keep the page open until the phone is connected, or save the key in a password manager.
В CloudflareIn CloudflareЧто этоWhat it is
Access Key IDЛогин ключа (32 символа)The key's login (32 characters)
Secret Access KeyПароль ключа (64 символа)The key's password (64 characters)
EndpointEndpoint https://<id>.r2.cloudflarestorage.comАдрес вашего хранилищаYour storage address

Значение Token value Melobox не нужно.Melobox doesn't need the Token value.

6. Подключите Melobox6. Connect Melobox

Проще всего — QR-кодом. Откройте на компьютере страницу подключения, вставьте адрес, бакет, Access Key ID и Secret Access Key, нажмите «Показать QR-код». В Melobox: Настройки → Облако → Сканировать QR-код. Страница работает прямо в браузере и ничего никуда не отправляет.Easiest — with a QR code. On your computer open the connect page, paste the address, bucket, Access Key ID and Secret Access Key, and click “Show QR code”. In Melobox: Settings → Cloud → Scan QR code. The page runs in your browser and sends nothing anywhere.

Или вручную: скопируйте значение в Cloudflare и нажмите в Melobox «Вставить» — оно само попадёт в нужное поле. Нажмите «Проверить и сохранить»: Melobox сохранит ключи, только если пробный запрос прошёл. Ключи хранятся на телефоне в зашифрованном виде и не попадают в резервные копии.Or by hand: copy a value in Cloudflare and tap “Paste” in Melobox — it goes to the right field. Tap “Check and save”: Melobox stores the keys only if a test request works. Keys are encrypted on the phone and never go into backups.

Сразу начнётся обновление из облака: Melobox прочитает теги файлов, не скачивая их целиком, и музыка появится в библиотеке со значком ☁.The cloud refresh starts right away: Melobox reads the files' tags without downloading them, and the music appears in the library marked ☁.

Если что-то не такTroubleshooting

СообщениеMessageЧто сделатьWhat to do
«Неверный ключ или секрет…»“Wrong key or secret…”Проверьте, что ключ скопирован без пробелов. Если секрет потерян — создайте новый ключ, старый удалите.Check the key was copied without spaces. If the secret is lost, create a new key and delete the old one.
«Такого бакета нет»“No such bucket”Имя бакета — маленькими буквами, как в Cloudflare. Для бакета с юрисдикцией EU адрес — https://<id>.eu.r2.cloudflarestorage.com.The bucket name is lowercase, exactly as in Cloudflare. For an EU-jurisdiction bucket the address is https://<id>.eu.r2.cloudflarestorage.com.
«Не удаётся связаться с облаком»“Can't reach the cloud”Проверьте интернет и адрес.Check the internet connection and the address.
Треки не появилисьNo tracks appearВ бакете должны быть аудиофайлы: mp3, flac, ogg, opus, m4a (AAC и ALAC), wav. Нажмите «Обновить из облака».The bucket must hold audio files: mp3, flac, ogg, opus, m4a (AAC and ALAC), wav. Tap “Refresh from cloud”.

Как отозвать доступ телефона: R2 → Overview → Manage (API Tokens) → удалите ключ melobox-phone. Музыка в облаке не пострадает.To revoke the phone's access: R2 → Overview → Manage (API Tokens) → delete the melobox-phone key. The music in the cloud stays.

Поделиться коллекцией: создайте для другого человека отдельный ключ только на чтение и покажите ему QR-код. Отозвать доступ — удалить этот ключ.Sharing your collection: make a separate read-only key for the other person and show them the QR code. To revoke access, delete that key.