Skip to content

hackitz/qbittorrent-RCD

Repository files navigation

qBittorrent Web Downloader - Chrome Extension

Send download links directly to your qBittorrent instance (including Docker containers) with a simple right-click!

Features

  • 🖱️ Right-click context menu on any link
  • 🐳 Works with qBittorrent in Docker containers
  • 🔒 Securely stores your credentials
  • 🔔 Desktop notifications for success/failure
  • ✅ Built-in connection tester
  • 🎯 Supports torrents, magnet links, and direct downloads
  • 🍪 Cookie authentication for private trackers (including Cloudflare-protected sites like IPTorrents)
  • ⚡ One-time setup, works forever (until cookies expire)

Installation

1. Install the Extension

  1. Download all extension files to a folder on your computer
  2. Open Chrome and go to chrome://extensions/
  3. Enable "Developer mode" (toggle in top-right corner)
  4. Click "Load unpacked"
  5. Select the folder containing the extension files

2. Configure qBittorrent Web UI

If running qBittorrent normally:

  1. Open qBittorrent
  2. Go to Tools → Options → Web UI
  3. Enable "Web User Interface (Remote control)"
  4. Set a username and password (if not already set)
  5. Note the port (default is 8080)
  6. Click OK

If running qBittorrent in Docker:

Your docker-compose.yml should expose the Web UI port, for example:

version: "3"
services:
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
      - WEBUI_PORT=8080
    volumes:
      - ./config:/config
      - ./downloads:/downloads
    ports:
      - 8080:8080  # Web UI port
      - 6881:6881  # Torrent port
      - 6881:6881/udp
    restart: unless-stopped

Make sure:

  • The Web UI port is exposed (e.g., 8080:8080)
  • You can access the Web UI at http://localhost:8080 or http://YOUR_SERVER_IP:8080
  • You know the username and password (default is usually admin/adminpass, but check your container logs)

3. Configure the Extension

  1. Click the extension icon in Chrome toolbar
  2. Click "Open Settings"
  3. Enter your details:
    • URL: http://localhost:8080 (or your Docker host IP)
    • Username: Your qBittorrent Web UI username
    • Password: Your qBittorrent Web UI password
  4. Click "Test Connection" to verify it works
  5. Click "Save Settings"

Usage

  1. Right-click any download link on a webpage
  2. Select "Send to qBittorrent" from the context menu
  3. A notification will confirm the download was added (or show an error)
  4. Check qBittorrent to see your download!

Supported Link Types

  • ✅ Torrent files (.torrent)
  • ✅ Magnet links (magnet:?xt=...)
  • ✅ Direct download links (qBittorrent will handle them)

Troubleshooting

"Connection failed" or 401 error

This is usually a CORS (Cross-Origin Resource Sharing) issue. qBittorrent needs to be configured to allow the Chrome extension to access it.

Fix for qBittorrent (non-Docker):

  1. Open qBittorrent
  2. Go to Tools → Options → Web UI
  3. Under "Cross-origin resource sharing (CORS)" section:
    • Add chrome-extension://* to the allowed origins
    • Or set it to * to allow all (less secure)
  4. Click Apply and OK
  5. Restart qBittorrent

Fix for qBittorrent in Docker:

Add environment variable to your docker-compose.yml:

services:
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    environment:
      - WEBUI_CORS_ENABLED=true
      - WEBUI_CORS_ORIGINS=chrome-extension://*
    # ... rest of your config

Or you can modify the qBittorrent config file directly in your Docker volume:

  1. Find your config: ./config/qBittorrent/qBittorrent.conf
  2. Under [Preferences] section add:
    WebUI\CSRFProtection=false
    WebUI\HostHeaderValidation=false
    
  3. Restart the container: docker restart qbittorrent

Alternative: Use HTTP instead of checking in browser

If you're accessing via localhost, try:

  • http://127.0.0.1:8080 instead of http://localhost:8080
  • Make sure it's http:// not https://

"Connection failed" error

  1. Check qBittorrent is running:

    • Docker: docker ps | grep qbittorrent
    • Normal: Check if qBittorrent is open
  2. Verify Web UI is accessible:

    • Open http://localhost:8080 in your browser
    • You should see the qBittorrent Web UI login page
  3. Check Docker port mapping:

    docker port qbittorrent

    Should show: 8080/tcp -> 0.0.0.0:8080

  4. Firewall issues:

    • If using a remote server, ensure the port is open
    • For Docker, check your firewall isn't blocking the port
  5. Check credentials:

    • Try logging into the Web UI manually with your username/password
    • For Docker, check logs: docker logs qbittorrent | grep password

"Invalid credentials" error

  • Double-check your username and password
  • For Docker containers, the default is often admin/adminpass
  • Try resetting credentials in qBittorrent settings

Extension not appearing in context menu

  • Right-click on an actual link (not just text or images)
  • Some websites block context menus - try a different site
  • Reload the extension in chrome://extensions/

Downloads not appearing in qBittorrent

  • Check qBittorrent's download location settings
  • Verify disk space is available
  • Check qBittorrent logs for errors

Docker-Specific Tips

Finding your container IP:

docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' qbittorrent

Checking if Web UI is working:

curl -i http://localhost:8080/api/v2/app/version

Getting default credentials from logs:

docker logs qbittorrent 2>&1 | grep -i password

Security Notes

  • Credentials are stored securely using Chrome's sync storage
  • They're encrypted by Chrome and synced across your devices
  • HTTPS is recommended for remote connections
  • Consider using a strong password for qBittorrent Web UI

File Structure

qbittorrent-extension/
├── manifest.json       # Extension configuration
├── background.js       # Handles API calls and context menu
├── options.html        # Settings page UI
├── options.js          # Settings page logic
├── popup.html          # Extension popup UI
├── popup.js            # Popup logic
├── icon16.png         # Extension icons
├── icon48.png
├── icon128.png
└── README.md          # This file

API Reference

This extension uses the qBittorrent Web API v2. Key endpoints:

  • /api/v2/auth/login - Authentication
  • /api/v2/torrents/add - Add torrents/downloads

For more details: qBittorrent Web API Documentation

Privacy

  • This extension only communicates with YOUR qBittorrent instance
  • No data is sent to any third-party servers
  • Credentials are stored locally in Chrome's encrypted storage
  • No analytics or tracking

Contributing

Feel free to modify and improve this extension! Some ideas:

  • Add download category selection
  • Support for sequential downloading
  • Pause/resume from extension
  • View download progress
  • Support for other torrent clients

License

Free to use and modify. No warranty provided.

Support

If you encounter issues:

  1. Check the troubleshooting section above
  2. Verify qBittorrent Web UI works in browser first
  3. Check Chrome's extension logs (chrome://extensions/ → Details → Errors)
  4. Review qBittorrent logs for API errors

Made for easy torrenting! 🚀

About

qbittorrent right click download

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published