Skip to content

Commit

Permalink
WIP: External access
Browse files Browse the repository at this point in the history
  • Loading branch information
purple-emily committed Mar 10, 2024
1 parent 3b68a8e commit 31368d0
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 11 deletions.
45 changes: 40 additions & 5 deletions docs/Writerside/topics/External-access.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,44 @@
# External access

This guide outlines how to use Knight Crawler on devices like your TV. While it's currently limited to the device of
installation, we can change that. With some extra effort, we'll show you how to make it accessible on other devices.
This limitation is set by Stremio, as [explained here](https://github.com/Stremio/stremio-features/issues/687#issuecomment-1890546094).

## What to keep in mind

In its initial state Knight Crawler will only work on the machine that you host it on, and will not be accessible on
your local network or from the internet. This is a Stremio
limitation ([read Stremio's stance here](https://github.com/Stremio/stremio-features/issues/687)) and is beyond our
control. We provide a guide
how to make Knight Crawler accessible from your local network or the internet [here]().
Before we make Knight Crawler available outside your home network, we've got to talk about safety. No software is
perfect, including ours. Knight Crawler is built on lots of different parts, some made by other people. So, if we keep
it just for your home network, it's a bit safer. But if you want to use it over the internet, just know that keeping
your devices secure is up to you. We won't be responsible for any problems or lost data if you use Knight Crawler that way.

## Initial setup

To enable external access for Knight Crawler, whether it's within your home network or over the internet, you'll
need to follow these initial setup steps:

- Set up Caddy, a powerful and easy-to-use web server.
1. Caddy is included in the <path>deployment/docker/optional</path>
2.

- Disable the open port in the Knight Crawler <path>docker-compose.yaml<path> file.
1. Open the Knight Crawler <path>docker-compose.yaml<path> file in your favourite editor.
2. Disable the default port configuration. This step is crucial for routing external traffic through Caddy and ensuring secure access to Knight Crawler. Simply comment out or remove the port configuration section within the Docker-Compose file.

yaml

# ports:
# - "8080:8080"

By disabling the default port, Knight Crawler will only be accessible internally within your network, ensuring added security.

## Home network access

## Internet access

### Through a VPN

### On the public web

## Troubleshooting?

## Additional Resources?
25 changes: 19 additions & 6 deletions docs/Writerside/topics/Getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ A basic installation requires only two files:
- <path>deployment/docker/.env.example</path>
- <path>deployment/docker/docker-compose.yaml</path>.


> Knight Crawler will only be accessible on the machine you run it on, to make it accessible from other machines navigate to [External access](External-access.md).
>
{style="note"}

For this guide I will be placing them in a directory on my home drive <path>~/knightcrawler</path>.

Rename the <path>.env.example</path> file to be <path>.env</path>
Expand Down Expand Up @@ -114,7 +109,9 @@ then try increasing it by 10 at a time.
{style="warning"}

`CONSUMER_REPLICAS` is how many consumers should be initially started. This is best kept below 10 as GitHub rate limit
how fast we can access a list of torrent trackers. You can increase or decrease the number of consumers whilst the service is running by running the command `docker compose up --scale consumer=<number>`. This value is best increased by 5 at a time. Repeat this process until you have reached the desired level of consumers.
how fast we can access a list of torrent trackers. You can increase or decrease the number of consumers whilst the
service is running by running the command `docker compose up -d --scale consumer=<number>`. This value is best increased by 5 at a time.
Repeat this process until you have reached the desired level of consumers.

### GitHub personal access token

Expand Down Expand Up @@ -168,10 +165,26 @@ Then we can follow the logs to watch it start:
docker compose logs -f --since 1m
```

> Knight Crawler will only be accessible on the machine you run it on, to make it accessible from other machines navigate to [External access](External-access.md).
>
{style="note"}

To stop following the logs press <shortcut>Ctrl+C</shortcut> at any time.

The Knight Crawler configuration page should now be accessible in your web browser at [http://localhost:7000](http://localhost:7000)

## Start more consumers

If you wish to speed up the processing of the films and tv shows that Knight Crawler finds, then you'll likely want to
increase the number of consumers.
The below command can be used to both increase or decrease the number of running consumers. Gradually increase the number
until you encounter any issues and then decrease until stable.
```Bash
docker compose up -d --scale consumer=<number>
```
## Stop Knight Crawler
Knight Crawler can be stopped with the following command:
Expand Down

0 comments on commit 31368d0

Please sign in to comment.