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

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

ফাইল সার্ভার

লোকাল, node.php সহ Direct নোড, FTP, SFTP ও S3-সদৃশ বাকেট; সার্ভার ফর্ম, বাছাইয়ের পদ্ধতি, দেশ ও অ্যাকাউন্ট টার্গেটিং, রিসোর্স আর ফাইল সরানো।

স্টোরেজ, আয় ও চেহারা হালনাগাদ ৬ নভে ২০২৬ ৯ / ৫০

A file server is a place where bytes live. BoxPuff starts with one - the local files/ folder - and lets you add as many more as you need: other machines running BoxPuff (Direct), FTP and SFTP servers, and S3-compatible buckets. Every stored copy of a file (an artifact) points at a server and a key such as 9c/9cfc7a..., so files can be spread over many servers and moved between them without changing a single link.

Admin → Infrastructure → File Servers lists the servers with type, status, files, used space, free disk (when monitored) and the buttons Test, Edit and Remove (the local server and a server that still holds copies cannot be removed). Add File Server opens the form.

The server form

Page Add Storage Server / Edit Storage Server, with tabs:

  • Server Details - Server Label, Status (Active, Disabled, Read Only - keeps serving but takes no new uploads), Server Type (fixed once files are stored), then the type's own fields (below).
  • CDN Support - CDN URL: a CDN pointed at this server; public links are served from it.
  • Storage Options - Max Storage (bytes, 0 = unlimited) and Server Priority (used by the Until Full method: priority 1 fills first).
  • Geo Targeting - uploads from visitors in the ticked countries go to this server.
  • Account Type Targeting - only the ticked packages upload here (premium members on a fast server, say).
  • Installation Guidance - the steps for a Direct server and the web-server lines for Improved Downloads.

Save and test saves and runs the driver's test at once; the result appears as a message.

Local Storage

Files on the same machine as the site. Fields: Server Path To Install (worked out when empty), File Storage Path (files/, relative to the script root; symlinks allowed, an absolute path too - that is how a migrated YetiShare files/ folder is used in place), Improved Downloads (X-Sendfile (Apache), X-Accel-Redirect (Nginx), X-LiteSpeed-Location (LiteSpeed) - see Downloads), and Monitor Server Resources.

External Server (Direct)

A second machine with the same BoxPuff files, the same config.php (same database, same BP_SECRET) and its own domain, say fs1.yoursite.com. Uploads go straight to its chunk.php, downloads are served from its own bandwidth, and it honours the same download tokens because it reads the same database. The guidance tab spells out the steps:

  1. Upload the same files and config.php to the file server; do not run install.php there.
  2. Point a domain or sub-domain at it with the same protocol (https) as the main site.
  3. Set Site Settings → Site Options → User session type to Database Sessions so both machines see the same login.
  4. Add the cron line on the file server too, so its deletes and moves run.
  5. Save the server with type External Server (Direct), then press Test: it answers with its version and free space.

Fields: File Server Domain Name, URL Path (/ unless the script sits in a sub-folder there), Server Path To Install, File Storage Path, Improved Downloads, File Server Download Protocol, Node Key (a shared secret; leave empty to have one made - when the file server has its own config.php, put the same value there as BP_NODE_KEY), Monitor Server Resources, and Enable Availability Checker (the cron pings it every five minutes and leaves it out of the upload pool while it is down). Every call between the two machines goes to node.php and is signed with the node key.

FTP and SFTP

Any FTP server (FTP Host, Port, Username, Password, File Storage Path as the FTP user sees it, Enable Passive Mode, Use FTPS (TLS)) or an SSH server (SFTP Host, Port, Username, Password or a Private Key, File Storage Path; needs the PHP ssh2 extension). Uploads and downloads pass through the site - fine for personal sites and smaller files. The optional Public URL is for a folder that a web server also serves (https://cdn.example.com/files): downloads then go straight from there.

Amazon S3 and S3-compatible buckets

The core speaks S3 natively; the free Amazon S3 File Storage plugin adds the region list and a connection-test page, and the premium plugins add ready-made types for Wasabi, Backblaze B2, DigitalOcean Spaces, Contabo, Minio, Filebase and Cloudflare R2 with their endpoints filled in. Every bucket type shares one field set: Access Key, Secret Key, Bucket, Region, Endpoint ({region} is filled in), Path-style URLs, Key Prefix, Direct Downloads (signed links straight from the bucket - No streams through the site and hides the bucket), Direct Uploads (the browser sends pieces straight to the bucket; the bucket needs the CORS rule shown under the fields), Public / CDN URL (optional) and Signed Link Lifetime (seconds, default 3600). Bucket keys get the file's extension so the bucket serves the right content type.

How a server is chosen for an upload

Site Settings → File Uploads → File server selection method:

MethodRule
Least Used Space (default)The server with most room left (or least used when unlimited).
Specific ServerAlways Default file server.
Until Full (by priority)Priority 1 until its Max Storage is reached, then 2, and so on.
Random ServerSpread evenly.

Server upload pooling sends each file of one multi-file upload to a random server. Before the method runs, the candidates are narrowed: only Active and available servers, those whose Account Type Targeting includes the uploader's package, whose Geo Targeting includes the uploader's country, and whose Max Storage still has room for the file. A member can also be pinned to one server with Upload Server Override on Edit User → Advanced.

Resources and monitoring

With Monitor Server Resources on, the cron job Server resources (every five minutes) records disk use, load and open connections of the local server and of Direct servers (asked through node.php), keeps 30 days of history and refreshes the file counts and used bytes shown on the list. Server availability pings Direct servers that have the availability checker on. Test Tools → File server runs a write test on demand.

Moving files between servers

Set a server to Read Only and new uploads go elsewhere while its files stay reachable. Deletes, moves and copies are queued (bp_file_actions) and run by Process file queue; Admin → Files → Action Queue shows them. A file's copies are listed on its Artifacts tab in the admin.

Tips

  • Start local; when disk or bandwidth pinches, add a bucket with Direct Downloads and set the local server to Read Only. Nothing else changes.
  • Behind Cloudflare the fast upload road still works with a bucket - the pieces go to the bucket, not through Cloudflare.
  • One site, several countries? Two Direct servers with Geo Targeting put each visitor's uploads close to home.
  • Keep Max Storage a little under the real disk so the server never fills completely.
এটি কি কাজে লেগেছে?
এই অধ্যায়টি শেয়ার করুন