Try describing what you need:

bitmagnet logo

bitmagnet

★ 4.5k
MIT LicenseOpen Source — No Paywall9 Containers — 9 containers — heavy hosting footprintNeeds Postgres1 active committer (12mo)

A self-hosted BitTorrent indexer, DHT crawler, content classifier, and torrent search engine with a web UI and GraphQL API.

Community Ratings

No ratings yet

Features

  • BitTorrent indexing
  • DHT crawling
  • content classification
  • torrent search
  • web UI
  • GraphQL API
  • Servarr stack integration

Details

Last Updated
Nov 23, 2026
Created
Oct 2, 2023
API
GRAPHQL
Runtime / Stack
GoDocker
Privacy & Independence
No Cloud Required
Deployment

Deployment: Docker Compose ✓9 Containers — heavy hosting footprintRuns as 9 containers

Run bitmagnet yourself

Pick how much you want to manage.

2 more ways to host

Some links earn us a commission. netcup pays us one and is our preferred VPS host.

Is this your project? Sponsor a listing

Run bitmagnet with Docker Compose

Compose file from the bitmagnet project repository.

9 services · database: postgres · infra: postgres · 7 unclassified (gluetun, grafana, agent, prometheus, loki, pyroscope, postgres-exporter)

no resource limits declared

needs persistent storage (15 volumes)

docker-compose.yml · @ e31b30d · scanned Nov 3, 2026

# This is a full-featured example for running bitmagnet through a gluetun VPN connection with Grafana/Prometheus observability services.
# See https://bitmagnet.io/setup/installation.html for a minimal docker-compose example.

services:
  bitmagnet:
    container_name: bitmagnet
    image: ghcr.io/bitmagnet-io/bitmagnet:latest
    volumes:
      - ./config:/root/.config/bitmagnet
      # Mount data folder (currently only used for logs when file rotation is enabled):
      - ./data/bitmagnet:/root/.local/share/bitmagnet
    restart: unless-stopped
    environment:
      # Enable logging to rotating files for ingest to Loki:
      - LOG_FILE_ROTATOR_ENABLED=true
      - POSTGRES_HOST=postgres
      - POSTGRES_PASSWORD=postgres
      # - TMDB_API_KEY=your_api_key
    network_mode: service:gluetun
    depends_on:
      postgres:
        condition: service_healthy
      gluetun:
        condition: service_healthy
    command:
      - worker
      - run
      # Run all workers:
      - --all
      # Or enable individual workers:
      # - --keys=http_server
      # - --keys=queue_server
      # - --keys=dht_crawler

  gluetun:
    container_name: bitmagnet-gluetun
    image: qmcgaw/gluetun:latest
    cap_add:
      - NET_ADMIN
    ports:
      # The bitmagnet ports must be exposed by the gluetun container:
      - "3333:3333"
      # BitTorrent ports:
      - "3334:3334/tcp"
      - "3334:3334/udp"
    environment:
      # Put your personal gluetun/VPN account config and credentials here:
      # (See https://github.com/qdm12/gluetun-wiki/tree/main/setup/providers)
      - VPN_SERVICE_PROVIDER=your_vpn_provider
    devices:
      # See https://github.com/qdm12/gluetun/issues/2538
      - /dev/net/tun:/dev/net/tun
    restart: always
    # Host names must be manually mapped here for bitmagnet to resolve them:
    extra_hosts:
      - "postgres:192.168.55.11"
    networks:
      bitmagnet:
        ipv4_address: 192.168.55.10

  postgres:
    image: postgres:16-alpine
    container_name: bitmagnet-postgres
    volumes:
      - ./data/postgres:/var/lib/postgresql/data
    networks:
      bitmagnet:
        ipv4_address: 192.168.55.11
    ports:
      - "5432:5432"
    shm_size: 1g
    restart: unless-stopped
    environment:
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=bitmagnet
      - PGUSER=postgres
    healthcheck:
      test: ["CMD-SHELL", "pg_isready"]
      interval: 10s
      start_period: 20s

  # Optional observability services:
  # (ensure you have the config files in the `observability` directory in your project root)

  # Visualization and dashboards:
  grafana:
    container_name: bitmagnet-grafana
    image: grafana/grafana:latest
    environment:
      - GF_PATHS_PROVISIONING=/etc/grafana/provisioning
      - GF_AUTH_ANONYMOUS_ENABLED=true
      - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
    volumes:
      - ./data/grafana:/var/lib/grafana
      # Provisioned data sources and dashboards:
      - ./observability/grafana.datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
      - ./observability/grafana.dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml
      - ./observability/grafana-dashboards:/etc/dashboards
    ports:
      - "3000:3000"
    networks:
      - bitmagnet

  # Metrics and logs scraping:
  grafana-agent:
    container_name: bitmagnet-grafana-agent
    image: grafana/agent:latest
    volumes:
      - ./data/bitmagnet/logs:/var/log/bitmagnet
      # Mount the logs and metrics scraping configurations:
      - ./observability/grafana-agent.config.river:/etc/agent-config/config.river
    command:
      - run
      - /etc/agent-config/config.river
      - --server.http.listen-addr=0.0.0.0:12345
    environment:
      HOSTNAME: grafana-agent
      AGENT_MODE: flow
      LOKI_HOST: loki:3100
      POSTGRES_HOST: postgres:5432
      REDIS_HOST: redis:6379
    # The bitmagnet host must be mapped to the gluetun container:
    extra_hosts:
      - "bitmagnet:192.168.55.10"
    ports:
      - "12345:12345"
    depends_on:
      - gluetun
      - loki
    networks:
      - bitmagnet

  # Metrics storage and aggregation:
  prometheus:
    image: prom/prometheus:latest
    container_name: bitmagnet-prometheus
    command:
      - "--config.file=/etc/prometheus/prometheus.yml"
    ports:
      - 9090:9090
    # The bitmagnet host must be mapped to the gluetun container:
    extra_hosts:
      - "bitmagnet:192.168.55.10"
    restart: unless-stopped
    volumes:
      - ./data/prometheus:/prometheus
      - ./observability/prometheus.config.yaml:/etc/prometheus/prometheus.yml
    networks:
      - bitmagnet

  # Log storage and aggregation:
  loki:
    container_name: bitmagnet-loki
    image: grafana/loki:latest
    ports:
      - "3100:3100"
    volumes:
      - ./data/loki:/loki
      - ./observability/loki.config.yaml:/etc/loki/local-config.yaml
    command: -config.file=/etc/loki/local-config.yaml
    networks:
      - bitmagnet

  # Runtime profiling:
  pyroscope:
    container_name: bitmagnet-pyroscope
    image: grafana/pyroscope:latest
    deploy:
      restart_policy:
        condition: on-failure
    ports:
      - "4040:4040"
    command:
      - "server"
    volumes:
      - ./observability/pyroscope.config.yaml:/etc/pyroscope/server.yaml
      - ./data/pyroscope:/var/lib/pyroscope
    networks:
      - bitmagnet

  # Prometheus metrics for Postgres:
  postgres-exporter:
    image: prometheuscommunity/postgres-exporter:latest
    container_name: bitmagnet-postgres-exporter
    ports:
      - 9187:9187
    environment:
      DATA_SOURCE_NAME: "postgresql://postgres:postgres@postgres:5432/bitmagnet?sslmode=disable"
    links:
      - postgres
      - prometheus
    networks:
      - bitmagnet

networks:
  bitmagnet:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 192.168.55.0/24
          gateway: 192.168.55.1

This file may be out of date. Check the bitmagnet documentation for current setup steps.

Track your self-hosted stack

Bookmark software to try, rate tools you've used, and keep your collection in one place.

Metadata extracted from README on Mar 25, 2026

Related Software

Webtor logo

Webtor

735
A self-hosted torrent web app for direct downloads, instant streaming, ZIP export, and personal library management.
P2P File SharingMultimedia StreamingMedia Servers+4
Details
Deluge logo

Deluge

Lightweight, cross-platform BitTorrent client.
P2P File SharingNetwork UtilitiesFully FOSS+1
Fully FOSS
Details
HomelabOS logo

HomelabOS

1.3k
Offline privacy-centric data-center. Deploy over 100 services with a few commands.
Self Hosting SolutionsPermissive LicenseAutomation Tools
Details
Yetishare logo

Yetishare

Powerful file hosting script with support for Amazon S3, Wasabi, Backblaze, local, direct and SFTP storage.
File SynchronizationFile & Object StorageWeb File Managers+1
Details
ydl_api_ng logo

ydl_api_ng

240
A web server that lets users trigger downloads on their server through a REST API using yt-dlp.
Media ManagementDigital ArchivingAutomation Tools+2
2 Containers
Details
IT-Tools by sharevb logo

IT-Tools by sharevb

1.8k
A self-hosted web app fork of IT Tools that provides a collection of utility tools with customization and translation support.
Miscellaneous ToolsCopyleft LicenseNetwork Utilities+1
Single Container
Details
venator logo

venator

36
Matrix Venator - versatile capital Matrix homeserver written from scratch in mautrix-go
Custom CommunicationsSelf Hosting Solutions
Details
LiteXiv logo

LiteXiv

22
A free frontend for pixiv that is simple yet sufficient.
Media ManagementSocial MediaSelf Hosting Solutions+1
Details