Knightcrawler
A selfhosted Stremio addon
Install / Use
/learn @knightcrawler-stremio/KnightcrawlerREADME
Contents
[!IMPORTANT] The latest change renames the project and requires a small migration.
- Contents
- Overview
- Using
- Importing external dumps
- Selfhostio to KnightCrawler Migration
- To-do
Overview
Stremio is a media player. On it's own it will not allow you to watch anything. This addon at it's core does the following:
- It will search the internet and collect information about movies and tv show torrents, then store it in a database.
- It will then allow you to click on the movie or tv show you desire in Stremio and play it with no further effort.
Using
The project is shipped as an all-in-one solution. The initial configuration is designed for hosting only on your local network. If you want it to be accessible from outside of your local network, please see Configure external access.
Download Docker and Docker Compose v2
Download and install Docker Compose, bundled with Docker Desktop or, if using Linux, you can install Docker Engine and the Docker Compose Plugin.
Environment Setup
Before running the project, you need to set up the environment variables. Edit the values in stack.env:
cd deployment/docker
code stack.env
Then set any of the values you wouldd like to customize.
Optional Configuration Changes
[!WARNING] These values should be tested and tuned for your specific machine.
By default, Knight Crawler is configured to be relatively conservative in its resource usage. If running on a decent machine (16GB RAM, i5+ or equivalent), you can increase some settings to increase consumer throughput. This is especially helpful if you have a large backlog from importing databases.
Configure external access
Please choose which applies to you:
- I have a public IP address and can open ports
- I will be using a tunnel/vpn (CGNAT, don't want to open ports, etc...)
I have a public IP address and can open ports
You can use either a paid domain your-domain.com or a free reverse dns service like DuckDNS (you can automate the update of your IP address).
Before continuing you need to open up port 80 and 443 in your firewall and configure any port forwarding as necessary. You should not do this unless you understand the security implications. Please note that Knightcrawler and its contributors cannot be held responsible for any damage or loss of data from exposing your service publicly.
You may find it safer to use a tunnel/vpn, but this will require the use of a paid domain or will not be accessible without being connected to your vpn.
I will be using a tunnel/vpn (CGNAT, don't want to open ports, etc...)
For this you can use a VPN like Tailscale which has its own ways of issuing SSL certs, or you can use a tunnel like Cloudflare.
To use a Cloudflare tunnel you will need a domain name.
There's a sample compose for a Cloudflare tunnel here.
If you are going to go this route, you will want to connect caddy to the cloudflare-tunnel network. It's all in Caddy's docker-compose.yaml you will just need to uncomment it.
Next steps
Regardless of what method you choose, you will need to connect Knight Crawler to Caddy. We only need to expose the addon, the rest of the services can remain internal.
In our primary docker-compose.yaml we will add the Caddy network:
networks:
knightcrawler-network:
driver: bridge
name: knightcrawler-network
caddy:
name: caddy
external: true
Remove or comment out the port for the addon, and connect it to Caddy:
addon:
<<: *knightcrawler-app
env_file:
- stack.env
hostname: knightcrawler-addon
image: gabisonfire/knightcrawler-addon:latest
labels:
logging: "promtail"
networks:
- knightcrawler-network
- caddy # <~~~~~~~ These lines
# ports: # <~~~~~~~ have been
# - "7000:7000" # <~~~~~~~ changed
If you are using a Cloudflare tunnel, start it before Caddy.
Caddy can be started with:
cd deployment/docker/optional_reverse_proxy
docker compose up -d
It should be started before Knight Crawler.
Run the project
To start the project use the following commands:
cd deployment/docker
docker compose up -d
It will take a while to find and add the torrents to the database. During initial testing, in one hour it's estimated that around 200,000 torrents were located and added to the queue to be processed. The processing takes longer, unfortunately and you may not find the movie/show you want for a while. For best results, you should leave everything running for a few hours.
To add the addon to Stremio, open a web browser and navigate to: http://127.0.0.1:7000 or knightcrawler.your-domain.com if you are using Caddy.
Monitoring with Grafana and Prometheus (Optional)
To enhance your monitoring capabilities, you can use Grafana and Prometheus in addition to RabbitMQ's built-in management interface. This allows you to visualize and analyze RabbitMQ metrics with more flexibility. With postgres-exporter service, you can also monitor Postgres metrics.
Accessing RabbitMQ Management
You can still monitor RabbitMQ by accessing its management interface at http://127.0.0.1:15672/. Use the provided credentials to log in and explore RabbitMQ's monitoring features (the default username and password are guest).
Using Grafana and Prometheus
Here's how to set up and use Grafana and Prometheus for monitoring RabbitMQ:
-
Start Grafana and Prometheus: Run the following command to start both Grafana and Prometheus:
cd deployment/docker/optional_metrics docker compose up -d-
Grafana will be available at http://127.0.0.1:3000.
-
Prometheus will be available at http://127.0.0.1:9090.
-
The default admin user for Grafana is
admin, and the password isadmin_password.
-
-
Import Grafana Dashboard: Import the RabbitMQ monitoring dashboard into Grafana:
-
You can use the following dashboard from Grafana's official library: RabbitMQ Overview Dashboard.
-
You can also use the following dashboard PostgreSQL Database to monitor Postgres metrics.
The Prometheus data source is already configured in Grafana, you just have to select it when importing the dashboard.
-
Now, you can use these dashboards to monitor RabbitMQ and Postgres metrics.
[!NOTE] If you encounter issues with missing or unavailable data in Grafana, please ensure on Prometheus's target page that the RabbitMQ target is up and running.
Importing external dumps
If you stumble upon some data, perhaps a database dump from rarbg, which is almost certainly not available on Real Debrid, and wished to utilise it, you might be interested in the following:
Importing data into PostgreSQL
Using pgloader we can import other databases into Knight Crawler.
For example, if you possessed a sqlite database named rarbg_db.sqlite it's possible to then import this.
Using pgloader via docker
Make sure the file rarbg_db.sqlite is on the same server as Postgre
Related Skills
node-connect
350.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
