simple-torrent
☁️ Simple Torrent: a self-hosted remote torrent client (rebranded from Cloud Torrent)
Top Related Projects
Full-featured BitTorrent client package and utilities
☁️ Cloud Torrent: a self-hosted remote torrent client
⚡️ Streaming torrent client for the web
Official Transmission BitTorrent client repository
qBittorrent BitTorrent client
aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
Quick Overview
Simple Torrent is a self-hosted remote torrent client, written in Go. It allows users to manage and download torrents through a clean web UI, offering features like file system browsing, torrent searching, and mobile device support.
Pros
- Easy to set up and use with a user-friendly web interface
- Cross-platform compatibility (Windows, macOS, Linux)
- Supports both magnet links and torrent files
- Lightweight and efficient, with low resource usage
Cons
- Limited advanced features compared to some other torrent clients
- May require additional setup for remote access and security
- Not as actively maintained as some larger torrent client projects
Getting Started
To get started with Simple Torrent:
- Download the latest release for your platform from the GitHub releases page.
- Extract the archive and run the executable:
./cloud-torrent
-
Open a web browser and navigate to
http://localhost:3000
to access the web UI. -
To customize the configuration, you can use command-line flags:
./cloud-torrent --port 8080 --host 0.0.0.0 --auth admin:password123
This example starts Simple Torrent on port 8080, accessible from any IP, with basic authentication enabled.
For Docker users, you can run Simple Torrent using:
docker run -d -p 3000:3000 -v /path/to/downloads:/downloads boypt/cloud-torrent
Replace /path/to/downloads
with the directory where you want to store downloaded files.
Competitor Comparisons
Full-featured BitTorrent client package and utilities
Pros of torrent
- Written in Go, offering better performance and concurrency
- More comprehensive and feature-rich library for BitTorrent operations
- Actively maintained with frequent updates and improvements
Cons of torrent
- Higher complexity, steeper learning curve for beginners
- Requires more setup and configuration for basic usage
- Less user-friendly interface compared to simple-torrent
Code Comparison
simple-torrent:
engine, err := torrent.NewEngine(config)
if err != nil {
log.Fatal(err)
}
engine.StartTorrent(magnetLink)
torrent:
client, err := torrent.NewClient(nil)
if err != nil {
log.Fatal(err)
}
t, err := client.AddMagnet(magnetLink)
<-t.GotInfo()
t.DownloadAll()
Both repositories provide BitTorrent functionality, but torrent offers a more comprehensive and flexible approach. simple-torrent focuses on simplicity and ease of use, making it more suitable for quick implementations or projects with basic torrent requirements. torrent, on the other hand, provides a robust library with advanced features and better performance, making it ideal for more complex applications or those requiring fine-grained control over torrent operations.
☁️ Cloud Torrent: a self-hosted remote torrent client
Pros of cloud-torrent
- More actively maintained with recent updates
- Includes a search feature for finding torrents
- Offers a mobile-friendly interface
Cons of cloud-torrent
- Larger codebase, potentially more complex to understand and modify
- Fewer configuration options compared to simple-torrent
- Less emphasis on simplicity and minimalism
Code Comparison
simple-torrent:
func (s *Server) serveFiles(w http.ResponseWriter, r *http.Request) {
if !s.Dev {
w.Header().Set("Cache-Control", "max-age=86400")
}
http.ServeFile(w, r, s.staticDir)
}
cloud-torrent:
func (s *Server) serveStatic(w http.ResponseWriter, r *http.Request) {
path := r.URL.Path
if path == "/" {
path = "/index.html"
}
data, err := static.Asset(path)
if err != nil {
http.Error(w, "Not Found", http.StatusNotFound)
return
}
http.ServeContent(w, r, path, time.Time{}, bytes.NewReader(data))
}
Both projects serve static files, but cloud-torrent uses an asset management approach, while simple-torrent directly serves files from a directory. This reflects cloud-torrent's more feature-rich design compared to simple-torrent's minimalist approach.
⚡️ Streaming torrent client for the web
Pros of WebTorrent
- Browser-based streaming: WebTorrent allows for in-browser torrent streaming without additional software
- Wider ecosystem: Offers a more extensive set of tools and libraries for developers
- Active development: More frequent updates and larger community support
Cons of WebTorrent
- Higher resource usage: May consume more system resources, especially for larger torrents
- Complexity: Can be more challenging to set up and integrate for simple use cases
- Limited server-side functionality: Primarily focused on client-side and browser-based operations
Code Comparison
WebTorrent (client-side usage):
const WebTorrent = require('webtorrent')
const client = new WebTorrent()
client.add(torrentId, function (torrent) {
torrent.files.forEach(file => {
file.appendTo('body')
})
})
simple-torrent (server-side usage):
engine, err := torrent.NewTorrent(torrentPath)
if err != nil {
log.Fatal(err)
}
engine.StartDownload()
Both projects aim to simplify torrent handling, but WebTorrent focuses on browser-based streaming and a JavaScript ecosystem, while simple-torrent provides a lightweight, server-side solution in Go. WebTorrent offers more features and flexibility, whereas simple-torrent is more straightforward for basic torrent management tasks.
Official Transmission BitTorrent client repository
Pros of Transmission
- More mature and widely-used project with extensive community support
- Offers a broader range of features, including bandwidth scheduling and remote control
- Available on multiple platforms (desktop, web, mobile) with consistent user experience
Cons of Transmission
- Heavier resource usage, especially for large numbers of torrents
- More complex setup and configuration process
- Less frequent updates compared to Simple-torrent
Code Comparison
Transmission (C++):
int tr_torrentSetLocation(tr_torrent* tor, char const* location, bool move_from_old_path, bool * set_location_error)
{
TR_ASSERT(tr_isTorrent(tor));
TR_ASSERT(location != nullptr);
TR_ASSERT(set_location_error != nullptr);
Simple-torrent (Go):
func (e *Engine) NewTorrent(magnetURI string) error {
t, err := e.upsertTorrent(magnetURI)
if err != nil {
return err
}
go e.download(t)
return nil
}
The code snippets show different approaches: Transmission uses C++ with more complex function signatures, while Simple-torrent employs Go with simpler, more concise code structures.
qBittorrent BitTorrent client
Pros of qBittorrent
- More feature-rich and mature client with a full GUI
- Supports advanced features like RSS feeds and IP filtering
- Cross-platform compatibility (Windows, macOS, Linux)
Cons of qBittorrent
- Larger codebase and more complex to set up
- Requires more system resources due to its full-featured nature
- May have a steeper learning curve for new users
Code Comparison
simple-torrent (Go):
func (s *Server) updateTorrent(t *Torrent) {
s.state.Lock()
defer s.state.Unlock()
if t.IsOpen() {
t.Update()
}
}
qBittorrent (C++):
void TorrentHandle::updateStatus()
{
if (m_nativeStatus.needsUpdate()) {
m_nativeStatus = m_nativeHandle.status();
m_nativeHandle.get_peer_info(m_peerInfo);
}
}
Both projects handle torrent status updates, but qBittorrent's implementation is more complex due to its broader feature set and use of C++. simple-torrent's Go code is more concise and easier to read, reflecting its simpler design philosophy.
aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
Pros of aria2
- More feature-rich and versatile, supporting multiple protocols (HTTP, FTP, BitTorrent, Metalink)
- Highly customizable with extensive configuration options
- Better suited for advanced users and integration into other applications
Cons of aria2
- Steeper learning curve due to its command-line interface and complexity
- Requires more setup and configuration to get started
- Less user-friendly for beginners compared to simple-torrent's web interface
Code Comparison
aria2:
void DefaultBtMessageDispatcher::addMessageToQueue(
std::unique_ptr<BtMessage> msg)
{
messageQueue_.push_back(std::move(msg));
}
simple-torrent:
func (engine *Engine) NewTorrent(magnetURI string) error {
tt, err := torrent.TorrentSpecFromMagnetURI(magnetURI)
if err != nil {
return err
}
t, _, err := engine.client.AddTorrentSpec(tt)
if err != nil {
return err
}
return engine.newTorrent(t)
}
The code snippets demonstrate the different languages and approaches used in each project. aria2 is written in C++ and focuses on low-level message handling, while simple-torrent uses Go and provides a higher-level API for torrent management.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
SimpleTorrent is a a self-hosted remote torrent client, written in Go (golang). Started torrents remotely, download sets of files on the local disk of the server, which are then retrievable or streamable via HTTP.
This project is a re-branded fork of cloud-torrent by jpillora
.
Features
- Individual file download control (1.1.3+)
- Run external program on tasks completion:
DoneCmd
- Stops task when seeding ratio reached:
SeedRatio
- Download/Upload speed limiter:
UploadRate
/DownloadRate
- Detailed transfer stats in web UI.
- Torrent Watcher
- K8s/docker health-check endpoint
/healthz
- Extra trackers from external source
- Protocol Handler to
magnet:
- Magnet RSS subscribing supported
- Flexible config file accepts multiple formats (.json/.yaml/.toml) (by spf13/Viper) (1.2.0+)
Also:
- Single binary
- Cross platform
- Embedded torrent search
- Real-time updates
- Mobile-friendly
- Fast content server
- IPv6 out of the box
- Updated torrent engine from anacrolix/torrent
Install
Binary
See the latest release or use the oneline script to do a quick install on a modern Linux machines.
bash <(wget -qO- https://git.io/simpletorrentqs)
The script installs a systemd unit (under scripts/cloud-torrent.service
) as service. Read further intructions: Auth And Security
If hope to specify a version, just append the version number to the command.
bash <(wget -qO- https://git.io/simpletorrentqs) 1.3.3
Docker
$ docker run -d -p 3000:3000 -v /path/to/my/downloads:/downloads -v /path/to/my/torrents:/torrents boypt/cloud-torrent
When running as a container, keep in mind:
- You need also to expose your torrent incoming port (50007 by default) if you want to seed (
-p 50007:50007
). Also, you'll have to forward the port on your router. - Automatic port forwarding on your router via UPnP IGD will not work unless run in
host
mode (--net=host
).
It's more practical to run docker-compose, see Wiki Page: DockerCompose
Source
Requirement
- Latest Golang (Go 1.16+)
$ git clone https://github.com/boypt/simple-torrent.git
$ cd simple-torrent
$ ./scripts/make_release.sh
Usage
Commandline Options
See Wiki Command line Options
Configuration file
See Wiki Config File
Use with WEB servers (nginx/caddy)
See Wiki Behind WebServer (reverse proxying)
Credits
- Credits to @jpillora for Cloud Torrent.
- Credits to @anacrolix for https://github.com/anacrolix/torrent
Top Related Projects
Full-featured BitTorrent client package and utilities
☁️ Cloud Torrent: a self-hosted remote torrent client
⚡️ Streaming torrent client for the web
Official Transmission BitTorrent client repository
qBittorrent BitTorrent client
aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot