Motrix README

The project's README from github.com/agalwood/Motrix. As one markdown file: README.md.

Motrix

Motrix

A modern, full-featured download manager that stays simple to use

GitHub release Build/release Total Downloads

English | 简体中文

Overview

Motrix is a clean, full-featured desktop download manager for HTTP, FTP, BitTorrent, magnet links, and more.

Motrix Turbo is Motrix v2, rebuilt from the ground up with Electron, React, and TypeScript while keeping the clean, straightforward experience of v1. The download core is independent of the UI. Browser extensions and command-line tools communicate with the app over MDXP (Motrix Download eXchange Protocol), an open protocol built on JSON-RPC 2.0, while plugins run in isolated sandboxes.

The same core powers two ways to run Motrix:

🧪 Beta testing

Motrix Turbo v2 is currently in beta. After its remaining release gates pass, download v2.0.0-beta.35 from GitHub Releases and read the full release notes before installing it.

Back up your existing Motrix data and downloads before testing. Migration from Motrix v1 data has not yet been validated, so do not use your only copy of v1 data with this beta. When practical, test v2 in parallel using a separate OS account, machine, or Docker data directory.

Screenshots

Dashboard

Motrix Dashboard

Downloads

Motrix Downloads

Settings

Motrix Settings

✨ Features

🧩 Ecosystem

Motrix extends beyond the desktop app with a shared protocol library, command-line client, browser extensions, and a complete plugin toolchain:

Project Distribution What it does
@motrix/mdxp npm package Defines the shared JSON-RPC 2.0 wire schemas and Zod types for MDXP, with helpers for bidirectional connections
@motrix/cli npm package Provides the motrix command, automatically discovers a local desktop app, and pairs with remote instances
Motrix Extension Browser extension Intercepts downloads in Chrome, Edge, and Firefox (Manifest V3), hands them off to Motrix, and pairs securely with the desktop app over native messaging
Motrix Plugin SDK Four npm packages Includes @motrix/plugin-manifest-schema, @motrix/plugin-api, @motrix/plugin-cli, and create-motrix-plugin for developing, testing, and packaging plugins
Builtin Plugins Signed .moext packages Includes three official plugins: Filename Template for renaming files from a template before they are saved, Page Scraper for extracting direct file links from HTML pages, and URL Resolver as the foundation for site-specific media resolution
Plugin Registry Public JSON feed Publishes plugin listings and install metadata at dl.motrix.app/registry/plugins.json for both the website and the in-app marketplace

CLI quick start

npm install -g @motrix/cli    # Requires Node.js 22 or later

motrix add https://example.com/file.iso --save-dir ~/Downloads
motrix list                   # List downloads
motrix watch --stats          # Stream live progress as NDJSON
motrix pair --name my-nas     # Pair with a remote or headless instance

Build a plugin

The Motrix Plugin SDK provides the TypeScript API, manifest schema, project scaffolder, and CLI used throughout the plugin development workflow:

pnpm create motrix-plugin my-plugin
cd my-plugin && pnpm install
pnpm dev                         # Watch-build and launch Motrix with the plugin
pnpm exec motrix-plugin validate # Validate motrix-plugin.json
pnpm run pack                    # Create dist/<id>-<version>.moext
pnpm exec motrix-plugin lint     # Check the packed bundle

The default scaffold starts with a beforeCreate URL resolver. Pass post-action after the project name to start with an afterComplete notification plugin instead. Plugins can hook into beforeCreate, beforeFinalize, afterComplete, and onError, contribute callable commands and settings, and access the runtime through the motrix:plugin-api virtual module.

Plugins are bundled as a single ES2020 module and run inside a QuickJS sandbox without Node.js APIs or direct file and network access. Declare activation events, required capabilities, and URL-scoped host permissions in motrix-plugin.json; Motrix shows those requests to the user before granting access. See the Plugin SDK documentation for templates, the manifest and runtime API references, localization, sandbox constraints, packaging, and distribution.

Browser extension

Motrix Extension is available from the official browser stores for use with Motrix 2:

For installation and pairing, see the browser extension guide. Development builds remain available from the extension repository.

📦 Installation

Desktop app

Download Motrix from motrix.app and choose the package for your operating system. Most Mac users should choose the Apple Silicon build; Intel builds are available for older Macs with Intel processors.

After the remaining release gates pass, the current beta desktop packages will be distributed through the GitHub prerelease linked above. The protected release tag also publishes verified Snap builds to latest/edge. Choose the package that matches your operating system and architecture:

Platform Architectures Packages / channel Recommendation
macOS 13+ arm64 (Apple Silicon), x64 (Intel) .dmg / .zip Use the .dmg matching your Mac; choose x64 only for an Intel-based Mac
Windows x64 .exe (NSIS installer) / .zip Use the .exe installer for a normal installation or .zip for a manually extracted copy
Linux x64, arm64 .AppImage / .deb / .rpm Use the portable .AppImage on any distribution, .deb on Debian or Ubuntu, or .rpm on Fedora or openSUSE
Linux (Snap Store) amd64, arm64 latest/edge Install the strictly confined beta with sudo snap install motrix --edge
Arch Linux / Omarchy x64, arm64 .pacman Install the native Arch package with sudo pacman -U ./Motrix-<version>-<arch>.pacman; see the Arch installation guide

The .AppImage asks on first launch whether to register its desktop entry and URL-scheme handlers under your user data directory; declining leaves your system untouched. You can enable or remove this desktop integration at any time from Settings → Integration. The Snap Store package is strictly confined. Its approved personal-files interface permits Motrix to register Native Messaging hosts for supported browsers; it does not grant general access to files outside the normal Snap interfaces. Flatpak is validated separately and is not published by the release tag. Windows arm64 and all 32-bit packages are not available. Windows x64 packages are unsigned and may trigger a Windows SmartScreen warning.

Command-line client

npm install -g @motrix/cli

You can also install it from Settings → Integration → Command-line tools in the desktop app.

Headless server with Docker

Tagged releases publish a multi-architecture Server image to Docker Hub and GHCR. Beta releases publish only the immutable version tag and do not update latest; the included compose.yaml keeps Server state separate from downloaded resources:

mkdir -p motrix-data downloads
sudo chown 1000:1000 motrix-data downloads
export MOTRIX_IMAGE='docker.io/motrixapp/motrix-server:2.0.0-beta.35'
export MOTRIX_PUBLIC_URL='http://nas.example.lan:8080'
docker compose pull server
docker compose up -d --wait

The runtime is non-root, supports a read-only root filesystem, validates mount permissions before accepting work, and preserves downloads, sessions, and installed plugins across container replacement. The standard direct-LAN setup publishes the Web service on port 8080 and MDXP on port 16801. Set MOTRIX_PUBLIC_URL to the Web approval URL that remote clients can actually reach; the Compose files do not substitute a misleading localhost URL.

If the Web approval URL is temporarily unavailable, an SSH operator can list and approve the exact client code without exposing another port:

docker compose exec server motrix-admin pairing pending
docker compose exec server motrix-admin pairing approve ABCD-EFGH

Remote CLI and agent clients pair through the device-code flow. Browser extensions can pair with the headless Server when MOTRIX_REMOTE_EXTENSION_ENABLED=true and MOTRIX_REMOTE_EXTENSION_PUBLIC_URL is the WS/WSS address entered in the Extension. HTTPS remains the default operator requirement. A direct trusted-LAN HTTP operator additionally requires MOTRIX_ALLOW_INSECURE_OPERATOR_HTTP=true and produces a startup warning; never enable it on the Internet or an untrusted LAN. Internet access requires a TLS reverse proxy and firewall rules around the origin ports. See the Docker Server deployment guide for ownership setup, Docker Hub/GHCR image and tag selection, DSM 7 and fnOS installation, ports, diagnostics, and backup/upgrade instructions.

🛠 Development

Development requires Node.js 22 or later and pnpm. Use the pnpm version specified by the packageManager field in package.json.

git clone https://github.com/agalwood/Motrix.git
cd Motrix

pnpm install     # Install dependencies, download aria2 for your platform, and rebuild native modules
pnpm start       # Start the Electron app in development mode with Vite HMR in the renderer

pnpm test        # Run the Vitest unit tests
pnpm test:e2e    # Run the Playwright E2E tests
pnpm run lint    # Run Biome checks

pnpm build       # Fetch signed built-in plugins, then build the native host and four Vite targets

Preview the in-window application menu on macOS

Windows and Linux render the application menu inside the Motrix window. To preview that chrome while developing on macOS, start the app with the preview flag enabled:

MOTRIX_PREVIEW_MAC_MENU=1 pnpm start

The flag hides the main window's macOS traffic-light buttons, enables the renderer dropdown menu, and shows the custom window controls used on Windows and Linux. Collapse the sidebar in this mode to check the application menu, attached actions, drag region, and caption-control safe areas together. Restart the development process after changing the flag because both Electron and Vite read it at startup.

This mode is intended for layout and command-item debugging. Electron routes macOS role items through AppKit's native menu, so role-backed actions such as Window → Minimize do not behave identically when invoked from the preview dropdown. Validate those native role actions on Windows or Linux.

See the scripts in package.json for the available packaging commands. Platform-specific settings for macOS, Windows, and Linux live in electron-builder.json.

🔧 Tech stack

Area Stack
Desktop shell Electron 44
UI React 19 + Tailwind CSS 4 + shadcn/ui
Language TypeScript in strict mode
Build system Vite 8 with separate main, preload, worker, and renderer targets
Validation Zod 4 for settings, IPC payloads, and wire schemas
Download engine A Motrix-maintained fork of aria2, bundled with the app
Persistence better-sqlite3 for download session storage and recovery
Plugin sandbox quickjs-emscripten
Server runtime Node.js + Fastify + WebSocket
Internationalization i18next + react-i18next
Quality tooling Biome, Vitest, and Playwright

The codebase has four strict layers. CI enforces the dependency boundaries between them, keeping the core portable and leaving a clear path for a future Rust rewrite:

renderer (React UI)
   |  IPC via window.motrix
app core (tasks, settings, plugins, bridge)
   |
engine adapter
   |
aria2 (download engine)

The Electron desktop app and the Node.js headless server share the same core. Platform-specific capabilities such as notifications and secret storage have separate implementations with consistent behavior.

🤝 Contributing

Contributions of code, tests, documentation, translations, issue reports, and design feedback are welcome. Before opening a pull request, read the contribution guidelines for the development workflow, architecture boundaries, implementation standards, and required validation.

All participants must follow the Code of Conduct. Report suspected vulnerabilities privately according to the Security Policy, not through a public issue or discussion.

📜 License

MIT © 2018-present Dr_rOot

See THIRD_PARTY_NOTICES.md for third-party license information. Release packages also include a generated dependency inventory, consolidated license texts, and an SPDX 2.3 SBOM under legal/.

Motrix (agalwood/Motrix)

Searching Database…

57K ·GitHub
这是什么?Motrix 是一款免费且功能完整的下载管理器,支持 HTTP、FTP、BitTorrent 和磁力链接。它以桌面应用的形式提供,也可选择无界面的服务器模式。
这只是一个桌面应用,还是也能作为服务器运行?两者共用同一个下载核心。桌面应用支持 macOS、Windows 和 Linux;无界面服务器可在 Node.js 或 Docker 中运行,并附带自己的网页界面,适用于 NAS 设备和家庭服务器。
当前版本稳定吗?Motrix Turbo v2 仍处于测试版阶段,从 v1 数据迁移的功能尚未经过验证,因此请先备份数据,并避免用你唯一一份 v1 下载文件进行测试。
它能在 Windows ARM 或 32 位系统上运行吗?不能。仅提供 Windows x64 安装包,不提供 Windows arm64 和所有 32 位版本。另外,未签名的 x64 安装程序可能会触发 SmartScreen 警告。
脚本或 AI 代理能否代替图形界面来控制 Motrix?可以。官方的 @motrix/cli 客户端专为日常命令行使用和 AI 代理设计,还可以通过安全的设备代码流程与远程无界面服务器配对。
插件如何保证安全?插件运行在隔离的 QuickJS 沙箱中,无法使用 Node.js API,也不能直接访问文件或网络。插件必须在清单文件中声明所需权限,Motrix 会先将这些权限展示给用户,待用户授权后才允许访问。
我的浏览器能否自动把下载任务交给 Motrix?可以。Motrix 扩展适用于 Chrome、Edge 和 Firefox,经原生消息(native messaging)配对后,它会拦截浏览器中的下载,并可一键交给桌面应用处理。
Motrix 底层用了哪些技术?桌面界面基于 Electron 44、React 19 和 Tailwind CSS 4 构建;下载由 Motrix 维护的 aria2 分支驱动;better-sqlite3 负责保存会话,使下载任务在重启后可以继续。
Creator
agalwood
Size
92.3 MB
Stars
57K
Age
7y
Commits · 90 Days