পণ্যের অংশে চলে যান
LCPanelলাইসেন্স সেন্টার প্যানেল
BXP BoxPuff টি অধ্যায়

BoxPuff ডকুমেন্টেশন

Cloudflare R2 ফাইল স্টোরেজ

এন্ডপয়েন্টে আপনার অ্যাকাউন্ট আইডি, R2 API টোকেন আর সরাসরি আপলোডের CORS নিয়মসহ Cloudflare R2-কে ফাইল সার্ভারের ধরন হিসেবে যোগ করে; ইগ্রেস ফি নেই। প্রিমিয়াম।

প্লাগইন হালনাগাদ ৬ নভে ২০২৬ ৪৪ / ৫০

The Cloudflare R2 plugin adds Cloudflare R2 as a file server type. R2 is Cloudflare's object storage with no egress fees: you pay for what is stored, not for what is downloaded, which is exactly the cost shape a file host wants. The plugin fills in R2's endpoint pattern and its single auto region; you type the account id, an API token's keys and the bucket, and the core's S3 driver signs the links.

Who it is for

Any owner who serves far more than they store - and especially sites already behind Cloudflare, where R2 sits on the same account and the same network. Several R2 servers can sit beside local and other servers; File servers explains how an upload picks its server.

Switching it on

A premium plugin, key storage-cloudflare-r2. Buy it on lcpanel.com, open Admin → Configuration → License and press Check again now, then switch it on at Admin → Extensions → Plugins (the Manage Plugins page). Its settings page carries one How to use note; the bucket is set up on the server.

Adding the server

Admin → Infrastructure → File Servers → Add File Server. On the Add Storage Server page choose Cloudflare R2 as the Server Type. The page tells you what to do: Replace ACCOUNT_ID in the endpoint with your Cloudflare account id (R2 overview page) and make an R2 API token with object read & write. For direct uploads add a CORS rule on the bucket: AllowedOrigins = this site, AllowedMethods = GET, PUT, POST, HEAD, AllowedHeaders = *, ExposeHeaders = ETag.

FieldWhat to type
Access Key, Secret KeyThe access key id and secret of an R2 API token with object read and write.
BucketThe R2 bucket's name.
Regionauto - R2's only region.
EndpointACCOUNT_ID.r2.cloudflarestorage.com - replace ACCOUNT_ID with your account id from the R2 overview page.
Path-style URLsOff.
Key PrefixOptional folder inside the bucket.
Direct DownloadsYes = signed links straight from R2; No = streamed through the site.
Direct UploadsYes = the browser uploads to R2 in parallel pieces (CORS rule needed).
Public / CDN URL (optional)A custom domain or the public bucket address, if you connected one; public links are served from there.
Signed Link LifetimeSeconds a signed link stays valid (3600).

Add a Server Label and Status, go through CDN Support, Storage Options (Max Storage, Server Priority), Geo Targeting and Account Type Targeting, then press Save and test.

CORS for direct uploads

Direct uploads mean a visitor's browser PUTs pieces into your bucket. R2 only allows that when the bucket carries a CORS rule naming your site: AllowedOrigins your site's address, AllowedMethods GET, PUT, POST, HEAD, AllowedHeaders *, ExposeHeaders ETag. The ready-made JSON is under CORS rule the bucket needs for direct uploads on the server form and on the S3 Connection Test page of the free Amazon S3 File Storage plugin. Until the rule is there, uploads take the site's own chunk.php road (Uploads).

Downloads

With Direct Downloads on, every download is a signed link to R2 and costs you nothing in bandwidth. Site Settings → File Downloads → Direct bucket links only for unlimited speed sends members on a speed-limited package through the site's stream instead, so the cap holds (Downloads). If the site itself is behind Cloudflare, keep Upload piece size (MB) under 100 as the help text says.

Tips

  • One API token per site, with access to that bucket only: when a token is rotated, edit the server and press Save and test.
  • An endpoint still reading ACCOUNT_ID.r2.cloudflarestorage.com is the most common cause of "Save and test" failing - the placeholder must be replaced.
  • Uploads reach the server only when Site Settings → File Uploads picks it (Specific Server, a Server Priority with Until Full, or Least Used Space with a sensible Max Storage).
  • Deletes and moves on the bucket are queued for the cron's Process file queue job (Scheduled jobs); the used-space figures refresh every five minutes.
এটি কি কাজে লেগেছে?
এই অধ্যায়টি শেয়ার করুন