Mastodon

Saturday, 20 September 2025

Torrent Search Engine

Here's a nice quick and easy torrent search engine that will happily work on a Raspberry Pi Zero 2. Something a bit more beefy is better though.


You need to install Docker first, so here's a list of the instructions.


curl -sSL https://get.docker.com | sh

sudo usermod -aG docker $USER

sudo mkdir -p /opt/stacks/bitmagnet

sudo reboot

cd /opt/stacks/bitmagnet

sudo nano docker-compose.yml

Copy and paste this lot into the file.


#################################
services:
  bitmagnet:
    image: ghcr.io/bitmagnet-io/bitmagnet:latest
    container_name: bitmagnet
    ports:
      # API and WebUI port:
      - "3333:3333"
      # BitTorrent ports:
      - "3334:3334/tcp"
      - "3334:3334/udp"
    restart: unless-stopped
    environment:
      - POSTGRES_HOST=postgres
      - POSTGRES_PASSWORD=postgres
    #      - TMDB_API_KEY=your_api_key
    volumes:
      - ./config:/root/.config/bitmagnet
    command:
      - worker
      - run
      - --keys=http_server
      - --keys=queue_server
      # disable the next line to run without DHT crawler
      - --keys=dht_crawler
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    image: postgres:16-alpine
    container_name: bitmagnet-postgres
    volumes:
      - ./data/postgres:/var/lib/postgresql/data
    #    ports:
    #      - "5432:5432" Expose this port if you'd like to dig around in the database
    restart: unless-stopped
    environment:
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=bitmagnet
      - PGUSER=postgres
    shm_size: 1g
    healthcheck:
      test:
        - CMD-SHELL
        - pg_isready
      start_period: 20s
      interval: 10s
#######################################

Save and exit then run docker compose up -d

You should get access to the web interface at servername:3333

It will take a while to populate

To upgrade run the following


docker compose down bitmagnet

docker pull ghcr.io/bitmagnet-io/bitmagnet:latest

docker compose up -d bitmagnet


Open up a browser and go to http://servername:3333

That's it.

Thanks to the Bitmagnet people at https://bitmagnet.io/

No comments:

Post a Comment