Overview
Discover what makes copyparty powerful
copyparty is a lightweight, Python‑centric web file server that exposes a rich set of protocols (HTTP, WebDAV, FTP, TFTP, SMB/CIFS) from a single process. At its core it is a **single‑threaded event loop** built on the `asyncio` framework, which allows it to handle thousands of concurrent resumable uploads and downloads without spawning a dedicated worker per connection. The server’s API surface is intentionally minimal: the web UI, a RESTful JSON endpoint for file metadata, and protocol adapters that map standard filesystem operations onto the same underlying storage layer. Because the code base is less than 5 k lines of pure Python, developers can inspect or extend the logic in a matter of minutes.
Language & Runtime
Frameworks
Storage
Protocols
Overview
copyparty is a lightweight, Python‑centric web file server that exposes a rich set of protocols (HTTP, WebDAV, FTP, TFTP, SMB/CIFS) from a single process. At its core it is a single‑threaded event loop built on the asyncio framework, which allows it to handle thousands of concurrent resumable uploads and downloads without spawning a dedicated worker per connection. The server’s API surface is intentionally minimal: the web UI, a RESTful JSON endpoint for file metadata, and protocol adapters that map standard filesystem operations onto the same underlying storage layer. Because the code base is less than 5 k lines of pure Python, developers can inspect or extend the logic in a matter of minutes.
Technical Stack
- Language & Runtime: Pure Python 3 (Python 2 support retained for legacy deployments). The application relies on the standard library plus optional packages (
aiohttp,pywebdav,pysmb), which are bundled in the self‑extracting installer (copyparty-sfx.py). - Frameworks:
asynciofor asynchronous I/O,aiohttp.webfor the HTTP/WebDAV server, and a custom lightweight WebSocket handler for real‑time upload progress. - Storage: The file system is the only persistent backend; no database is required. Permissions are enforced via per‑folder and per‑user ACL tables that can be stored in a simple SQLite file or an external key/value store.
- Protocols: Each protocol is implemented as a plugin that plugs into the core event loop. This modularity means you can drop in an FTP adapter or replace the SMB handler without touching the UI code.
Core Capabilities
- Resumable Transfers: HTTP
Rangeand WebDAVPUT/REPORTsupport allow clients to resume interrupted uploads/downloads. - Real‑time Progress: WebSocket broadcasts keep the UI in sync with server‑side upload progress and ETA calculations.
- File Operations: The API exposes CRUD operations (
/api/v1/file/<path>) that can be consumed by custom scripts or third‑party tools. - Sharing & Self‑Destruct: Tokens can be generated for read‑only or time‑limited access, enabling secure file sharing without a full authentication layer.
- CLI & Automation: A minimal command‑line interface (
copyparty --cli) allows scripted uploads, scheduled cleanups, and integration with CI pipelines.
Deployment & Infrastructure
copyparty is designed for edge‑side deployment: a single binary runs on Raspberry Pi, Intel NUCs, or cloud VMs. It requires only Python and the optional protocol libraries; no external services are needed. For production, a reverse proxy (NGINX or Caddy) can provide TLS termination and basic auth. Containerization is straightforward—Docker images are provided on Docker Hub, and the application can be run as a sidecar in Kubernetes with a hostPath volume for persistence. Horizontal scaling is achieved by deploying multiple instances behind a load balancer, each serving the same shared filesystem (e.g., NFS or Ceph).
Integration & Extensibility
The plugin architecture is exposed through a simple copyparty.plugins package. Developers can write custom protocol adapters, authentication backends, or even a new UI theme by overriding the Jinja templates. Webhooks are supported via POST callbacks on file events, enabling integration with CI/CD pipelines or notification services. The REST API is fully documented in the repo’s docs/api.md, and the source code includes extensive type hints, making it IDE‑friendly for rapid development.
Developer Experience
- Configuration: A single
copyparty.tomlfile controls everything—protocol ports, ACLs, storage paths, and plugin settings. - Documentation: The README is exhaustive, with a dedicated “features” section that compares copyparty to similar tools. The code comments are concise but explanatory, and the project follows semantic versioning.
- Community: The issue tracker is active, with a dedicated “not my bugs” label for community‑reported regressions. Contributors can submit pull requests that pass the automated test suite, which covers unit tests for each protocol adapter.
Use Cases
- Personal File Server: Quickly expose a folder over the LAN or Internet for family photo sharing, with optional self‑destruct timers.
- Development Environments: Integrate into CI pipelines to serve build artifacts or logs via HTTP/WebDAV, enabling easy inspection from any browser.
- IoT & Edge Devices: Run on low‑power hardware to collect sensor data via FTP/TFTP and expose it for remote monitoring.
- Internal Corporate Tool: Use the SMB/CIFS adapter to provide a lightweight file share for small teams without setting up an Active Directory domain controller.
Advantages
- Zero‑Configuration Runtime: No database migrations or external services; a single command starts a fully functional server.
- Performance: Asynchronous I/O and resumable transfers make it faster than legacy FTP servers on high‑latency links.
- Licensing: MIT‑licensed, allowing unrestricted use in commercial products.
- Extensibility: The minimal core and well‑defined plugin hooks let developers tailor the stack to niche protocols or custom authentication schemes.
For developers
Open SourceReady to get started?
Join the community and start self-hosting copyparty today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
mosparo
Spam protection without puzzles, just smart rules
Listaway
Self‑hosted public list sharing
Peergos
Private, end‑to‑end encrypted cloud for the web of your data
auto-mcs
Instant Minecraft server management for friends
SpeedTest by OpenSpeedTest™
HTML5 network speed test, no app required
CloudBeaver
Web‑based database manager for teams
