{"id":37211609,"url":"https://github.com/tgragnato/magnetico","last_synced_at":"2026-01-15T00:05:48.431Z","repository":{"id":176309368,"uuid":"655030718","full_name":"tgragnato/magnetico","owner":"tgragnato","description":"Autonomous (self-hosted) BitTorrent DHT search engine suite","archived":false,"fork":true,"pushed_at":"2025-12-19T09:00:06.000Z","size":21343,"stargazers_count":118,"open_issues_count":6,"forks_count":23,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-12-21T17:46:00.581Z","etag":null,"topics":["bittorrent","dht","magnetico","search-engine","self-hosted"],"latest_commit_sha":null,"homepage":"https://tgragnato.it/magnetico/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"boramalper/magnetico","license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tgragnato.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-17T17:03:21.000Z","updated_at":"2025-12-21T04:07:25.000Z","dependencies_parsed_at":"2023-09-24T07:48:32.813Z","dependency_job_id":"7cbf12c6-2986-43ec-937d-04a48c9007b6","html_url":"https://github.com/tgragnato/magnetico","commit_stats":null,"previous_names":["tgragnato/magnetico"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tgragnato/magnetico","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgragnato%2Fmagnetico","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgragnato%2Fmagnetico/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgragnato%2Fmagnetico/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgragnato%2Fmagnetico/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tgragnato","download_url":"https://codeload.github.com/tgragnato/magnetico/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgragnato%2Fmagnetico/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28439611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bittorrent","dht","magnetico","search-engine","self-hosted"],"created_at":"2026-01-15T00:05:47.706Z","updated_at":"2026-01-15T00:05:48.372Z","avatar_url":"https://github.com/tgragnato.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# magnetico\n*Autonomous (self-hosted) BitTorrent DHT search engine suite.*\n\n[![Go](https://github.com/tgragnato/magnetico/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/tgragnato/magnetico/actions/workflows/go.yml)\n[![CodeQL](https://github.com/tgragnato/magnetico/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/tgragnato/magnetico/actions/workflows/codeql.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/tgragnato/magnetico)](https://goreportcard.com/report/github.com/tgragnato/magnetico)\n[![codecov](https://codecov.io/gh/tgragnato/magnetico/branch/main/graph/badge.svg)](https://codecov.io/gh/tgragnato/magnetico)\n\n![Flow of Operations](/doc/operations.svg)\n\nmagnetico is the first autonomous (self-hosted) BitTorrent DHT search engine suite that is *designed for end-users*. The suite consists of a single binary with two components:\n\n- a crawler for the BitTorrent DHT network, which discovers info hashes and fetches metadata from the peers.\n- a lightweight web interface for searching and browsing the torrents discovered by its counterpart.\n\nThis allows anyone with a decent Internet connection to access the vast amount of torrents waiting to be discovered within the BitTorrent DHT space, *without relying on any central entity*.\n\n**magnetico** liberates BitTorrent from the yoke of centralised trackers \u0026 web-sites and makes it\n*truly decentralised*. Finally!\n\n## Easy Run and Compilation\n\nThe easiest way to run magnetico is to use the OCI image built within the CI pipeline:\n- `docker pull ghcr.io/tgragnato/magnetico:latest`\n- `docker run --rm -it ghcr.io/tgragnato/magnetico:latest --help`\n- `docker run --rm -it -v \u003cyour_data_dir\u003e:/data -p 8080:8080/tcp ghcr.io/tgragnato/magnetico:latest --addr=0.0.0.0:8080 --database=sqlite3:///data/magnetico.sqlite3`\n- visit `http://localhost:8080`\n\nTo compile using the standard Golang toolchain:\n- Download the latest golang release from [the official website](https://go.dev/dl/)\n- Follow the [installation instructions for your platform](https://go.dev/doc/install)\n- Checkout the repository and run `go install --tags fts5 .`\n- The `magnetico` binary is now available in your `$GOBIN` directory\n\n### PostgreSQL\n\nPostgreSQL is a powerful, scalable database with advanced features for complex applications and high concurrency.\nSQLite is lightweight and easy to embed, ideal for simpler or smaller-scale applications.\nYou might prefer PostgreSQL if you need scalability, advanced features, and robust concurrency management.\n\nThe installation of PostgreSQL varies depending on the OS and the final configuration you want to achieve.\nAfter setting it up, you should create a user, set a password, create a database owned by that user, and load the `pg_trgm` extension.\n\n- `CREATE USER magnetico WITH PASSWORD 'magnetico';`\n- `CREATE DATABASE magnetico OWNER magnetico;`\n- `\\c magnetico`\n- `CREATE EXTENSION IF NOT EXISTS pg_trgm;`\n- `docker run --rm -it ghcr.io/tgragnato/magnetico:latest --help`\n- `docker run --rm -it -p 8080:8080/tcp ghcr.io/tgragnato/magnetico:latest --addr=0.0.0.0:8080 --database=postgres://magnetico:magnetico@localhost:5432/magnetico?sslmode=disable`\n- visit `http://localhost:8080`\n\n### CockroachDB\n\nCockroachDB is ideal for situations when horizontal scalability, high availability, and global distribution is required.\nIt currently does not support the `pg_trgm` extension, which provides functions for trigram-based similarity searching.\n\n- create a user and it's database\n- download the TLS certificate of your cluster\n- `docker run --rm -it ghcr.io/tgragnato/magnetico:latest --help`\n- `docker run --rm -it -v \u003cyour_cert_dir\u003e:/data -p 8080:8080/tcp ghcr.io/tgragnato/magnetico:latest --addr=0.0.0.0:8080 --database=cockroach://magneticouser:magneticopass@mycluster.crdb.io:26257/magnetico?sslmode=verify-full\u0026sslrootcert=/data/cc-ca.crt`\n- visit `http://localhost:8080`\n\n### ZeroMQ\n\nZeroMQ is a high-performance messaging library that provides a set of tools for communication between distributed applications.\nThe integration is designed in the persistence layer as a ZMQ PUB firehose, and works under the zeromq and zmq URL schemas.\n\n- `docker run --rm -it ghcr.io/tgragnato/magnetico:latest --help`\n- `docker run --rm -it ghcr.io/tgragnato/magnetico:latest -d --database=zeromq://localhost:5555`\n\n### RabbitMQ\n\nRabbitMQ is an open-source message broker that facilitates communication between distributed systems by queuing and routing messages. It supports multiple messaging protocols and ensures reliable message delivery for scalable applications.\nThe integration is designed in the persistence layer following the Publish/Subscribe model, and operates over a durable queue named `magnetico` routed through an exchange.\n\n- `docker run --rm -it ghcr.io/tgragnato/magnetico:latest --help`\n- `docker run --rm -it ghcr.io/tgragnato/magnetico:latest -d --database=amqp://localhost:5672`\n\n### Bitmagnet\n\nBitmagnet is a self-hosted BitTorrent indexer, DHT crawler, content classifier and torrent search engine with web UI, GraphQL API and Servarr stack integration.\nThe integration is designed in the persistence layer as a producer for the import API endpoint, and works under the bitmagnet and bitmagnets URL schemas.\n\n- `docker run --rm -it ghcr.io/tgragnato/magnetico:latest --help`\n- `docker run --rm -it ghcr.io/tgragnato/magnetico:latest -d --database=bitmagnet://localhost:3333/import`\n\n## Features\n\nEasy installation \u0026 minimal requirements:\n  - Easy to build golang static binaries.\n  - Root access is *not* required to install or to use.\n\n**magnetico** trawls the BitTorrent DHT by \"going\" from one node to another, and fetches the metadata using the nodes without using trackers. No reliance on any centralised entity!\n\nUnlike client-server model that web applications use, P2P networks are *chaotic* and **magnetico** is designed to handle all the operational errors accordingly.\n\nHigh performance implementation in Go: **magnetico** utilizes every bit of your resources to discover as many infohashes \u0026 metadata as possible.\n\n**magnetico** features a lightweight web interface to help you access the database without getting on your way.\n\nIf you'd like to password-protect the access to **magnetico**, you need to store the credentials\nin file. The `credentials` file must consist of lines of the following format: `\u003cUSERNAME\u003e:\u003cBCRYPT HASH\u003e`.\n\n- `\u003cUSERNAME\u003e` must start with a small-case (`[a-z]`) ASCII character, might contain non-consecutive underscores except at the end, and consists of small-case a-z characters and digits 0-9.\n- `\u003cBCRYPT HASH\u003e` is the output of the well-known bcrypt function.\n\nYou can use `htpasswd` (part of `apache2-utils` on Ubuntu) to create lines:\n\n```\n$  htpasswd -bnBC 12 \"USERNAME\" \"PASSWORD\"\nUSERNAME:$2y$12$YE01LZ8jrbQbx6c0s2hdZO71dSjn2p/O9XsYJpz.5968yCysUgiaG\n```\n\n### Screenshots\n\n| ![The Homepage](/doc/homepage.png) | ![Searching for torrents](/doc/search.png) | ![Search result](/doc/result.png) |\n|:-------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------:|\n|                                                                     __The Homepage__                                                                    |                                                                     __Searching for torrents__                                                                    |                                                     __Viewing the metadata of a torrent__                                                     |\n\n## Why?\n\nBitTorrent, being a distributed P2P file sharing protocol, has long suffered because of the centralised entities that people depended on for searching torrents (websites) and for discovering other peers (trackers). Introduction of DHT (distributed hash table) eliminated the need for trackers, allowing peers to discover each other through other peers and to fetch metadata from the leechers \u0026 seeders in the network.\n\n**magnetico** is the finishing move that allows users to search for torrents in the network, hence removing the need for centralised torrent websites.\n\nThe primary purpose for this fork extends beyond **_content discovery_** and building resilient infrastructure for information sharing that's **_resistant to censorship_** and single points of failure.\n\nThe nodes in this fork actively respond to DHT queries they receive, **_contributing to the network_** rather than just passively crawling it.\n\nAn interesting side effect of this operating mode is that it confuses DHT network scanners, **_hiding users' actual downloads in a cloud of 'ghost' replies_**, increasing the difficulty of aggregating such data into accurate tracking profiles.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftgragnato%2Fmagnetico","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftgragnato%2Fmagnetico","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftgragnato%2Fmagnetico/lists"}