Release a tutorial to make Invidious requests data from YouTube through a VPN using Gluetun (#575)

This commit is contained in:
TheFrenchGhosty 2024-07-19 16:40:52 +02:00 committed by GitHub
parent 6ac97ad0db
commit 37de03eee9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 91 additions and 0 deletions

89
docs/gluetun.md Normal file
View File

@ -0,0 +1,89 @@
# Make Invidious requests data from YouTube through a VPN using Gluetun (in case your IP is blocked)
## Create the docker network (must be done outside of the compose file):
```
docker network create --subnet=172.80.0.0/16 gluetun_network
```
Note: We're not using the Gluetun default of 172.18.0.0/16, because it might already be used which causes Gluetun to not start with the error `Error response from daemon: invalid pool request: Pool overlaps with other one on this address space`, if you have this issue with 172.80.0.0/16 just use a number higher than "80" (at the second byte) and apply the rest of the documentation accordingly
## Create the compose file for Gluetun
- Global setup: https://github.com/qdm12/gluetun-wiki/tree/main/setup
- Provider setup: https://github.com/qdm12/gluetun-wiki/tree/main/setup/providers
```
services:
gluetun:
image: ghcr.io/qdm12/gluetun
container_name: gluetun
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
ports:
# - 8888:8888/tcp # HTTP proxy # Useless
# - 8388:8388/tcp # Shadowsocks # Useless
# - 8388:8388/udp # Shadowsocks # Useless
- "127.0.0.1:3000:3000" # Invidious (use the Invidious ports configuration)
volumes:
- /docker/gluetun/data:/gluetun
environment:
- VPN_SERVICE_PROVIDER=<REDACTED>
- VPN_TYPE=openvpn # Use openvpn or wireguard
- OPENVPN_USER=<REDACTED>
- OPENVPN_PASSWORD=<REDACTED>
- SERVER_COUNTRIES=Germany # Use your server location
- UPDATER_PERIOD=24h
- TZ=Europe/Paris # Use your timezone
networks:
gluetun_network:
networks:
gluetun_network:
external: true
```
## Make Invidious use gluetun
Add this to your DB:
```
networks:
gluetun_network:
ipv4_address: 172.80.0.22
```
Add this to the end of your compose (to make the Invidious-Postgres stack connect to gluetun):
```
networks:
gluetun_network:
external: true
```
Add this to the Invidious container:
```
network_mode: "container:gluetun"
```
Comment out the "- ports:" of the Invidious container (gluetun replaces it, reason why we configured it with the same value)
Update the Invidious config to use the new database address (since the network is "different", using the hostname wont work):
```
INVIDIOUS_CONFIG: |
db:
dbname: invidious
user: kemal
password: <REDACTED>
host: 172.80.0.22
port: 5432
```

View File

@ -22,6 +22,7 @@
- [NGINX reverse proxy setup](./nginx.md) - [NGINX reverse proxy setup](./nginx.md)
- [Caddy reverse proxy setup](./caddy.md) - [Caddy reverse proxy setup](./caddy.md)
- [Apache2 reverse proxy setup](./apache2.md) - [Apache2 reverse proxy setup](./apache2.md)
- [Make Invidious requests data from YouTube through a VPN using Gluetun (in case your IP is blocked)](./gluetun.md)
- [Database maintenance](./db-maintenance.md) - [Database maintenance](./db-maintenance.md)
- [CAPTCHA bug on Debian and Ubuntu](./captcha-bug.md) - [CAPTCHA bug on Debian and Ubuntu](./captcha-bug.md)
- [Registering users manually](./register-user.md) - [Registering users manually](./register-user.md)

View File

@ -27,6 +27,7 @@ nav:
- 'nginx.md' - 'nginx.md'
- 'caddy.md' - 'caddy.md'
- 'apache2.md' - 'apache2.md'
- 'gluetun.md'
- 'db-maintenance.md' - 'db-maintenance.md'
- 'captcha-bug.md' - 'captcha-bug.md'
- 'register-user.md' - 'register-user.md'