[Skip to content](https://github.com/ImJustDoingMyPart/stremio-stack#start-of-content)

You signed in with another tab or window. [Reload](https://github.com/ImJustDoingMyPart/stremio-stack) to refresh your session.You signed out in another tab or window. [Reload](https://github.com/ImJustDoingMyPart/stremio-stack) to refresh your session.You switched accounts on another tab or window. [Reload](https://github.com/ImJustDoingMyPart/stremio-stack) to refresh your session.Dismiss alert

{{ message }}

[ImJustDoingMyPart](https://github.com/ImJustDoingMyPart)/ **[stremio-stack](https://github.com/ImJustDoingMyPart/stremio-stack)** Public

- [Notifications](https://github.com/login?return_to=%2FImJustDoingMyPart%2Fstremio-stack) You must be signed in to change notification settings
- [Fork\\
2](https://github.com/login?return_to=%2FImJustDoingMyPart%2Fstremio-stack)
- [Star\\
36](https://github.com/login?return_to=%2FImJustDoingMyPart%2Fstremio-stack)


main

[**1** Branch](https://github.com/ImJustDoingMyPart/stremio-stack/branches) [**0** Tags](https://github.com/ImJustDoingMyPart/stremio-stack/tags)

[Go to Branches page](https://github.com/ImJustDoingMyPart/stremio-stack/branches)[Go to Tags page](https://github.com/ImJustDoingMyPart/stremio-stack/tags)

Go to file

Code

Open more actions menu

## Folders and files

| Name | Name | Last commit message | Last commit date |
| --- | --- | --- | --- |
| ## Latest commit<br>![ImJustDoingMyPart](https://avatars.githubusercontent.com/u/132678351?v=4&size=40)![claude](https://avatars.githubusercontent.com/u/81847?v=4&size=40)<br>[ImJustDoingMyPart](https://github.com/ImJustDoingMyPart/stremio-stack/commits?author=ImJustDoingMyPart)<br>and<br>[claude](https://github.com/ImJustDoingMyPart/stremio-stack/commits?author=claude)<br>[docs: add subtitle section explaining OpenSubtitles vs hash-based addons](https://github.com/ImJustDoingMyPart/stremio-stack/commit/02fa07e29cb5d9de62cf0140e29f364c68395417)<br>Open commit details<br>5 months agoFeb 18, 2026<br>[02fa07e](https://github.com/ImJustDoingMyPart/stremio-stack/commit/02fa07e29cb5d9de62cf0140e29f364c68395417) · 5 months agoFeb 18, 2026<br>## History<br>[5 Commits](https://github.com/ImJustDoingMyPart/stremio-stack/commits/main/) <br>Open commit details<br>[View commit history for this file.](https://github.com/ImJustDoingMyPart/stremio-stack/commits/main/) 5 Commits |
| [.env.example](https://github.com/ImJustDoingMyPart/stremio-stack/blob/main/.env.example ".env.example") | [.env.example](https://github.com/ImJustDoingMyPart/stremio-stack/blob/main/.env.example ".env.example") | [feat: add background scraper, multi-source scraping, and network isol…](https://github.com/ImJustDoingMyPart/stremio-stack/commit/e2e55a2aaefc16deb32c6bebf8038b703f8c7871 "feat: add background scraper, multi-source scraping, and network isolation  - Replace INDEXER_MANAGER_TYPE with SCRAPE_JACKETT (new Comet API) - Enable Torrentio and Zilean as additional scraping sources - Add background scraper for pre-caching popular content - Add performance tuning defaults (Gunicorn workers, timeouts, cache TTLs) - Isolate PostgreSQL in internal network (no internet access) - Fix FlareSolverr: add proxy_net for external DNS resolution - Add default values (:-syntax) so .env overrides are optional - Update README with architecture diagram and tuning docs - Simplify .env.example (only essential config, rest has defaults)  Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>") | 5 months agoFeb 17, 2026 |
| [Caddyfile](https://github.com/ImJustDoingMyPart/stremio-stack/blob/main/Caddyfile "Caddyfile") | [Caddyfile](https://github.com/ImJustDoingMyPart/stremio-stack/blob/main/Caddyfile "Caddyfile") | [Initial release: Stremio Stack](https://github.com/ImJustDoingMyPart/stremio-stack/commit/45f66f3dc02817b45691079102395f44a7960a24 "Initial release: Stremio Stack") | 5 months agoFeb 6, 2026 |
| [README.md](https://github.com/ImJustDoingMyPart/stremio-stack/blob/main/README.md "README.md") | [README.md](https://github.com/ImJustDoingMyPart/stremio-stack/blob/main/README.md "README.md") | [docs: add subtitle section explaining OpenSubtitles vs hash-based addons](https://github.com/ImJustDoingMyPart/stremio-stack/commit/02fa07e29cb5d9de62cf0140e29f364c68395417 "docs: add subtitle section explaining OpenSubtitles vs hash-based addons  Self-hosted instances behind private URLs (Tailscale) are incompatible with cloud-based hash-matching subtitle services. Document OpenSubtitles v3 as the recommended alternative.  Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>") | 5 months agoFeb 18, 2026 |
| [docker-compose.yml](https://github.com/ImJustDoingMyPart/stremio-stack/blob/main/docker-compose.yml "docker-compose.yml") | [docker-compose.yml](https://github.com/ImJustDoingMyPart/stremio-stack/blob/main/docker-compose.yml "docker-compose.yml") | [feat: add background scraper, multi-source scraping, and network isol…](https://github.com/ImJustDoingMyPart/stremio-stack/commit/e2e55a2aaefc16deb32c6bebf8038b703f8c7871 "feat: add background scraper, multi-source scraping, and network isolation  - Replace INDEXER_MANAGER_TYPE with SCRAPE_JACKETT (new Comet API) - Enable Torrentio and Zilean as additional scraping sources - Add background scraper for pre-caching popular content - Add performance tuning defaults (Gunicorn workers, timeouts, cache TTLs) - Isolate PostgreSQL in internal network (no internet access) - Fix FlareSolverr: add proxy_net for external DNS resolution - Add default values (:-syntax) so .env overrides are optional - Update README with architecture diagram and tuning docs - Simplify .env.example (only essential config, rest has defaults)  Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>") | 5 months agoFeb 17, 2026 |
| View all files |

## Repository files navigation

# Self-Hosted Stremio Stack

[Permalink: Self-Hosted Stremio Stack](https://github.com/ImJustDoingMyPart/stremio-stack#self-hosted-stremio-stack)

A high-performance, self-hosted backend for Stremio with Real-Debrid. Uses **Comet** as the addon, **Jackett** for indexer management, **PostgreSQL** for persistent caching, and built-in scrapers (Torrentio, Zilean) for maximum content coverage.

## Features

[Permalink: Features](https://github.com/ImJustDoingMyPart/stremio-stack#features)

- **Fast:** Background scraper pre-caches popular content. Most searches resolve from local cache in under 3 seconds.
- **Secure:** No ports exposed by default. PostgreSQL isolated in an internal network with no internet access.
- **Multi-source:** Three scraping layers (Jackett indexers + Torrentio + Zilean) working together for broad coverage.
- **Smart caching:** PostgreSQL stores torrent metadata permanently. Repeated searches are instant.
- **Captcha bypass:** FlareSolverr included for Cloudflare-protected indexers (like 1337x).

## Prerequisites

[Permalink: Prerequisites](https://github.com/ImJustDoingMyPart/stremio-stack#prerequisites)

- **Docker** & **Docker Compose** installed.
- **Real-Debrid** API Key.
- **(Optional)** A reverse proxy (Caddy, Nginx, Traefik) or Tailscale for external access.

## Deployment

[Permalink: Deployment](https://github.com/ImJustDoingMyPart/stremio-stack#deployment)

### 1\. Clone and Configure

[Permalink: 1. Clone and Configure](https://github.com/ImJustDoingMyPart/stremio-stack#1-clone-and-configure)

```
git clone https://github.com/ImJustDoingMyPart/stremio-stack.git
cd stremio-stack
cp .env.example .env
```

Edit `.env` with your settings. You'll need to start the stack once to get the Jackett API Key, then update `.env` and restart.

### 2\. Create the proxy network

[Permalink: 2. Create the proxy network](https://github.com/ImJustDoingMyPart/stremio-stack#2-create-the-proxy-network)

If you don't already have a shared proxy network:

```
docker network create proxy_net
```

If you use Caddy or another reverse proxy, connect it to this same network.

### 3\. Start the Stack

[Permalink: 3. Start the Stack](https://github.com/ImJustDoingMyPart/stremio-stack#3-start-the-stack)

```
docker compose up -d
```

### 4\. Configure Jackett

[Permalink: 4. Configure Jackett](https://github.com/ImJustDoingMyPart/stremio-stack#4-configure-jackett)

1. Access Jackett (via your proxy or `http://YOUR-IP:9117` if ports are uncommented).
2. **Set FlareSolverr URL** in Settings: `http://flaresolverr:8191`
3. **Add indexers.**Recommended starting set:

   - **General:** 1337x, The Pirate Bay, TheRARBG, TorrentGalaxyClone, EZTV, YTS, Knaben, LimeTorrents
   - **Anime:** Anime Tosho
   - **Spanish content:** MejorTorrent, DonTorrent
4. Copy the **API Key** from Jackett's top-right corner into your `.env` file.
5. Restart Comet: `docker compose restart comet`

> **Tip:** Avoid adding too many indexers. 8-12 well-chosen ones beat 50 slow ones. The `INDEXER_MANAGER_TIMEOUT` (default 12s) will drop slow indexers from results automatically.

### 5\. Configure Comet

[Permalink: 5. Configure Comet](https://github.com/ImJustDoingMyPart/stremio-stack#5-configure-comet)

1. Access the Comet configuration page (`/configure`).
2. Enter your **Real-Debrid API Key**.
3. Enable **Show Cached Only** for a clean streaming experience.
4. Click **Install** to add it to Stremio.

## Architecture

[Permalink: Architecture](https://github.com/ImJustDoingMyPart/stremio-stack#architecture)

```
                    ┌─────────────────────────────────────┐
                    │           proxy_net (internet)       │
                    │                                      │
                    │  ┌───────┐  ┌───────┐  ┌──────────┐│
  Stremio ──────────┼─►│ Comet │  │Jackett│  │FlareSolvr││
                    │  └──┬────┘  └──┬────┘  └──────────┘│
                    └─────┼──────────┼────────────────────┘
                          │          │
                    ┌─────┼──────────┼────────────────────┐
                    │     │  internal (no internet)        │
                    │     ▼          ▼                     │
                    │  ┌──────────────────┐               │
                    │  │   PostgreSQL     │               │
                    │  └──────────────────┘               │
                    └─────────────────────────────────────┘
```

- **proxy\_net:** External network with internet access. Connects to your reverse proxy.
- **internal:** Isolated network. PostgreSQL lives here with no internet access.
- Comet, Jackett, and FlareSolverr bridge both networks.

## How It Works

[Permalink: How It Works](https://github.com/ImJustDoingMyPart/stremio-stack#how-it-works)

Comet pulls torrents from **three sources simultaneously**:

| Source | Type | Speed | Coverage |
| --- | --- | --- | --- |
| **Jackett** | Your configured indexers | Depends on indexer | Customizable |
| **Torrentio** | Pre-crawled database | Fast | Massive (mainstream) |
| **Zilean** | DMM hashlist index | Fast | Large (debrid-focused) |

The **background scraper** runs every hour, pre-caching results from all three sources into PostgreSQL. When you search in Stremio, Comet checks the local cache first — if it's fresh enough, you get results in under a second without waiting for any external query.

Content you search manually gets **demand priority**, so it stays fresh in the cache for longer.

## Subtitles

[Permalink: Subtitles](https://github.com/ImJustDoingMyPart/stremio-stack#subtitles)

Subtitles in Stremio are handled by **separate subtitle addons**, completely independent from this stack. Comet only provides the video stream.

**Recommended:** Install the **OpenSubtitles v3** addon in Stremio. It matches subtitles by IMDB ID and works with any stream source, including self-hosted instances.

> **Note for self-hosted instances:** Hash-based subtitle addons (like Subhero) may not work with self-hosted Comet if your instance is only accessible via a private URL (e.g., Tailscale). These services need to reach the stream URL from the internet to compute the file hash. OpenSubtitles v3 has no such requirement and is the reliable choice.

## Chromecast / Android TV / iOS

[Permalink: Chromecast / Android TV / iOS](https://github.com/ImJustDoingMyPart/stremio-stack#chromecast--android-tv--ios)

Stremio on these devices requires HTTPS. The easiest way without opening router ports is **Tailscale Serve**:

```
# Expose Comet privately to your Tailnet
tailscale serve --bg --https=443 http://localhost:8000
```

Use the generated URL (e.g., `https://my-server.tailnet.ts.net`) as your `PUBLIC_BASE_URL` in `.env`, restart, and reconfigure the addon.

> **Serve** = private to your Tailnet (recommended). **Funnel** = public internet.

## Performance Tuning

[Permalink: Performance Tuning](https://github.com/ImJustDoingMyPart/stremio-stack#performance-tuning)

All performance variables have sensible defaults in `docker-compose.yml`. Override them in `.env` only if needed:

| Variable | Default | Description |
| --- | --- | --- |
| `FASTAPI_WORKERS` | 2 | Gunicorn workers (increase for high concurrency) |
| `INDEXER_MANAGER_TIMEOUT` | 12s | Max wait per Jackett indexer |
| `BACKGROUND_SCRAPER_ENABLED` | True | Pre-cache popular content |
| `BACKGROUND_SCRAPER_CONCURRENT_WORKERS` | 2 | Parallel scraping workers |
| `SCRAPE_JACKETT` | both | Jackett scraping mode |
| `SCRAPE_TORRENTIO` | both | Torrentio scraping mode |
| `SCRAPE_ZILEAN` | both | Zilean scraping mode |
| `TORRENT_CACHE_TTL` | -1 | Torrent cache lifetime (-1 = permanent) |
| `LIVE_TORRENT_CACHE_TTL` | 86400 | Seconds before triggering a fresh search |
| `DEBRID_CACHE_TTL` | 86400 | Debrid availability cache (1 day) |

Scraper modes: `live` (on-demand only), `background` (pre-cache only), `both`, `false` (disabled).

## Project Structure

[Permalink: Project Structure](https://github.com/ImJustDoingMyPart/stremio-stack#project-structure)

- `docker-compose.yml` — Stack definition with performance defaults.
- `.env.example` — Template for environment variables.
- `Caddyfile` — Optional reverse proxy configuration example.

## Contributing

[Permalink: Contributing](https://github.com/ImJustDoingMyPart/stremio-stack#contributing)

Feel free to fork this repository and submit pull requests.

## About

A high-performance, secure, and clean self-hosted backend for Stremio.


### Topics

[torrent](https://github.com/topics/torrent "Topic: torrent") [media](https://github.com/topics/media "Topic: media") [debrid](https://github.com/topics/debrid "Topic: debrid") [arr](https://github.com/topics/arr "Topic: arr") [trackers](https://github.com/topics/trackers "Topic: trackers") [jackett](https://github.com/topics/jackett "Topic: jackett") [stremio](https://github.com/topics/stremio "Topic: stremio")

### Resources

[Readme](https://github.com/ImJustDoingMyPart/stremio-stack#readme-ov-file)

### Uh oh!

There was an error while loading. [Please reload this page](https://github.com/ImJustDoingMyPart/stremio-stack).

[Activity](https://github.com/ImJustDoingMyPart/stremio-stack/activity)

### Stars

[**36**\\
stars](https://github.com/ImJustDoingMyPart/stremio-stack/stargazers)

### Watchers

[**2**\\
watching](https://github.com/ImJustDoingMyPart/stremio-stack/watchers)

### Forks

[**2**\\
forks](https://github.com/ImJustDoingMyPart/stremio-stack/forks)

[Report repository](https://github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2FImJustDoingMyPart%2Fstremio-stack&report=ImJustDoingMyPart+%28user%29)

## [Releases](https://github.com/ImJustDoingMyPart/stremio-stack/releases)

No releases published

## [Packages\  0](https://github.com/users/ImJustDoingMyPart/packages?repo_name=stremio-stack)

No packages published

## [Contributors\  2](https://github.com/ImJustDoingMyPart/stremio-stack/graphs/contributors)

- [![@ImJustDoingMyPart](https://avatars.githubusercontent.com/u/132678351?s=64&v=4)](https://github.com/ImJustDoingMyPart)[**ImJustDoingMyPart**](https://github.com/ImJustDoingMyPart)
- [![@claude](https://avatars.githubusercontent.com/u/81847?s=64&v=4)](https://github.com/claude)[**claude** Claude](https://github.com/claude)

You can’t perform that action at this time.