Overview
Discover what makes Webtor powerful
Webtor is a self‑hosted, peer‑to‑peer file sharing service that exposes torrent contents through HTTP endpoints. The core idea is to act as a lightweight “torrent engine” that can serve individual files, stream media on‑the‑fly, or package an entire torrent into a ZIP archive—all without requiring a traditional BitTorrent client on the user side. From a developer’s perspective, Webtor offers a single Docker image that bundles all dependencies (torrent parsing, HTTP serving, media transcoding support) and exposes a clean REST‑style API for integration into web applications.
Direct Download Links (DDL)
Instant Media Streaming
On‑the‑Fly ZIP Packaging
SDK & API
Overview
Webtor is a self‑hosted, peer‑to‑peer file sharing service that exposes torrent contents through HTTP endpoints. The core idea is to act as a lightweight “torrent engine” that can serve individual files, stream media on‑the‑fly, or package an entire torrent into a ZIP archive—all without requiring a traditional BitTorrent client on the user side. From a developer’s perspective, Webtor offers a single Docker image that bundles all dependencies (torrent parsing, HTTP serving, media transcoding support) and exposes a clean REST‑style API for integration into web applications.
Key Features
- Direct Download Links (DDL) – Select any file inside a torrent and generate an HTTP URL that streams the file directly to the browser.
- Instant Media Streaming – The service can stream video/audio files (avi, mkv, mp4, webm, m4v, ts, vob; mp3, wav, ogg, flac, m4a) by piping the torrent piece data straight to a client without prior full download.
- On‑the‑Fly ZIP Packaging – A single request can trigger a streaming ZIP that preserves the torrent’s directory tree, useful for bulk downloads or archival.
- SDK & API – A JavaScript SDK (link provided) exposes high‑level methods to embed torrent playback into custom sites, while a low‑level HTTP API allows developers to construct URLs for any supported operation.
Technical Stack
- Language & Runtime – The core is written in Go, chosen for its native concurrency primitives and efficient I/O handling.
- Torrent Engine – It uses a custom BitTorrent implementation that follows the BEP standards, enabling fast piece selection and peer management.
- HTTP Server – Built on Go’s
net/httpwith optional TLS termination via environment variables. - Containerization – The application is distributed as a single Docker image (
ghcr.io/webtor-io/self-hosted:latest), simplifying deployment across Kubernetes, Docker‑Compose, or bare‑metal hosts. - Persistence – Torrent metadata and user data are stored in a local SQLite database; the actual file cache lives under a mounted
/datavolume. - Auto‑Cleanup – Environment variables (
CLEANER_FREE,CLEANER_KEEP_FREE) control a background goroutine that frees disk space when thresholds are crossed.
Deployment & Infrastructure
Webtor is intentionally lightweight: a single CPU core and 512 MiB of RAM suffice for modest usage, while scaling to dozens of concurrent streams is achievable by running multiple container replicas behind a load balancer. Because the service runs in Docker, it can be orchestrated with Kubernetes Deployments and ConfigMaps for environment variables. The stateless nature of the HTTP endpoints means that any instance can serve any torrent, allowing horizontal scaling without shared state.
Integration & Extensibility
- Webhooks – The SDK can trigger callbacks when a torrent finishes downloading or when a stream ends, enabling automated workflows.
- Plugin Hooks – While the core does not expose a plugin API, the Go code is open source; developers can fork and extend it to add custom authentication layers or integrate with external databases.
- WebDAV Support – The UI mentions WebDAV, suggesting that the service can expose a virtual file system over HTTP, useful for integrating with existing media servers.
- Stremio Add‑on – An official Stremio add‑on demonstrates the ability to publish library metadata and stream URLs directly into third‑party media players.
Developer Experience
Configuration is driven almost entirely by environment variables, making it straightforward to adjust domain names (DOMAIN), cleanup thresholds, or port mappings. The documentation is concise and includes a clear Docker‑run example; the SDK repository provides usage examples for embedding torrent playback. Community support appears active on GitHub, with issues and pull requests being addressed promptly.
Use Cases
- Media‑Rich Websites – Embed a “watch now” button that streams torrent videos without requiring users to install clients.
- Educational Content Distribution – Host large datasets or lecture recordings in torrent form and let students download only the parts they need.
- Enterprise File Sharing – Leverage peer‑to‑peer distribution to reduce bandwidth costs for internal file releases.
- Personal Library Management – Combine with the Webtor UI’s personal library feature to organize and stream a home media collection.
Advantages Over Alternatives
| Aspect | Webtor | Competing Solutions |
|---|---|---|
| Performance | Go runtime + native BitTorrent engine → low latency, high throughput. | Node/JavaScript stacks often rely on external clients or slower I/O. |
| Licensing | MIT‑style open source with permissive Docker image distribution. | Some alternatives are closed source or require paid licenses. |
| Ease of Deployment | Single Docker image, no external services needed. | Multi‑service stacks (torrent client + web server) increase complexity. |
| Developer Flexibility | SDK, API, and open source code allow deep customization. | Many SaaS providers expose only limited endpoints. |
| Scalability | Stateless HTTP endpoints + volume‑based caching → horizontal scaling. | Some solutions lock state to a single instance, limiting scale. |
In summary, Webtor offers developers a compact, high‑performance platform for exposing torrent contents over HTTP. Its Go‑based architecture, Docker readiness, and rich SDK make it a compelling choice for projects that need on‑the‑fly media streaming or selective file downloads without the overhead of traditional BitTorrent clients.
Open SourceReady to get started?
Join the community and start self-hosting Webtor 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
ToolJet
Build internal apps and AI agents in minutes
TimeTagger
Tag your time, get the insight
Kanboard
Simple self‑hosted Kanban for focused project management
Miaou
Self‑hosted multi‑room chat with rich features
django-wiki
Collaborative wiki built on Django, supporting Markdown editing
Habitica
Gamify your habits and tasks