[Skip to content](https://github.com/torrentstream/torrent-stream#start-of-content)

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

{{ message }}

### Uh oh!

There was an error while loading. [Please reload this page](https://github.com/torrentstream/torrent-stream).

[torrentstream](https://github.com/torrentstream)/ **[torrent-stream](https://github.com/torrentstream/torrent-stream)** Public

- [Notifications](https://github.com/login?return_to=%2Ftorrentstream%2Ftorrent-stream) You must be signed in to change notification settings
- [Fork\\
1](https://github.com/login?return_to=%2Ftorrentstream%2Ftorrent-stream)
- [Star\\
0](https://github.com/login?return_to=%2Ftorrentstream%2Ftorrent-stream)


main

[**2** Branches](https://github.com/torrentstream/torrent-stream/branches) [**0** Tags](https://github.com/torrentstream/torrent-stream/tags)

[Go to Branches page](https://github.com/torrentstream/torrent-stream/branches)[Go to Tags page](https://github.com/torrentstream/torrent-stream/tags)

Go to file

Code

Open more actions menu

## Folders and files

| Name | Name | Last commit message | Last commit date |
| --- | --- | --- | --- |
| ## Latest commit<br>[![nyakaspeter](https://avatars.githubusercontent.com/u/43880678?v=4&size=40)](https://github.com/nyakaspeter)[nyakaspeter](https://github.com/torrentstream/torrent-stream/commits?author=nyakaspeter)<br>[refactor torrent data map](https://github.com/torrentstream/torrent-stream/commit/235f81a883271b998e83cfff897c89a1f9cc33c4)<br>success<br>4 months agoMar 29, 2026<br>[235f81a](https://github.com/torrentstream/torrent-stream/commit/235f81a883271b998e83cfff897c89a1f9cc33c4) · 4 months agoMar 29, 2026<br>## History<br>[13 Commits](https://github.com/torrentstream/torrent-stream/commits/main/) <br>Open commit details<br>[View commit history for this file.](https://github.com/torrentstream/torrent-stream/commits/main/) 13 Commits |
| [.github/workflows](https://github.com/torrentstream/torrent-stream/tree/main/.github/workflows "This path skips through empty directories") | [.github/workflows](https://github.com/torrentstream/torrent-stream/tree/main/.github/workflows "This path skips through empty directories") | [add readme sync](https://github.com/torrentstream/torrent-stream/commit/9a8b80cae3abeaa021b071d42190c796760b6531 "add readme sync") | 5 months agoFeb 8, 2026 |
| [.vscode](https://github.com/torrentstream/torrent-stream/tree/main/.vscode ".vscode") | [.vscode](https://github.com/torrentstream/torrent-stream/tree/main/.vscode ".vscode") | [initial commit](https://github.com/torrentstream/torrent-stream/commit/4a3b729be8da7cc408d6c5c4fa9072956be97c84 "initial commit") | 6 months agoJan 16, 2026 |
| [src](https://github.com/torrentstream/torrent-stream/tree/main/src "src") | [src](https://github.com/torrentstream/torrent-stream/tree/main/src "src") | [refactor torrent data map](https://github.com/torrentstream/torrent-stream/commit/235f81a883271b998e83cfff897c89a1f9cc33c4 "refactor torrent data map") | 4 months agoMar 29, 2026 |
| [.dockerignore](https://github.com/torrentstream/torrent-stream/blob/main/.dockerignore ".dockerignore") | [.dockerignore](https://github.com/torrentstream/torrent-stream/blob/main/.dockerignore ".dockerignore") | [initial commit](https://github.com/torrentstream/torrent-stream/commit/4a3b729be8da7cc408d6c5c4fa9072956be97c84 "initial commit") | 6 months agoJan 16, 2026 |
| [.env](https://github.com/torrentstream/torrent-stream/blob/main/.env ".env") | [.env](https://github.com/torrentstream/torrent-stream/blob/main/.env ".env") | [initial commit](https://github.com/torrentstream/torrent-stream/commit/4a3b729be8da7cc408d6c5c4fa9072956be97c84 "initial commit") | 6 months agoJan 16, 2026 |
| [.gitignore](https://github.com/torrentstream/torrent-stream/blob/main/.gitignore ".gitignore") | [.gitignore](https://github.com/torrentstream/torrent-stream/blob/main/.gitignore ".gitignore") | [refactor torrent data map](https://github.com/torrentstream/torrent-stream/commit/235f81a883271b998e83cfff897c89a1f9cc33c4 "refactor torrent data map") | 4 months agoMar 29, 2026 |
| [Caddyfile](https://github.com/torrentstream/torrent-stream/blob/main/Caddyfile "Caddyfile") | [Caddyfile](https://github.com/torrentstream/torrent-stream/blob/main/Caddyfile "Caddyfile") | [initial commit](https://github.com/torrentstream/torrent-stream/commit/4a3b729be8da7cc408d6c5c4fa9072956be97c84 "initial commit") | 6 months agoJan 16, 2026 |
| [Dockerfile](https://github.com/torrentstream/torrent-stream/blob/main/Dockerfile "Dockerfile") | [Dockerfile](https://github.com/torrentstream/torrent-stream/blob/main/Dockerfile "Dockerfile") | [only start Caddy when env vars are set](https://github.com/torrentstream/torrent-stream/commit/acb16ed0c3fea0008f44797d6aad5a81789f32c1 "only start Caddy when env vars are set") | 5 months agoFeb 25, 2026 |
| [README.md](https://github.com/torrentstream/torrent-stream/blob/main/README.md "README.md") | [README.md](https://github.com/torrentstream/torrent-stream/blob/main/README.md "README.md") | [implement http only install](https://github.com/torrentstream/torrent-stream/commit/04196c7184b90a5f19879f56930fdd09fc21a296 "implement http only install") | 4 months agoMar 8, 2026 |
| [biome.json](https://github.com/torrentstream/torrent-stream/blob/main/biome.json "biome.json") | [biome.json](https://github.com/torrentstream/torrent-stream/blob/main/biome.json "biome.json") | [initial commit](https://github.com/torrentstream/torrent-stream/commit/4a3b729be8da7cc408d6c5c4fa9072956be97c84 "initial commit") | 6 months agoJan 16, 2026 |
| [bun.lock](https://github.com/torrentstream/torrent-stream/blob/main/bun.lock "bun.lock") | [bun.lock](https://github.com/torrentstream/torrent-stream/blob/main/bun.lock "bun.lock") | [initial commit](https://github.com/torrentstream/torrent-stream/commit/4a3b729be8da7cc408d6c5c4fa9072956be97c84 "initial commit") | 6 months agoJan 16, 2026 |
| [components.json](https://github.com/torrentstream/torrent-stream/blob/main/components.json "components.json") | [components.json](https://github.com/torrentstream/torrent-stream/blob/main/components.json "components.json") | [initial commit](https://github.com/torrentstream/torrent-stream/commit/4a3b729be8da7cc408d6c5c4fa9072956be97c84 "initial commit") | 6 months agoJan 16, 2026 |
| [docker-compose.yml](https://github.com/torrentstream/torrent-stream/blob/main/docker-compose.yml "docker-compose.yml") | [docker-compose.yml](https://github.com/torrentstream/torrent-stream/blob/main/docker-compose.yml "docker-compose.yml") | [initial commit](https://github.com/torrentstream/torrent-stream/commit/4a3b729be8da7cc408d6c5c4fa9072956be97c84 "initial commit") | 6 months agoJan 16, 2026 |
| [entrypoint.sh](https://github.com/torrentstream/torrent-stream/blob/main/entrypoint.sh "entrypoint.sh") | [entrypoint.sh](https://github.com/torrentstream/torrent-stream/blob/main/entrypoint.sh "entrypoint.sh") | [only start Caddy when env vars are set](https://github.com/torrentstream/torrent-stream/commit/acb16ed0c3fea0008f44797d6aad5a81789f32c1 "only start Caddy when env vars are set") | 5 months agoFeb 25, 2026 |
| [next.config.ts](https://github.com/torrentstream/torrent-stream/blob/main/next.config.ts "next.config.ts") | [next.config.ts](https://github.com/torrentstream/torrent-stream/blob/main/next.config.ts "next.config.ts") | [initial commit](https://github.com/torrentstream/torrent-stream/commit/4a3b729be8da7cc408d6c5c4fa9072956be97c84 "initial commit") | 6 months agoJan 16, 2026 |
| [package.json](https://github.com/torrentstream/torrent-stream/blob/main/package.json "package.json") | [package.json](https://github.com/torrentstream/torrent-stream/blob/main/package.json "package.json") | [run GC after torrent removal](https://github.com/torrentstream/torrent-stream/commit/1174bee7f498ab88939ed132a3c4437128e9e652 "run GC after torrent removal") | 5 months agoFeb 14, 2026 |
| [postcss.config.mjs](https://github.com/torrentstream/torrent-stream/blob/main/postcss.config.mjs "postcss.config.mjs") | [postcss.config.mjs](https://github.com/torrentstream/torrent-stream/blob/main/postcss.config.mjs "postcss.config.mjs") | [initial commit](https://github.com/torrentstream/torrent-stream/commit/4a3b729be8da7cc408d6c5c4fa9072956be97c84 "initial commit") | 6 months agoJan 16, 2026 |
| [supervisord.conf](https://github.com/torrentstream/torrent-stream/blob/main/supervisord.conf "supervisord.conf") | [supervisord.conf](https://github.com/torrentstream/torrent-stream/blob/main/supervisord.conf "supervisord.conf") | [initial commit](https://github.com/torrentstream/torrent-stream/commit/4a3b729be8da7cc408d6c5c4fa9072956be97c84 "initial commit") | 6 months agoJan 16, 2026 |
| [tsconfig.json](https://github.com/torrentstream/torrent-stream/blob/main/tsconfig.json "tsconfig.json") | [tsconfig.json](https://github.com/torrentstream/torrent-stream/blob/main/tsconfig.json "tsconfig.json") | [initial commit](https://github.com/torrentstream/torrent-stream/commit/4a3b729be8da7cc408d6c5c4fa9072956be97c84 "initial commit") | 6 months agoJan 16, 2026 |
| [tsconfig.server.json](https://github.com/torrentstream/torrent-stream/blob/main/tsconfig.server.json "tsconfig.server.json") | [tsconfig.server.json](https://github.com/torrentstream/torrent-stream/blob/main/tsconfig.server.json "tsconfig.server.json") | [initial commit](https://github.com/torrentstream/torrent-stream/commit/4a3b729be8da7cc408d6c5c4fa9072956be97c84 "initial commit") | 6 months agoJan 16, 2026 |
| View all files |

## Repository files navigation

# Torrent Stream

[Permalink: Torrent Stream](https://github.com/torrentstream/torrent-stream#torrent-stream)

Self-hosted Stremio addon for torrent streaming, with optional in-memory storage, and automatic TLS.

## How to run the app

[Permalink: How to run the app](https://github.com/torrentstream/torrent-stream#how-to-run-the-app)

### Building Docker image from source

[Permalink: Building Docker image from source](https://github.com/torrentstream/torrent-stream#building-docker-image-from-source)

1. Clone the repo

```
git clone https://github.com/torrentstream/torrent-stream.git
```

2. Edit the `.env` file as you need
3. Start with Docker Compose:

```
docker compose up -d
```

### Using prebuilt Docker image

[Permalink: Using prebuilt Docker image](https://github.com/torrentstream/torrent-stream#using-prebuilt-docker-image)

1. Pull latest image from Docker Hub:

```
docker pull torrentstream/torrent-stream:latest
```

2. Start up container:

```
docker run -d \
  --name torrent-stream \
  --restart unless-stopped \
  -e DUCKDNS_TOKEN=your_duckdns_token \
  -e DOMAIN_NAME=your-subdomain.duckdns.org \
  -e ENCRYPTION_KEY=your_random_string \
  -e TORRENT_PROVIDERS=torrentio,ncore,insane \
  -e NCORE_USER=your_ncore_username \
  -e NCORE_PASS=your_ncore_password \
  -e INSANE_USER=your_insane_username \
  -e INSANE_PASS=your_insane_password \
  -p 3000:3000 \
  -p 443:443 \
  -v torrent_stream_caddy:/caddy \
  torrentstream/torrent-stream:latest
```

## How to install the addon

[Permalink: How to install the addon](https://github.com/torrentstream/torrent-stream#how-to-install-the-addon)

Stremio requires addons to be served over HTTPS. There are multiple ways to deal with this.

### Let Torrent Stream bypass the check

[Permalink: Let Torrent Stream bypass the check](https://github.com/torrentstream/torrent-stream#let-torrent-stream-bypass-the-check)

Using some client side API calls, Torrent Stream can get around Stremio's HTTPS requirement.

1. Run the app
2. Open your browser at [http://localhost:3000](http://localhost:3000/) or [http://192.168.1.10:3000](http://192.168.1.10:3000/) (replace LAN IP and port number according to your setup, obviously localhost will only work when the addon and Stremio client is running on the same host)
3. Click the Install Stremio Addon button, the app will detect that it is being served over plain HTTP and a dialog will pop up
4. Enter your credentials and press install, the addon will add itself to your Stremio account

### Use Caddy to resolve certificates

[Permalink: Use Caddy to resolve certificates](https://github.com/torrentstream/torrent-stream#use-caddy-to-resolve-certificates)

Caddy and it's DuckDNS plugin is bundled with the docker container and it can automatically serve the addon over HTTPS.

1. Create a DuckDNS account: [https://www.duckdns.org](https://www.duckdns.org/)
2. Create a subdomain in the DuckDNS dashboard and point it to your server's lan IP (you'll also need to disable DNS rebinding protection in your router settings if it was enabled)
3. Set these environment variables for the application:

- DUCKDNS\_TOKEN: your DuckDNS token
- DOMAIN\_NAME: your-subdomain.duckdns.org

4. Run the app, Caddy will request and renew TLS certificates automatically
5. Open your browser at [https://your-subdomain.duckdns.org](https://your-subdomain.duckdns.org/) (wait until Caddy resolves the certificate if the page doesn't load at first)
6. Click the Install Stremio Addon button or right click it and copy link, then use the manifest URL to install it into Stremio

### Bring your own domain and/or reverse proxy

[Permalink: Bring your own domain and/or reverse proxy](https://github.com/torrentstream/torrent-stream#bring-your-own-domain-andor-reverse-proxy)

If you already have your own domain and a reverse proxy setup, or any other way to provision TLS certificates, you can use it to serve the addon over HTTPS.

1. Run the app
2. Set up your infrastructure so the addon is accessible at an HTTPS address, then open it in your browser.
3. Click the Install Stremio Addon button or right click it and copy link, then use the manifest URL to install it into Stremio

## Environment Variables

[Permalink: Environment Variables](https://github.com/torrentstream/torrent-stream#environment-variables)

The following env vars can be used to configure the application:

| Variable | Description | Example |
| --- | --- | --- |
| PORT | The webserver's HTTP listen port. | 3000 |
| LOG\_LEVEL | Desired log level. Possible values: `fatal`, `error`, `warn`, `info`, `debug`, `trace`, `silent`. | info |
| DOMAIN\_NAME | DuckDNS domain (FQDN) for Caddy TLS. | - |
| DUCKDNS\_TOKEN | DuckDNS token for DNS-01 TLS. | - |
| ENCRYPTION\_KEY | Key used for encrypting stream URLs in case they contain sensitive information. Use a long random string. | - |
| TORRENT\_STORAGE\_MODE | Desired torrent storage location. Possible values: `memory`, `file`. | memory |
| TORRENT\_STORAGE\_PATH | Desired torrent storage directory path. Only applies if storage mode is `file`. | /data |
| STREAM\_MEMORY\_LIMIT | Stream memory budget in bytes. Increase or decrease depending on available RAM and how many parallel streams you need. Only applies if storage mode is `memory`. | 134217728 |
| TORRENT\_DOWNLOAD\_LIMIT | Global download speed limit in bytes/sec. Use `-1` to disable throttling. | -1 |
| TORRENT\_UPLOAD\_LIMIT | Global upload speed limit in bytes/sec. Use `-1` to disable throttling. | -1 |
| TORRENT\_ADD\_TIMEOUT | Cancel adding torrent to the torrent client if no data is received in this many milliseconds. | 5000 |
| TORRENT\_IDLE\_TIMEOUT | Consider a torrent idle after no streams pulled any data in this many milliseconds. | 60000 |
| TORRENT\_REMOVE\_TIMEOUT | Remove idle torrents from the torrent client after this many milliseconds. | 300000 |
| WEB\_REQUEST\_TIMEOUT | Cancel any web requests (like fetching torrent lists) after this many milliseconds. | 5000 |
| TORRENT\_PROVIDERS | Comma separated list of enabled torrent providers. Possible values: `ncore`, `insane`, `yts`, `eztv`, `rarbg`, `1337x`, `thepiratebay`, `kickasstorrents`, `torrentgalaxy`, `magnetdl`, `horriblesubs`, `nyaasi`, `tokyotosho`, `anidex`, `rutor`, `rutracker`, `comando`, `bludv`, `micoleaodublado`, `torrent9`, `ilcorsaronero`, `mejortorrent`, `wolfmax4k`, `cinecalidad`, `besttorrents`, `torrentio` (all Torrentio providers in one). | torrentio,ncore,insane |
| TORRENT\_FORMATS | Comma separated list of enabled torrent formats. If a torrent matches any non-enabled format it will be excluded from the results. Possible values: `4k`, `1080p`, `720p`, `dv`, `hdr`, `uhdbluray`, `bluray`, `remux`, `web`, `dvd`, `hdtv`, `sdtv`, `screener`, `cam`, `3d`, `unknown`, `av1`, `hevc`, `avc`, `divx`, `xvid` | 1080p,720p,bluray,web,hevc,avc |
| TORRENT\_LANGUAGES | Comma separated list of enabled torrent languages (use 2 letter ISO country codes). If a torrent has different primary language it will be excluded from the results. | en,hu |
| NCORE\_USER | Your nCore username (if the provider is enabled). | - |
| NCORE\_PASS | Your nCore password (if the provider is enabled). | - |
| INSANE\_USER | Your iNSANE username (if the provider is enabled). | - |
| INSANE\_PASS | Your iNSANE password. (if the provider is enabled). | - |

## About

Self-hosted Stremio addon for torrent streaming, with optional in-memory storage, and automatic TLS.


### Resources

[Readme](https://github.com/torrentstream/torrent-stream#readme-ov-file)

### Uh oh!

There was an error while loading. [Please reload this page](https://github.com/torrentstream/torrent-stream).

[Activity](https://github.com/torrentstream/torrent-stream/activity)

[Custom properties](https://github.com/torrentstream/torrent-stream/custom-properties)

### Stars

[**0**\\
stars](https://github.com/torrentstream/torrent-stream/stargazers)

### Watchers

[**0**\\
watching](https://github.com/torrentstream/torrent-stream/watchers)

### Forks

[**1**\\
fork](https://github.com/torrentstream/torrent-stream/forks)

[Report repository](https://github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Ftorrentstream%2Ftorrent-stream&report=torrentstream+%28user%29)

## [Contributors\  1](https://github.com/torrentstream/torrent-stream/graphs/contributors)

- [![@nyakaspeter](https://avatars.githubusercontent.com/u/43880678?s=64&v=4)](https://github.com/nyakaspeter)[**nyakaspeter** Péter Nyakas](https://github.com/nyakaspeter)

## Languages

- [TypeScript94.9%](https://github.com/torrentstream/torrent-stream/search?l=typescript)
- [CSS3.2%](https://github.com/torrentstream/torrent-stream/search?l=css)
- [Dockerfile1.6%](https://github.com/torrentstream/torrent-stream/search?l=dockerfile)
- Other0.3%

You can’t perform that action at this time.