mirror of
https://github.com/iv-org/documentation.git
synced 2025-11-23 17:13:17 -05:00
doc: improve again
This commit is contained in:
parent
ab617553f1
commit
e82b6ee10b
6 changed files with 52 additions and 35 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# Apache2 reverse proxy setup with Invidious companion
|
||||
# Apache2 reverse proxy setup with Invidious companion direct traffic
|
||||
|
||||
- A very basic config, secured with Let's Encrypt. Any log is disabled by default. Do not forget to replace `ServerName` with your domain.
|
||||
|
||||
|
|
@ -12,12 +12,8 @@
|
|||
ProxyRequests off
|
||||
ProxyPass / http://127.0.0.1:3000/ nocanon
|
||||
ProxyPassReverse / http://127.0.0.1:3000/
|
||||
ProxyPass /latest_version http://127.0.0.1:8282/ nocanon
|
||||
ProxyPassReverse /latest_version http://127.0.0.1:8282/
|
||||
ProxyPass /api/manifest/dash/id/ http://127.0.0.1:8282/ nocanon
|
||||
ProxyPassReverse /api/manifest/dash/id/ http://127.0.0.1:8282/
|
||||
ProxyPass /videoplayback http://127.0.0.1:8282/ nocanon
|
||||
ProxyPassReverse /videoplayback http://127.0.0.1:8282/
|
||||
ProxyPass /companion http://127.0.0.1:8282 nocanon
|
||||
ProxyPassReverse /companion http://127.0.0.1:8282
|
||||
|
||||
AllowEncodedSlashes on
|
||||
|
||||
|
|
@ -62,14 +58,9 @@ To make the VirtualHost config below actually work, you should as well:
|
|||
|
||||
ProxyPass / http://127.0.0.1:3000/ nocanon
|
||||
ProxyPassReverse / http://127.0.0.1:3000/
|
||||
ProxyPass /latest_version http://127.0.0.1:8282/ nocanon
|
||||
ProxyPassReverse /latest_version http://127.0.0.1:8282/
|
||||
ProxyPass /api/manifest/dash/id/ http://127.0.0.1:8282/ nocanon
|
||||
ProxyPassReverse /api/manifest/dash/id/ http://127.0.0.1:8282/
|
||||
ProxyPass /api/v1/captions/ http://127.0.0.1:8282/ nocanon
|
||||
ProxyPassReverse /api/v1/captions/ http://127.0.0.1:8282/
|
||||
ProxyPass /videoplayback http://127.0.0.1:8282/ nocanon
|
||||
ProxyPassReverse /videoplayback http://127.0.0.1:8282/
|
||||
# ONLY WHEN public_url uncommented (not default)! Invidious companion service
|
||||
#ProxyPass /companion http://127.0.0.1:8282/ nocanon
|
||||
#ProxyPassReverse /companion http://127.0.0.1:8282/
|
||||
ProxyPreserveHost On
|
||||
ProxyRequests Off
|
||||
AllowEncodedSlashes On
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Caddy reverse proxy setup with Invidious companion
|
||||
# Caddy reverse proxy setup with Invidious companion direct traffic
|
||||
|
||||
This is a very basic config, assuming that you're using Caddy to manage SSL certificates for you.
|
||||
Any log is disabled by default. Do not forget to replace `server_name` with your domain.
|
||||
|
|
@ -6,14 +6,7 @@ Any log is disabled by default. Do not forget to replace `server_name` with your
|
|||
```
|
||||
https://<server_name> {
|
||||
|
||||
@companion {
|
||||
path /latest_version
|
||||
path /api/manifest/dash/id/*
|
||||
path /videoplayback*
|
||||
/api/v1/captions/*
|
||||
}
|
||||
|
||||
reverse_proxy @companion localhost:8282
|
||||
reverse_proxy /companion localhost:8282
|
||||
reverse_proxy localhost:3000
|
||||
|
||||
log {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# NGINX reverse proxy setup with Invidious companion
|
||||
# NGINX reverse proxy setup with Invidious companion direct traffic
|
||||
|
||||
This is a very basic config, secured with Let's Encrypt. Any log is disabled by default. Do not forget to replace `server_name` with your domain.
|
||||
|
||||
|
|
@ -32,8 +32,8 @@ server {
|
|||
proxy_pass http://127.0.0.1:3000;
|
||||
}
|
||||
|
||||
# Invidious companion service (multiple paths, same backend)
|
||||
location ~ ^/(latest_version|videoplayback|api/v1/captions|api/manifest/dash/id)/ {
|
||||
# Invidious companion service
|
||||
location /companion {
|
||||
proxy_pass http://127.0.0.1:8282;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Traefik reverse proxy setup with Invidious companion
|
||||
# Traefik reverse proxy setup with Invidious companion direct traffic
|
||||
|
||||
This is a very basic config, assuming that you're using Traefik to manage SSL certificates for you, and Traefik is on the same server as the Invidious and companion container.
|
||||
Do not forget to replace `<server_name>` with your domain.
|
||||
|
|
@ -8,7 +8,7 @@ Do not forget to replace `<server_name>` with your domain.
|
|||
...
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.invidious.rule=Host(`<server_name>`) && !(Path(`/latest_version`) || PathPrefix(`/api/manifest/dash/id/`) || PathPrefix(`/api/v1/captions/`) || PathPrefix(`/videoplayback`))"
|
||||
- "traefik.http.routers.invidious.rule=Host(`<server_name>`) && !(Path(`/companion`))"
|
||||
- "traefik.http.routers.invidious.entrypoints=web-sec"
|
||||
- "traefik.http.routers.invidious.tls.certresolver=le"
|
||||
- "traefik.http.services.invidious.loadbalancer.server.port=3000"
|
||||
|
|
@ -19,7 +19,7 @@ Do not forget to replace `<server_name>` with your domain.
|
|||
...
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.invidious-companion.rule=Host(`<server_name>`) && (Path(`/latest_version`) || PathPrefix(`/api/manifest/dash/id/`) || PathPrefix(`/api/v1/captions/`) || PathPrefix(`/videoplayback`))"
|
||||
- "traefik.http.routers.invidious-companion.rule=Host(`<server_name>`) && (Path(`/companion`))"
|
||||
- "traefik.http.routers.invidious-companion.entrypoints=web-sec"
|
||||
- "traefik.http.routers.invidious-companion.tls.certresolver=le"
|
||||
- "traefik.http.services.invidious-companion.loadbalancer.server.port=8282"
|
||||
|
|
|
|||
|
|
@ -275,13 +275,13 @@ Take a look at the community installation guide: [here](./community-installation
|
|||
|
||||
## Post-install configuration:
|
||||
|
||||
### Highly recommended
|
||||
|
||||
Detailed configuration available in the [configuration guide](./configuration.md).
|
||||
|
||||
You must set a random generated value for the parameter `hmac_key:`! On Linux you can generate it using the command `pwgen 20 1`.
|
||||
|
||||
Because of various issues, Invidious **must** be restarted often, at least once a day, ideally every hour.
|
||||
|
||||
If you use a reverse proxy, you **must** configure Invidious to properly serve request through it:
|
||||
1. You must set a random generated value for the parameter `hmac_key:`! On Linux you can generate it using the command `pwgen 20 1`.
|
||||
2. Because of various issues, Invidious **must** be restarted often, at least once a day, ideally every hour.
|
||||
3. If you use a reverse proxy, you **must** configure Invidious to properly serve request through it:
|
||||
|
||||
`https_only: true` : if you are serving your instance via https, set it to true
|
||||
|
||||
|
|
@ -293,6 +293,24 @@ If you use a reverse proxy, you **must** configure Invidious to properly serve r
|
|||
|
||||
`use_innertube_for_captions: true`: if you are serving a public instance or you are hosting Invidious in a datacenter, allow to unblock captions ([detailed explanation](https://github.com/iv-org/invidious/issues/2567#issuecomment-1727928996)).
|
||||
|
||||
### Advanced (improve performance)
|
||||
|
||||
For performance reasons, you may configure Invidious companion to be served directly under your reverse proxy for serving the video streams.
|
||||
|
||||
This will greatly improve your playback when used by multiple users.
|
||||
|
||||
Uncomment `public_url` for the parameter `invidious_companion:` in Invidious config.yaml and configure it like this:
|
||||
|
||||
Configure the `public_url` to be the same as the domain used for Invidious or on a separate domain (if you want) with the path `/companion`.
|
||||
Examples: `https://MYINVIDIOUSDOMAIN/companion` or `https://COMPANION.MYINVIDIOUSDOMAIN/companion`.
|
||||
|
||||
Then configure your reverse proxy:
|
||||
|
||||
- [NGINX](./companion-nginx.md)
|
||||
- [Apache2](./companion-apache2.md)
|
||||
- [Caddy](./companion-caddy.md)
|
||||
- [Traefik](./companion-traefik.md)
|
||||
|
||||
## Update Invidious
|
||||
|
||||
#### Updating a Docker install
|
||||
|
|
|
|||
15
docs/traefik.md
Normal file
15
docs/traefik.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Traefik reverse proxy setup
|
||||
|
||||
This is a very basic config, assuming that you're using Traefik to manage SSL certificates for you, and Traefik is on the same server as the Invidious and companion container.
|
||||
Do not forget to replace `<server_name>` with your domain.
|
||||
|
||||
**Invidious Setup**
|
||||
```
|
||||
...
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.invidious.rule=Host(`<server_name>`)"
|
||||
- "traefik.http.routers.invidious.entrypoints=web-sec"
|
||||
- "traefik.http.routers.invidious.tls.certresolver=le"
|
||||
- "traefik.http.services.invidious.loadbalancer.server.port=3000"
|
||||
...
|
||||
Loading…
Add table
Add a link
Reference in a new issue