# piecemeal > A self-hosted BitTorrent client in Go: a qBittorrent-compatible API for Radarr, Sonarr and Prowlarr, a modern web UI, and SSO. ## Docs - [Introduction](https://piecemeal-flax.vercel.app/docs): A self-hosted BitTorrent client written in Go, with a qBittorrent-compatible API for the *arrs, a modern web UI and single sign-on. - [Install](https://piecemeal-flax.vercel.app/docs/install): Run piecemeal with Docker, Docker Compose or a single binary, sign in for the first time, and keep it up to date. - [Configuration](https://piecemeal-flax.vercel.app/docs/configuration): Every PIECEMEAL_* environment variable, every runtime setting with its default, and how to pin settings from the environment. ### Guides - [Radarr, Sonarr and Prowlarr](https://piecemeal-flax.vercel.app/docs/guides/arr): Add piecemeal to Radarr, Sonarr and Prowlarr as a qBittorrent download client, with an API key, and let it fetch their download links. - [Reverse proxy](https://piecemeal-flax.vercel.app/docs/guides/reverse-proxy): Serve piecemeal behind Caddy, Traefik or nginx over HTTPS, with the real client address and a host allowlist. - [Single sign-on](https://piecemeal-flax.vercel.app/docs/guides/sso): Sign in to piecemeal through Pocket ID, Authelia, Authentik, Keycloak or any OpenID Connect provider, with allowed and admin groups. - [VPN and port forwarding](https://piecemeal-flax.vercel.app/docs/guides/vpn): Run piecemeal inside a WireGuard container's network namespace and forward its peer port through the VPN with NAT-PMP. - [Proxy](https://piecemeal-flax.vercel.app/docs/guides/proxy): Send piecemeal's tracker announces, peer connections, torrent downloads and RSS feeds through a SOCKS5 or HTTP proxy, and what can't go through one. - [Move from Transmission or qBittorrent](https://piecemeal-flax.vercel.app/docs/guides/import): Move your torrents from Transmission or qBittorrent to piecemeal, with their data, save paths, renames, categories, tags and totals. - [Backup and restore](https://piecemeal-flax.vercel.app/docs/guides/backup): Back up piecemeal's database while it runs, and restore it, keeping settings, users, API keys, torrents and RSS. ### Using piecemeal - [Web UIs](https://piecemeal-flax.vercel.app/docs/features/web-ui): piecemeal's web UI for desktop and phone, its keyboard shortcuts, and serving VueTorrent or another qBittorrent web UI beside it. - [RSS](https://piecemeal-flax.vercel.app/docs/features/rss): Follow RSS and Atom feeds and download what matches, with qBittorrent's rule syntax, episode filters and the smart episode filter. ### Reference - [Comparison](https://piecemeal-flax.vercel.app/docs/reference/comparison): How piecemeal compares with qBittorrent, Transmission and Deluge as a server's torrent client, feature by feature, including where it falls short. - [APIs](https://piecemeal-flax.vercel.app/docs/reference/api): How to authenticate to piecemeal's native REST API and the qBittorrent WebAPI, with API keys and scopes, and how to follow live changes. - [qBittorrent WebAPI compatibility](https://piecemeal-flax.vercel.app/docs/reference/qbittorrent-compat): Every qBittorrent WebAPI v2 endpoint and how piecemeal implements it, for the *arrs, VueTorrent and other qBittorrent tools. - [Security](https://piecemeal-flax.vercel.app/docs/reference/security): How piecemeal authenticates people and programs, what users and admins may do, and how it guards paths, fetches and the browser. - [Performance](https://piecemeal-flax.vercel.app/docs/reference/performance): The load test that measures piecemeal with 1,000 torrents, how to run it on your own disks, and its results. ### Help - [Troubleshooting](https://piecemeal-flax.vercel.app/docs/help/troubleshooting): Fixes for the problems people run into most with piecemeal, from the *arrs and reverse proxies to SSO, paths and peers. - [FAQ](https://piecemeal-flax.vercel.app/docs/help/faq): Answers to common questions about piecemeal, from why it exists to how it compares with qBittorrent and Transmission. - [Development](https://piecemeal-flax.vercel.app/docs/help/development): Build piecemeal from source, run its tests, end-to-end checks and load test, and contribute changes. ## Reference - [piecemeal API](https://piecemeal-flax.vercel.app/reference): piecemeal's native API. The web UI uses it, and so can anything else: authenticate with a session cookie (send X-Requested-With: piecemeal on unsafe requests)… ### Admin - [Download a backup of the database](https://piecemeal-flax.vercel.app/reference/admin/get-backup): Admins only. A consistent copy of piecemeal's database: settings, users, API keys,… Reference for the GET /admin/backup endpoint in the piecemeal API. ### Access - [List API keys](https://piecemeal-flax.vercel.app/reference/access/list-api-keys): List API keys. Reference for the GET /api-keys endpoint in the piecemeal API. - [Create an API key](https://piecemeal-flax.vercel.app/reference/access/create-api-key): Create an API key. Reference for the POST /api-keys endpoint in the piecemeal API. - [Delete an API key](https://piecemeal-flax.vercel.app/reference/access/delete-api-key): Delete an API key. Reference for the DELETE /api-keys/{id} endpoint in the piecemeal API. - [List audit log entries, newest first](https://piecemeal-flax.vercel.app/reference/access/list-audit): Admins only. Reference for the GET /audit endpoint in the piecemeal API. - [List sessions](https://piecemeal-flax.vercel.app/reference/access/list-sessions): List sessions. Reference for the GET /sessions endpoint in the piecemeal API. - [End a session](https://piecemeal-flax.vercel.app/reference/access/delete-session): End a session. Reference for the DELETE /sessions/{id} endpoint in the piecemeal API. - [List users](https://piecemeal-flax.vercel.app/reference/access/list-users): Admins only. Reference for the GET /users endpoint in the piecemeal API. - [Remove a user with their sessions and API keys](https://piecemeal-flax.vercel.app/reference/access/delete-user): SSO users who are still allowed to sign in are created again on their next sign-in.… Reference for the DELETE /users/{id} endpoint in the piecemeal API. ### Auth - [Get the sign-in methods](https://piecemeal-flax.vercel.app/reference/auth/get-auth-config): Get the sign-in methods. Reference for the GET /auth/config endpoint in the piecemeal API. - [Sign in with a password](https://piecemeal-flax.vercel.app/reference/auth/login): Sign in with a password. Reference for the POST /auth/login endpoint in the piecemeal API. - [Sign out](https://piecemeal-flax.vercel.app/reference/auth/logout): Sign out. Reference for the POST /auth/logout endpoint in the piecemeal API. - [Get who is signed in](https://piecemeal-flax.vercel.app/reference/auth/get-me): Get who is signed in. Reference for the GET /auth/me endpoint in the piecemeal API. ### Categories and tags - [List categories](https://piecemeal-flax.vercel.app/reference/categories-and-tags/list-categories): List categories. Reference for the GET /categories endpoint in the piecemeal API. - [Delete a category](https://piecemeal-flax.vercel.app/reference/categories-and-tags/delete-category): Delete a category. Reference for the DELETE /categories/{name} endpoint in the piecemeal API. - [Create or change a category](https://piecemeal-flax.vercel.app/reference/categories-and-tags/put-category): Create or change a category. Reference for the PUT /categories/{name} endpoint in the piecemeal API. - [List tags](https://piecemeal-flax.vercel.app/reference/categories-and-tags/list-tags): List tags. Reference for the GET /tags endpoint in the piecemeal API. - [Delete a tag](https://piecemeal-flax.vercel.app/reference/categories-and-tags/delete-tag): Delete a tag. Reference for the DELETE /tags/{name} endpoint in the piecemeal API. - [Create a tag](https://piecemeal-flax.vercel.app/reference/categories-and-tags/create-tag): Create a tag. Reference for the PUT /tags/{name} endpoint in the piecemeal API. ### Events - [Stream live changes](https://piecemeal-flax.vercel.app/reference/events/stream-events): Server-sent events. The first event is a snapshot of the torrents, transfer status, categories… Reference for the GET /events endpoint in the piecemeal API. ### System - [Get recent log entries](https://piecemeal-flax.vercel.app/reference/system/get-log): Admins only. Reference for the GET /log endpoint in the piecemeal API. - [Get settings](https://piecemeal-flax.vercel.app/reference/system/get-settings): Get settings. Reference for the GET /settings endpoint in the piecemeal API. - [Change settings](https://piecemeal-flax.vercel.app/reference/system/update-settings): Admins only. Reference for the PATCH /settings endpoint in the piecemeal API. - [Get version and network status](https://piecemeal-flax.vercel.app/reference/system/get-system): Get version and network status. Reference for the GET /system endpoint in the piecemeal API. - [Get transfer rates and totals](https://piecemeal-flax.vercel.app/reference/system/get-transfer): Get transfer rates and totals. Reference for the GET /transfer endpoint in the piecemeal API. - [Change the speed limits](https://piecemeal-flax.vercel.app/reference/system/update-transfer): Changes the global and alternative limits and the alternative speed toggle. Unlike PATCH… Reference for the PATCH /transfer endpoint in the piecemeal API. ### RSS - [List RSS folders and feeds](https://piecemeal-flax.vercel.app/reference/rss/get-rss): List RSS folders and feeds. Reference for the GET /rss endpoint in the piecemeal API. - [Add an RSS feed](https://piecemeal-flax.vercel.app/reference/rss/add-rss-feed): Admins only. Reference for the POST /rss/feeds endpoint in the piecemeal API. - [Get an RSS feed with its articles](https://piecemeal-flax.vercel.app/reference/rss/get-rss-feed): Get an RSS feed with its articles. Reference for the GET /rss/feeds/{uid} endpoint in the piecemeal API. - [Change an RSS feed](https://piecemeal-flax.vercel.app/reference/rss/update-rss-feed): Admins only. Reference for the PATCH /rss/feeds/{uid} endpoint in the piecemeal API. - [Add an RSS folder](https://piecemeal-flax.vercel.app/reference/rss/add-rss-folder): Admins only. Reference for the POST /rss/folders endpoint in the piecemeal API. - [Remove an RSS feed, or a folder with everything in it](https://piecemeal-flax.vercel.app/reference/rss/remove-rss-item): Admins only. Reference for the DELETE /rss/items endpoint in the piecemeal API. - [Mark RSS articles read](https://piecemeal-flax.vercel.app/reference/rss/mark-rss-read): Mark RSS articles read. Reference for the POST /rss/read endpoint in the piecemeal API. - [Fetch RSS feeds now](https://piecemeal-flax.vercel.app/reference/rss/refresh-rss): Fetch RSS feeds now. Reference for the POST /rss/refresh endpoint in the piecemeal API. - [List RSS download rules](https://piecemeal-flax.vercel.app/reference/rss/list-rss-rules): List RSS download rules. Reference for the GET /rss/rules endpoint in the piecemeal API. - [Remove an RSS download rule](https://piecemeal-flax.vercel.app/reference/rss/remove-rss-rule): Admins only. Reference for the DELETE /rss/rules/{name} endpoint in the piecemeal API. - [Create or replace an RSS download rule](https://piecemeal-flax.vercel.app/reference/rss/put-rss-rule): Admins only. Reference for the PUT /rss/rules/{name} endpoint in the piecemeal API. - [List the articles an RSS rule accepts](https://piecemeal-flax.vercel.app/reference/rss/list-rss-rule-matches): List the articles an RSS rule accepts. Reference for the GET /rss/rules/{name}/matches endpoint in the piecemeal API. - [Rename an RSS download rule](https://piecemeal-flax.vercel.app/reference/rss/rename-rss-rule): Admins only. Reference for the POST /rss/rules/{name}/rename endpoint in the piecemeal API. ### Torrents - [List torrents](https://piecemeal-flax.vercel.app/reference/torrents/list-torrents): List torrents. Reference for the GET /torrents endpoint in the piecemeal API. - [Add a torrent](https://piecemeal-flax.vercel.app/reference/torrents/add-torrent): Add a torrent. Reference for the POST /torrents endpoint in the piecemeal API. - [Act on several torrents](https://piecemeal-flax.vercel.app/reference/torrents/bulk-torrent-action): Act on several torrents. Reference for the POST /torrents/actions endpoint in the piecemeal API. - [Remove a torrent](https://piecemeal-flax.vercel.app/reference/torrents/delete-torrent): Remove a torrent. Reference for the DELETE /torrents/{hash} endpoint in the piecemeal API. - [Get a torrent](https://piecemeal-flax.vercel.app/reference/torrents/get-torrent): Get a torrent. Reference for the GET /torrents/{hash} endpoint in the piecemeal API. - [Change a torrent](https://piecemeal-flax.vercel.app/reference/torrents/update-torrent): Change a torrent. Reference for the PATCH /torrents/{hash} endpoint in the piecemeal API. - [List a torrent's files](https://piecemeal-flax.vercel.app/reference/torrents/list-torrent-files): List a torrent's files. Reference for the GET /torrents/{hash}/files endpoint in the piecemeal API. - [Set file priorities](https://piecemeal-flax.vercel.app/reference/torrents/set-torrent-file-priority): Set file priorities. Reference for the PATCH /torrents/{hash}/files endpoint in the piecemeal API. - [Rename a file or folder](https://piecemeal-flax.vercel.app/reference/torrents/rename-torrent-path): Renames the file or folder on disk too. Paths are relative to the save… Reference for the POST /torrents/{hash}/files/rename endpoint in the piecemeal API. - [List a torrent's connected peers](https://piecemeal-flax.vercel.app/reference/torrents/list-torrent-peers): List a torrent's connected peers. Reference for the GET /torrents/{hash}/peers endpoint in the piecemeal API. - [Connect a torrent to peers](https://piecemeal-flax.vercel.app/reference/torrents/add-torrent-peers): Connect a torrent to peers. Reference for the POST /torrents/{hash}/peers endpoint in the piecemeal API. - [Get a torrent's piece states](https://piecemeal-flax.vercel.app/reference/torrents/get-torrent-pieces): Get a torrent's piece states. Reference for the GET /torrents/{hash}/pieces endpoint in the piecemeal API. - [Announce to a torrent's trackers now](https://piecemeal-flax.vercel.app/reference/torrents/reannounce-torrent): Announce to a torrent's trackers now. Reference for the POST /torrents/{hash}/reannounce endpoint in the piecemeal API. - [Verify a torrent's data](https://piecemeal-flax.vercel.app/reference/torrents/recheck-torrent): Verify a torrent's data. Reference for the POST /torrents/{hash}/recheck endpoint in the piecemeal API. - [Start a torrent](https://piecemeal-flax.vercel.app/reference/torrents/start-torrent): Start a torrent. Reference for the POST /torrents/{hash}/start endpoint in the piecemeal API. - [Stop a torrent](https://piecemeal-flax.vercel.app/reference/torrents/stop-torrent): Stop a torrent. Reference for the POST /torrents/{hash}/stop endpoint in the piecemeal API. - [Download a torrent's .torrent file](https://piecemeal-flax.vercel.app/reference/torrents/get-torrent-file): With the torrent's current trackers and web seeds. 422 until the metadata… Reference for the GET /torrents/{hash}/torrent-file endpoint in the piecemeal API. - [List a torrent's trackers](https://piecemeal-flax.vercel.app/reference/torrents/list-torrent-trackers): List a torrent's trackers. Reference for the GET /torrents/{hash}/trackers endpoint in the piecemeal API. - [Replace a torrent's trackers](https://piecemeal-flax.vercel.app/reference/torrents/set-torrent-trackers): Replace a torrent's trackers. Reference for the PUT /torrents/{hash}/trackers endpoint in the piecemeal API. - [List a torrent's web seeds](https://piecemeal-flax.vercel.app/reference/torrents/list-torrent-web-seeds): List a torrent's web seeds. Reference for the GET /torrents/{hash}/web-seeds endpoint in the piecemeal API. - [Replace a torrent's web seeds](https://piecemeal-flax.vercel.app/reference/torrents/set-torrent-web-seeds): Replace a torrent's web seeds. Reference for the PUT /torrents/{hash}/web-seeds endpoint in the piecemeal API. ## Agent skills - [piecemeal](https://piecemeal-flax.vercel.app/.well-known/agent-skills/piecemeal/SKILL.md): Read the piecemeal docs instead of answering from memory. A self-hosted BitTorrent client in Go: a qBittorrent-compatible API for Radarr, Sonarr and Prowlarr, a modern web UI, and SSO. Use when a task involves piecemeal: how it works, how to set it up or configure it, or its API. ## Agent resources - [llms-full.txt](https://piecemeal-flax.vercel.app/llms-full.txt): The full Markdown of every page in one file. - [Page Markdown](https://piecemeal-flax.vercel.app/index.md): Append `.md` to any page URL to fetch that page as raw Markdown. - [JSON API](https://piecemeal-flax.vercel.app/api/docs/pages.json): Page index of the JSON docs API; each entry links the page's JSON and Markdown forms. Described by the OpenAPI document at https://piecemeal-flax.vercel.app/openapi.json. - [Agent skills](https://piecemeal-flax.vercel.app/.well-known/agent-skills/index.json): Agent Skills discovery index of the skills this site publishes. - [API catalog](https://piecemeal-flax.vercel.app/.well-known/api-catalog): RFC 9727 linkset of the APIs documented here. - [AI catalog](https://piecemeal-flax.vercel.app/.well-known/ai-catalog.json): ARD manifest of the agent-facing resources on this site (MCP server, skills, APIs). - [agent-readability.json](https://piecemeal-flax.vercel.app/agent-readability.json): Manifest of every agent-facing artifact on this site. - [Sitemap](https://piecemeal-flax.vercel.app/sitemap.xml): Every indexable page URL with its last-modified date.