{"id":19413461,"url":"https://github.com/wisehackermonkey/webtorrent-demo","last_synced_at":"2026-05-17T05:38:20.950Z","repository":{"id":132674012,"uuid":"343519035","full_name":"wisehackermonkey/webtorrent-demo","owner":"wisehackermonkey","description":null,"archived":false,"fork":false,"pushed_at":"2021-05-04T18:35:47.000Z","size":1040,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T02:45:29.220Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wisehackermonkey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-01T18:36:04.000Z","updated_at":"2021-05-04T18:35:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"49bb329a-4ed5-46f6-8960-cd48c18238d7","html_url":"https://github.com/wisehackermonkey/webtorrent-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wisehackermonkey/webtorrent-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wisehackermonkey%2Fwebtorrent-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wisehackermonkey%2Fwebtorrent-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wisehackermonkey%2Fwebtorrent-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wisehackermonkey%2Fwebtorrent-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wisehackermonkey","download_url":"https://codeload.github.com/wisehackermonkey/webtorrent-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wisehackermonkey%2Fwebtorrent-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33128730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"online","status_checked_at":"2026-05-17T02:00:05.366Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-10T12:33:14.009Z","updated_at":"2026-05-17T05:38:20.923Z","avatar_url":"https://github.com/wisehackermonkey.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webtorrent-demo\n----\n[![Open Source Love svg2](https://badges.frapsoft.com/os/v2/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\u003cimg src=\"assets/animation_of_creation_v1.gif\" width=\"400\"\u003e\n\u003ch2 align=\"center\"\u003e website that uses webtorrent to host the image files for the site\u003c/h2\u003e\n\u003c!-- \u003ch4 align=\"center\"\u003e________________________\u003c/h4\u003e --\u003e\n\n# Quick start\n### Run with docker\n\n##### __________________________\n```bash\ncd ~\ngit clone https://github.com/wisehackermonkey/webtorrent-demo.git\ncd webtorrent-demo\ndocker-compose build\ndocker-compose up -d\n``` \n\n\n\u003cimg src=\"assets/2021-03-01-13-06-51.png\" width=\"400\"\u003e\n\n# Summary\n\u003c!-- ### -  *[Quick start](#Quick-start)* --\u003e\n### -  *[Installation](#Installation)*\n### -  *[For developers](#For-developers)*\n### -  *[Contributors](#Contributors)*\n### -  *[License](#License)*\n\n\n# Installation\n### \n```bash\ncd ~\ngit clone https://github.com/wisehackermonkey/webtorrent-demo.git\ncd webtorrent-demo\ndocker-compose build\ndocker-compose up -d\n```\n\n\n\n\u003c!-- ----------------- --\u003e\n\u003c!-- # Screenshots --\u003e\n\u003c!-- - \u003cimg src=\"assets/_____________\" width=\"400\"\u003e  --\u003e\n\u003c!-- -  --\u003e\n\n\n\n\u003c!-- SETUP --\u003e\n-----------------\n# For developers\n```bash\n git clone https://github.com/wisehackermonkey/webtorrent-demo.git\ncd  webtorrent-demo/\nnpm install \nnpm install --only=dev\n# minimal\n[node.js - sh: 1: node: Permission denied - Stack Overflow](https://stackoverflow.com/questions/51811564/sh-1-node-permission-denied)\nnpm config set user 0\nnpm config set unsafe-perm true\nnpm install --global webtorrent-hybrid\n# full\nnpm install --global budo webtorrent-hybrid budo beefy watchify browserify exorcist\n# npm install --global browserify \nnpm run dev\nnpm install http-server --global\nhttp-server \n```\n### go to http://localhost:9966 or :8080\n\n----------\n\n## Publish Docker Image\n```bash\ndocker build -t wisehackermonkey/webtorrent-demo:latest .\ndocker login\ndocker push wisehackermonkey/webtorrent-demo:latest\n```\n### setting up browserify\n[Getting Started with Browserify ― Scotch.io](https://scotch.io/tutorials/getting-started-with-browserify)\n```bash\nnpm install --global --save-dev browserify\nnpm install ramda --save\nbrowserify src/main.js -o ./public/js/bundle.js\n# Debugging\nbrowserify --debug main.js -o bundle.js\nnpm install --global --save-dev exorcist\nbrowserify main.js --debug | exorcist bundle.map.js \u003e bundle.js\nnpm install --global --save-dev watchify\nwatchify src/main.js -o ./public/js/bundle.jss -v\nnpm install --save-dev beefy\nnpm install --global beefy\n\ncd public\nbeefy ../src/main.js --live\nnpm run build\nbeefy src/main.js  --browserify  --live\nnpm run dev\n\nwatchify main.js -o /bundle.js -v ; beefy main.js  --browserify  --live\n\nnpm install --save-dev nodemon\nnodemon -e \"browserify src/main.js -o ./public/js/bundle.js ;beefy src/main.js --index=./public --cwd ./public --open --live  --browserify\"\n\n//beefy src/main.js --index=./public --cwd ./public --open --live  --browserify \nbeefy src/main.js:./public/js/bundle.js --cwd ./public --browserify  --live\nbeefy main.js --live --browserify\n\nwatchify main.js -o static/bundle.js\n# this ended up working\n[budo - npm](https://www.npmjs.com/package/budo)\nnpm install budo --global --save-dev\n# budo main.js:bundle.js --live --open  --cors #--ssl\nbudo src/main.js:public/js/bundle.js --live --open  --cors #--ssl\nbudo  --dir public/ src/main.js:public/js/bundle.js --live --open  --cors #--ssl\n\nnpm run dev\n\n\nnpm install http-server --save --global\n```\n### Running webtorrent\n[WebTorrent API Documentation](https://webtorrent.io/docs)\n[webtorrent/get-started.md at master · webtorrent/webtorrent](https://github.com/webtorrent/webtorrent/blob/master/docs/get-started.md)\n```bash\nnpm install --save webtorrent\n\nnpm install webtorrent-hybrid --global --save-dev\nwebtorrent-hybrid\nnpm install webtorrent-hybrid --save\nnode server.js\nn=logo.png\n\n-a wss://tracker.btorrent.xyz\n-a wss://tracker.openwebtorrent.com\n-a udp://tracker.leechers-paradise.org:6969\n-a udp://tracker.coppersurfer.tk:6969\n-a udp://tracker.opentrackr.org:1337\n-a udp://explodie.org:6969\n-a udp://tracker.empire-js.us:1337\nwebtorrent-hybrid seed ./logo.png --announce wss://tracker.openwebtorrent.com  -a wss://tracker.btorrent.xyz -a wss://tracker.openwebtorrent.com -a udp://tracker.leechers-paradise.org:6969 -a udp://tracker.coppersurfer.tk:6969 -a udp://tracker.opentrackr.org:1337 -a udp://explodie.org:6969 -a udp://tracker.empire-js.us:1337 \n\n\nwebtorrent-hybrid seed ./banana.jpg --announce wss://tracker.openwebtorrent.com   -a wss://tracker.openwebtorrent.com -a udp://tracker.leechers-paradise.org:6969 -a udp://tracker.coppersurfer.tk:6969 -a udp://tracker.opentrackr.org:1337 -a udp://explodie.org:6969 -a udp://tracker.empire-js.us:1337 \n\nwebtorrent-hybrid seed ./assets/Artboard1.png --announce wss://tracker.openwebtorrent.com   -a wss://tracker.openwebtorrent.com -a udp://tracker.leechers-paradise.org:6969 -a udp://tracker.coppersurfer.tk:6969 -a udp://tracker.opentrackr.org:1337 -a udp://explodie.org:6969 -a udp://tracker.empire-js.us:1337 \n\n\n```\n\n# How to build webtorrent image seeding (hosting) container\n```bash\ncd ./docker-torrent-image-hosting\ndocker build -t wisehackermonkey/docker-torrent-image-hosting .\n#docker run -it --net=host -v ${PWD}:/srv/webtorrent wblankenship/webtorrent\n\ndocker run -it schaurian/webtorrent-hybrid:latest  -h\ndocker run -it  -v webtorrent:/webtorrent --rm -p 8000:8000 schaurian/webtorrent-hybrid:latest download \"adbabc7ec29526fa31446847e5bb14310652592b\" --keep-seeding\n\n\ndocker-compose run webtorrent-hybrid 'download \"adbabc7ec29526fa31446847e5bb14310652592b\" --keep-seeding'\n\ndocker-compose run webtorrent-hybrid 'seed ./logo.png --announce wss://tracker.openwebtorrent.com  -a wss://tracker.btorrent.xyz -a wss://tracker.openwebtorrent.com -a udp://tracker.leechers-paradise.org:6969 -a udp://tracker.coppersurfer.tk:6969 -a udp://tracker.opentrackr.org:1337 -a udp://explodie.org:6969 -a udp://tracker.empire-js.us:1337 '\n\n\n# linux\ndocker run -it  --rm -P `\n--restart=always `\n-v ${PWD}/docker-torrent-image-hosting:/webtorrent`\nschaurian/webtorrent-hybrid:latest seed \"/webtorrent/logo.png\"  --quiet `\n--announce wss://tracker.openwebtorrent.com `\n-a wss://tracker.btorrent.xyz `\n-a wss://tracker.openwebtorrent.com `\n-a udp://tracker.leechers-paradise.org:6969 `\n-a udp://tracker.coppersurfer.tk:6969 `\n-a udp://tracker.opentrackr.org:1337 `\n-a udp://explodie.org:6969 `\n-a udp://tracker.empire-js.us:1337\n\n\n# Powershell\ndocker run -it  --rm -P `\n--restart=always `\n-v ${PWD}/docker-torrent-image-hosting:/webtorrent`\nschaurian/webtorrent-hybrid:latest seed \"/webtorrent/logo.png\"  --quiet `\n--announce wss://tracker.openwebtorrent.com `\n-a wss://tracker.btorrent.xyz `\n-a wss://tracker.openwebtorrent.com `\n-a udp://tracker.leechers-paradise.org:6969 `\n-a udp://tracker.coppersurfer.tk:6969 `\n-a udp://tracker.opentrackr.org:1337 `\n-a udp://explodie.org:6969 `\n-a udp://tracker.empire-js.us:1337\n\n\ndocker run -it  -v ${PWD}/docker-torrent-image-hosting:/webtorrent --rm -p 8000:8000 schaurian/webtorrent-hybrid:latest seed \"/webtorrent/logo.png\"  --quiet --announce wss://tracker.openwebtorrent.com  -a wss://tracker.btorrent.xyz -a wss://tracker.openwebtorrent.com -a udp://tracker.leechers-paradise.org:6969 -a udp://tracker.coppersurfer.tk:6969 -a udp://tracker.opentrackr.org:1337 -a udp://explodie.org:6969 -a udp://tracker.empire-js.us:1337\n\ndocker-compose run webtorrent-hybrid seed \"/webtorrent/banana.jpg\"  --quiet --announce wss://tracker.openwebtorrent.com  -a wss://tracker.btorrent.xyz -a wss://tracker.openwebtorrent.com -a udp://tracker.leechers-paradise.org:6969 -a udp://tracker.coppersurfer.tk:6969 -a udp://tracker.opentrackr.org:1337 -a udp://explodie.org:6969 -a udp://tracker.empire-js.us:1337\n\n\ndocker-compose run webtorrent-hybrid seed \"/webtorrent/banana.jpg\"  --quiet --announce wss://tracker.openwebtorrent.com  -a wss://tracker.btorrent.xyz -a wss://tracker.openwebtorrent.com -a udp://tracker.leechers-paradise.org:6969 -a udp://tracker.coppersurfer.tk:6969 -a udp://tracker.opentrackr.org:1337 -a udp://explodie.org:6969 -a udp://tracker.empire-js.us:1337\n\ndocker-compose up\n\n\n\n----\ntry 2\ncd ./docker-torrent-image-hosting\ndocker build -t wisehackermonkey/docker-torrent-image-hosting .\ndocker run -it --rm -P -v ${PWD}/:/webtorrent wisehackermonkey/docker-torrent-image-hosting\n\n```\n### try 3 now ith docker compose\n```bash\ndocker-compose build \ndocker-compose up\n```\n### how to seed multiple files\n```bash\nwebtorrent-hybrid seed ./logo.png ./banana.jpg\n```\n\n\n### continerizing broswerfiy build process\n```bash\nnode ./node_modules/browserify/bin/browserify  main.js -o ./public/js/bundle.js\ndocker-compose build \ndocker-compose up\n\n\nnpm i -g serve    \n# [Node.js quick file server (static files over HTTP) - Stack Overflow](https://stackoverflow.com/questions/16333790/node-js-quick-file-server-static-files-over-http)\n# serve public -p 8000 -d true\nserve ${PWD}\\\\public -p 8000 -d true\nhttp-server public\n```\n# how to host a new image\n### add image to images/*\n### `example cat.jpg`\n### change docker-compose.yaml\n\n#### from\n```bash\n        image: 'schaurian/webtorrent-hybrid:latest'\n        command: [\"seed\",\"./banana2.png\",\"--quiet\",.......]\n```\n#### to\n```bash\n        image: 'schaurian/webtorrent-hybrid:latest'\n        command: [\"seed\",\"./cat.jpg\",\"--quiet\",.......]\n```\n### run  webtorrent-hybrid server\n```bash\ndocker-compose run webtorrent-hybrid\n```\n### grab the magn: link that it outputs ex:\n```bash\nmagnet:?xt=urn:btih:8a1f08b91487de78d513e17799ac15c75bc864e6\u0026dn=cat.jpg\u0026tr=wss%3A%2F%2Ftracker.openwebtorrent.com\u0026tr=wss%3A%2F%2Ftracker.btorrent.xyz\u0026tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969\u0026tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969\u0026tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337\u0026tr=udp%3A%2F%2Fexplodie.org%3A6969\u0026tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337\u0026tr=wss%3A%2F%2Ftracker.fastcast.nz\n```\n### modify ./src/main.js set the  verable `let torrentId =\"...\"` to be the result of the magnit link from prevois step\n```javascript\nlet torrentId = \"magnet:?xt=urn:btih:8a1f08b91487de78d513e17799ac15c75bc864e6\u0026dn=banana2.png\u0026tr=wss%3A%2F%2Ftracker.openwebtorrent.com\u0026tr=wss%3A%2F%2Ftracker.btorrent.xyz\u0026tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969\u0026tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969\u0026tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337\u0026tr=udp%3A%2F%2Fexplodie.org%3A6969\u0026tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337\u0026tr=wss%3A%2F%2Ftracker.fastcast.nz\"\n```\n### if you gett an error that looks like this it means that you forgot to change the image extention type within src/main.js\n### also change the file ending to match your image type EX: .png with .endsWith('.png') or .jpg with endsWith('.jpg')\n### `src/main.js`\n#### From \n```javascript\nlet file = torrent.files.find(function (file) {\n......\n    return file.name.endsWith('.png')\n  })\n```\n#### to\n```javascript\nlet file = torrent.files.find(function (file) {\n......\n    return file.name.endsWith('.jpg')\n  })\n```\n### rebuild and run docker-compose\n```bash\ndocker-compose build\ndocker-compose down\ndocker-compose up -d\n\n```\n### build in one line \n#### *unix  \n```bash\ndocker-compose build \u0026\u0026 docker-compose down \u0026\u0026 docker-compose up\n```\n#### powershell\n```bash\ndocker-compose build ; docker-compose down ; docker-compose up\n```\n### visit \n## Success !!!\n\u003cbr\u003e\n-----------------\n# Contributors\n\n[![](https://contrib.rocks/image?repo=wisehackermonkey/webtorrent-demo)](https://github.com/wisehackermonkey/webtorrent-demo/graphs/contributors)\n\n##### Made with [contributors-img](https://contrib.rocks).\n\n-----------------\n# License\n#### MIT © wisehackermonkey\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n```bash\nby oran collins\ngithub.com/wisehackermonkey\noranbusiness@gmail.com\n______________________\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwisehackermonkey%2Fwebtorrent-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwisehackermonkey%2Fwebtorrent-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwisehackermonkey%2Fwebtorrent-demo/lists"}