TorrServer — HTTP-сервер для стриминга торрентов без скачивания на диск. Идеально для домашнего медиацентра: запускаете фильм в Lampa или любом другом плеере, роутер раздаёт поток прямо из торрента.
Этот скрипт автоматизирует установку, настройку и обслуживание TorrServer на роутерах под управлением OpenWrt и FriendlyWrt.
Lampa / плеер ──▶ TorrServer (роутер) ──▶ торрент-трекер
Linux (OpenWrt / Ubuntu / Debian / Arch / Alpine):
curl -sSL https://raw.githubusercontent.com/dontbass/torrserverwrt/main/install.sh | shWindows — самый простой способ (рекомендуется):
Скачать и запустить двойным кликом → install.bat
Bat-файл автоматически обходит политику выполнения скриптов и не требует никаких настроек.
Windows — через PowerShell (от имени администратора):
powershell -ExecutionPolicy Bypass -Command "irm https://raw.githubusercontent.com/dontbass/torrserverwrt/main/install.ps1 | iex"Или скачать вручную:
# Linux
curl -O https://raw.githubusercontent.com/dontbass/torrserverwrt/main/install.sh
sh install.sh -i
# Windows (PowerShell)
Invoke-WebRequest -Uri https://raw.githubusercontent.com/dontbass/torrserverwrt/main/install.ps1 -OutFile install.ps1
.\install.ps1После установки веб-интерфейс доступен по адресу http://<IP>:8090
| ОС | Init-система | Установщик |
|---|---|---|
| OpenWrt / FriendlyWrt | procd | install.sh |
| Ubuntu / Debian / Raspberry Pi OS | systemd | install.sh |
| Arch Linux / Manjaro | systemd | install.sh |
| Alpine Linux | OpenRC | install.sh |
| Windows 10/11 / Server 2016+ | Task Scheduler / NSSM | install.ps1 |
| 🌐 | Интерфейс на русском и английском — язык сохраняется между сессиями |
| 🔀 | Proxy bypass через nftables cgroupv2 — торрент-трафик идёт напрямую, минуя VPN |
| 🔍 | Автоопределение архитектуры роутера |
| ⬇️ | Загрузка последней версии TorrServer с GitHub |
| ⚙️ | Настройка службы через procd с автозапуском |
| 🔒 | HTTP-авторизация — включить, сменить пароль или отключить без переустановки |
| 🔌 | Смена порта без переустановки |
| 🔄 | Атомарное обновление бинаря (без text file busy) |
| ↩️ | Откат на старую версию при неудачном обновлении |
| ⏰ | Автообновление через cron (еженедельно) |
| 📊 | Статус: версия, uptime, адрес, логин/пароль |
| 💾 | Проверка свободного места перед загрузкой |
| 🗑️ | Корректное удаление со всеми данными |
sh install.sh -i # установка
sh install.sh -u # обновление
sh install.sh -s # статус
sh install.sh -b # настроить прямое соединение (bypass прокси)
sh install.sh -r # удаление
sh install.sh -h # справкаФлаги: --no-color — без цветов (для логов), --auto — для cron.
=============================================================
Статус TorrServer
=============================================================
Версия: MatriX.142.2
Бинарь: TorrServer-linux-arm64
Служба: ЗАПУЩЕНА
Адрес: http://192.168.1.1:8090
Uptime: 2ч 15м 42с
Авториз.: ВКЛ
Логин: admin
Пароль: mypassword
Автообн.: ВКЛ
Обновление: не требуется
=============================================================
Если на роутере установлен VPN или прокси-инструмент (nikki, podkop, sing-box, openclash, passwall, shellcrash и другие) — торрент-трафик TorrServer может пойти через него. Это нарушает правила большинства VPN-провайдеров и может привести к блокировке аккаунта.
При установке скрипт автоматически обнаруживает активные прокси-инструменты и предлагает настроить split-tunnel: TorrServer работает напрямую, весь остальной трафик — через VPN.
Механизм: nftables правило с приоритетом mangle-5 (выше любого tproxy) выпускает трафик cgroup services/torrserver напрямую на уровне ядра. Работает с любым прокси без дополнительной настройки.
⚠️ Требования: OpenWrt 22.03 и новее (ядро 5.10+). На OpenWrt 19.07 и 21.02 функцияsocket cgroupv2в nftables отсутствует или работает нестабильно — скрипт предупредит об этом и предложит применить на свой риск.
sh install.sh -b # настроить/обновить bypassПравило сохраняется в /etc/nftables.d/torrserver-bypass.nft и подхватывается fw4 автоматически после перезагрузки.
Поддерживаемые инструменты: nikki, podkop, openclash, homeproxy, passwall, passwall2, shellcrash, sing-box и любые другие через универсальное nftables правило.
TorrServer нативно поддерживается в Lampa:
Lampa → Настройки → TorrServer → Адрес: http://<IP роутера>:8090
Нажмите «Проверить» — статус должен стать зелёным «Подключено».
На MIPS-роутерах стриминг может работать нестабильно из-за слабого CPU. Рекомендуются устройства на ARM64.
| Устройство | SoC | uname -m |
Бинарь |
|---|---|---|---|
| NanoPi R2S/R4S/R5S | RK3328/RK3399 | aarch64 |
linux-arm64 |
| Hiveton H5000M | MT7988 (A53) | aarch64 |
linux-arm64 |
| Cudy TR3000, GL.iNet MT3000 | MT7981B | aarch64 |
linux-arm64 |
| Raspberry Pi 3/4 (64-bit) | BCM2837/2711 | aarch64 |
linux-arm64 |
| Raspberry Pi 2/3 (32-bit) | BCM2836/2837 | armv7l |
linux-arm7 |
| GL.iNet GL-AR750 | QCA9563 | mips |
linux-mips |
| PC-роутер x86/x86_64 | — | x86_64 |
linux-amd64 |
| Прочие | — | — | ручной ввод |
Минимальные требования: 256 МБ RAM · 80 МБ в /opt · curl · OpenWrt 19.07+
TorrServer выходит редко. Автообновление проверяет наличие новой версии раз в неделю (воскресенье, 04:00) и скачивает (~70 МБ) только если она есть.
Не рекомендуется при менее 150 МБ свободного места в
/opt.
cat /var/log/torrserver-update.log # лог обновлений| Путь | Назначение |
|---|---|
/opt/torrserver/TorrServer-* |
Исполняемый файл |
/opt/torrserver/version |
Текущая версия |
/opt/torrserver/lang |
Выбранный язык |
/opt/torrserver/accs.db |
Логин/пароль (если авторизация включена) |
/opt/torrserver/torr/ |
База торрентов |
/etc/init.d/torrserver |
Init-скрипт службы |
/var/log/torrserver-update.log |
Лог автообновлений |
TorrServer is an HTTP server for streaming torrents without downloading to disk. Perfect for a home media center: start a movie in Lampa or any other player, and the router streams it directly from the torrent.
This script automates installation, configuration, and maintenance of TorrServer on routers running OpenWrt and FriendlyWrt.
Lampa / player ──▶ TorrServer (router) ──▶ torrent tracker
Linux (OpenWrt / Ubuntu / Debian / Arch / Alpine):
curl -sSL https://raw.githubusercontent.com/dontbass/torrserverwrt/main/install.sh | shWindows — easiest way (recommended):
Download and double-click → install.bat
The bat file automatically bypasses PowerShell execution policy — no configuration needed.
Windows — via PowerShell (as Administrator):
powershell -ExecutionPolicy Bypass -Command "irm https://raw.githubusercontent.com/dontbass/torrserverwrt/main/install.ps1 | iex"After installation the web UI is available at http://<IP>:8090
| OS | Init system | Installer |
|---|---|---|
| OpenWrt / FriendlyWrt | procd | install.sh |
| Ubuntu / Debian / Raspberry Pi OS | systemd | install.sh |
| Arch Linux / Manjaro | systemd | install.sh |
| Alpine Linux | OpenRC | install.sh |
| Windows 10/11 / Server 2016+ | Task Scheduler / NSSM | install.ps1 |
| 🌐 | English / Russian interface — language saved between sessions |
| 🔀 | Proxy bypass via nftables cgroupv2 — torrent traffic goes direct, bypassing VPN |
| 🔍 | Auto-detection of router architecture |
| ⬇️ | Downloads the latest TorrServer version from GitHub |
| ⚙️ | Configures as a system service via procd with autostart |
| 🔒 | HTTP authorization — set, change or disable without reinstall |
| 🔌 | Change port without reinstall |
| 🔄 | Atomic binary update (no text file busy) |
| ↩️ | Rollback to old version on failed update |
| ⏰ | Auto-update via cron (weekly) |
| 📊 | Status: version, uptime, address, login/password |
| 💾 | Free space check before download |
| 🗑️ | Clean removal with all data |
sh install.sh -i # install
sh install.sh -u # update
sh install.sh -s # status
sh install.sh -b # configure proxy bypass
sh install.sh -r # remove
sh install.sh -h # helpFlags: --no-color — no colors (for logs), --auto — for cron.
=============================================================
TorrServer Status
=============================================================
Version: MatriX.142.2
Binary: TorrServer-linux-arm64
Service: RUNNING
Address: http://192.168.1.1:8090
Uptime: 2h 15m 42s
Auth: ON
Login: admin
Password: mypassword
Auto-upd: ON
Update: not required
=============================================================
If the router runs a VPN or proxy tool (nikki, podkop, sing-box, openclash, passwall, shellcrash, etc.) — TorrServer torrent traffic may go through it. BitTorrent via VPN violates most VPN providers' ToS and may get your account banned.
During installation the script detects active proxy tools and offers to configure a split-tunnel: TorrServer goes direct, everything else goes through VPN.
Mechanism: an nftables rule at priority mangle-5 (higher than any tproxy) releases cgroup services/torrserver traffic directly at kernel level. Works with any proxy without extra configuration.
⚠️ Requirements: OpenWrt 22.03 or newer (kernel 5.10+). On OpenWrt 19.07 and 21.02 thesocket cgroupv2nftables feature is missing or unstable — the script will warn you and let you proceed at your own risk.
sh install.sh -b # configure / reconfigure bypassThe rule is saved to /etc/nftables.d/torrserver-bypass.nft and loaded by fw4 automatically after reboot.
Supported tools: nikki, podkop, openclash, homeproxy, passwall, passwall2, shellcrash, sing-box, and any other tool via the universal nftables rule.
TorrServer is natively supported in Lampa:
Lampa → Settings → TorrServer → Address: http://<router IP>:8090
Press «Check» — the status should turn green «Connected».
On MIPS routers streaming may be unstable due to weak CPU. ARM64 devices are recommended.
| Device | SoC | uname -m |
Binary |
|---|---|---|---|
| NanoPi R2S/R4S/R5S | RK3328/RK3399 | aarch64 |
linux-arm64 |
| Hiveton H5000M | MT7988 (A53) | aarch64 |
linux-arm64 |
| Cudy TR3000, GL.iNet MT3000 | MT7981B | aarch64 |
linux-arm64 |
| Raspberry Pi 3/4 (64-bit) | BCM2837/2711 | aarch64 |
linux-arm64 |
| Raspberry Pi 2/3 (32-bit) | BCM2836/2837 | armv7l |
linux-arm7 |
| GL.iNet GL-AR750 | QCA9563 | mips |
linux-mips |
| x86/x86_64 PC router | — | x86_64 |
linux-amd64 |
| Others | — | — | manual input |
Minimum requirements: 256 MB RAM · 80 MB in /opt · curl · OpenWrt 19.07+
TorrServer releases rarely. Auto-update checks for a new version once a week (Sunday, 04:00) and downloads (~70 MB) only if available.
Not recommended if less than 150 MB free in
/opt.
cat /var/log/torrserver-update.log # update log| Path | Purpose |
|---|---|
/opt/torrserver/TorrServer-* |
Executable |
/opt/torrserver/version |
Installed version |
/opt/torrserver/lang |
Selected language |
/opt/torrserver/accs.db |
Login/password (if auth enabled) |
/opt/torrserver/torr/ |
Torrent database |
/etc/init.d/torrserver |
Service init script |
/var/log/torrserver-update.log |
Auto-update log |
На основе YouROK/TorrServer · адаптирован для OpenWrt