MCPSERV.CLUB
XBackBone

XBackBone

Self-Hosted

Lightweight PHP file manager for instant sharing

Active(75)
1.1kstars
0views
Updated Sep 9, 2025

Overview

Discover what makes XBackBone powerful

XBackBone is a **lightweight, self‑hosted PHP file manager** designed to expose a simple web UI and an API for uploading, browsing, and sharing files. At its core it is a *stateless* PHP application that stores metadata in an SQLite database while delegating file storage to a pluggable backend. The architecture intentionally keeps the PHP runtime minimal (≈ 10 MB) and relies on standard web server modules (Apache, Nginx, PHP‑FPM) to serve both the UI and the uploaded assets. This makes it trivial to drop into an existing LAMP/LEMP stack or to containerize with Docker for CI/CD pipelines.

Runtime

Framework

Database

Storage Backends

Overview

XBackBone is a lightweight, self‑hosted PHP file manager designed to expose a simple web UI and an API for uploading, browsing, and sharing files. At its core it is a stateless PHP application that stores metadata in an SQLite database while delegating file storage to a pluggable backend. The architecture intentionally keeps the PHP runtime minimal (≈ 10 MB) and relies on standard web server modules (Apache, Nginx, PHP‑FPM) to serve both the UI and the uploaded assets. This makes it trivial to drop into an existing LAMP/LEMP stack or to containerize with Docker for CI/CD pipelines.

Technical Stack & Architecture

  • Runtime: PHP 8.1+ (CLI and FPM), with no external dependencies beyond the PHP extensions required for image, PDF, and zip handling.

  • Framework: A custom MVC‑like structure built on top of the Symfony HTTP Foundation and Routing components, keeping the codebase lean while providing routing, request/response abstraction, and CSRF protection.

  • Database: SQLite3 for the core metadata (users, uploads, tags, logs). The schema is auto‑generated via migrations shipped in the repo, enabling zero‑config database provisioning.

  • Storage Backends: A strategy pattern abstracts the file store. Implementations include:

    • Local filesystem
    • AWS S3 (via AWS SDK for PHP)
    • Google Cloud Storage
    • Azure Blob Storage
    • Dropbox (via OAuth‑2 and the Dropbox SDK)
    • FTP(S) (using phpseclib)

    Developers can plug a new backend by implementing the StorageInterface and registering it in the service container.

  • Front‑end: Bootstrap 5 with optional Bootswatch themes, responsive mobile layout, and Vue.js components for the upload widget. All static assets are served from a public directory, enabling CDN caching.

Core Capabilities & APIs

  • ShareX Integration: A built‑in configuration generator that outputs ShareX JSON profiles. The API accepts the standard ShareX upload payload (multipart/form-data) and returns a public URL or a private token‑based link.
  • RESTful Endpoints:
    • POST /api/upload – upload a file, returns JSON with URL, size, type.
    • GET /api/files – list user uploads with pagination and filtering by tags or date.
    • DELETE /api/files/{id} – remove an upload (authorized only).
      These endpoints are guarded by token‑based authentication (JWT) for programmatic access.
  • Webhooks & Callbacks: Optional webhook support to notify external services (e.g., Slack, Telegram) on upload events. The payload is customizable via a simple JSON template.
  • Tagging & Metadata: Automatic tagging (e.g., image, video) and manual custom tags. Tags are stored in a join table, enabling efficient full‑text search via SQLite’s FTS5 extension.
  • User & Role Management: LDAP integration, registration flow, password reset via email. Roles (admin, user) control quota limits and visibility of uploads.

Deployment & Infrastructure

  • Self‑Hosting: A single PHP file (index.php) plus a public directory. No compiled binaries or complex services are required. The installer wizard can be run via the browser, creating the SQLite database and configuring the storage backend.
  • Containerization: Official Dockerfile available; the image exposes port 80 and mounts a volume for persistent storage. Kubernetes Helm charts are community‑maintained, allowing easy rollout in cloud or on-prem clusters.
  • Scalability: Statelessness allows horizontal scaling behind a load balancer. The SQLite database can be swapped for PostgreSQL or MySQL if multi‑node consistency is required; the migration scripts support this switch.
  • Performance: The lightweight PHP runtime and optional opcode caching (OPcache) keep CPU usage low. File transfers are streamed directly to the storage backend, avoiding intermediate disk writes for S3/Cloud backends.

Integration & Extensibility

  • Plugin System: Developers can add PHP modules that hook into upload events (onUpload, onDelete) or extend the UI via Blade‑like templates. The plugin manager scans a plugins/ directory and autoloads classes.
  • Webhooks & Callbacks: Configurable POST URLs that receive JSON payloads. Useful for CI pipelines that need to trigger builds when new assets are uploaded.
  • Custom Scripts: For Linux users, XBackBone can generate per‑user shell scripts that use curl or wget to upload files directly from the command line, integrating with existing automation scripts.

Developer Experience

  • Documentation: Comprehensive GitHub Pages cover installation, API reference, and advanced configuration. Inline PHPDoc annotations aid IDE autocompletion.
  • Community & Support: Active Discord channel, Weblate translation platform, and a CodeClimate badge indicating maintainability. Issues are triaged quickly due to the small codebase.
  • Licensing: AGPL‑3.0 ensures that any derivative work remains open, encouraging contributions while protecting the core from proprietary forks.

Use Cases

  1. Internal Asset Hub – A small team can host a private ShareX server for screenshots, logs, and build artifacts without relying on external cloud services.
  2. Continuous Integration Artifacts – CI pipelines can POST build logs or test reports to XBack

Open SourceReady to get started?

Join the community and start self-hosting XBackBone today