Skip to content

Commit 9dac454

Browse files
committed
add steps about sig_helper and potoken + depreciate gluetun guide
1 parent 37de03e commit 9dac454

File tree

3 files changed

+139
-65
lines changed

3 files changed

+139
-65
lines changed

docs/index.md

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

docs/installation.md

+139-63
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Running Invidious requires at least 20GB disk space, 512MB of free RAM (so ~2G i
1212
Compiling Invidious requires at least 2.5GB of free RAM (We recommend to have at least 4GB installed).
1313
If you have less (e.g on a cheap VPS) you can setup a SWAP file or partition, so the combined amount is >= 4GB.
1414

15+
You need at least 1GB of RAM for the machine that will run the tool `youtube-trusted-session-generator` in the 1st step. Doesn't need to be the same machine as the one running Invidious, just a machine running on the same public IP address.
16+
1517
## Docker
1618

1719
**The Invidious docker image is only [available on Quay](https://quay.io/repository/invidious/invidious) because, unlike Docker Hub, [Quay is Free and Open Source Software](https://github.com/quay/quay/blob/master/LICENSE). This is reflected in the `docker-compose.yml` file used in this walk-through.**
@@ -24,71 +26,105 @@ Ensure [Docker Engine](https://docs.docker.com/engine/install) and [Docker Compo
2426

2527
Note: Currently the repository has to be cloned, this is because the `init-invidious-db.sh` file and the `config/sql` directory have to be mounted to the postgres container (See the volumes section in the docker-compose file below). This "problem" will be solved in the future.
2628

27-
```bash
28-
git clone https://github.com/iv-org/invidious.git
29-
cd invidious
30-
```
29+
??? warning "About po_token and visitor_data identities"
30+
31+
po_token known as Proof of Origin Token. This is an attestation token generated by a complex bot verification system created by Google named BotGuard/DroidGuard. It is used to confirm that the request is coming from a genuine device.
32+
33+
These identity tokens (po_token and visitor_data) generated in this tutorial will make your entire Invidious session more easily traceable by YouTube because it is tied to a unique identifier.
34+
35+
There is currently no official automatic tool to periodically change these tokens. This is working in progress but, for the time being, this is the solution the Invidious team is offering.
36+
37+
If you want to be less traceable, you can always script the process by changing the identities every X hour.
38+
39+
40+
1. Generate po_token and visitor_data identities for passing all verification checks on YouTube side:
41+
```
42+
docker run quay.io/invidious/youtube-trusted-session-generator
43+
```
44+
You have to run this command on the same public IP address as the Invidious server. Not necessarily the same machine, just the same public IP address.
45+
You will need to copy these two parameters in the third step.
46+
47+
2. Execute these commands:
48+
```bash
49+
git clone https://github.com/iv-org/invidious.git
50+
cd invidious
51+
```
52+
53+
3. Edit the docker-compose.yml with this content:
54+
55+
```docker
56+
version: "3"
57+
services:
58+
59+
invidious:
60+
image: quay.io/invidious/invidious:latest
61+
# image: quay.io/invidious/invidious:latest-arm64 # ARM64/AArch64 devices
62+
restart: unless-stopped
63+
ports:
64+
- "127.0.0.1:3000:3000"
65+
environment:
66+
# Please read the following file for a comprehensive list of all available
67+
# configuration options and their associated syntax:
68+
# https://github.com/iv-org/invidious/blob/master/config/config.example.yml
69+
INVIDIOUS_CONFIG: |
70+
db:
71+
dbname: invidious
72+
user: kemal
73+
password: kemal
74+
host: invidious-db
75+
port: 5432
76+
check_tables: true
77+
signature_server: inv_sig_helper:12999
78+
po_token: CHANGE_ME
79+
visitor_data: CHANGE_ME
80+
# external_port:
81+
# domain:
82+
# https_only: false
83+
# statistics_enabled: false
84+
hmac_key: "CHANGE_ME!!"
85+
healthcheck:
86+
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1
87+
interval: 30s
88+
timeout: 5s
89+
retries: 2
90+
logging:
91+
options:
92+
max-size: "1G"
93+
max-file: "4"
94+
depends_on:
95+
- invidious-db
96+
97+
inv_sig_helper:
98+
image: quay.io/invidious/inv-sig-helper:latest
99+
command: ["--tcp", "0.0.0.0:12999"]
100+
environment:
101+
- RUST_LOG=info
102+
restart: unless-stopped
103+
cap_drop:
104+
- ALL
105+
read_only: true
106+
security_opt:
107+
- no-new-privileges:true
108+
109+
invidious-db:
110+
image: docker.io/library/postgres:14
111+
restart: unless-stopped
112+
volumes:
113+
- postgresdata:/var/lib/postgresql/data
114+
- ./config/sql:/config/sql
115+
- ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh
116+
environment:
117+
POSTGRES_DB: invidious
118+
POSTGRES_USER: kemal
119+
POSTGRES_PASSWORD: kemal
120+
healthcheck:
121+
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
31122
32-
Edit the docker-compose.yml with this content:
33-
34-
```docker
35-
version: "3"
36-
services:
37-
38-
invidious:
39-
image: quay.io/invidious/invidious:latest
40-
# image: quay.io/invidious/invidious:latest-arm64 # ARM64/AArch64 devices
41-
restart: unless-stopped
42-
ports:
43-
- "127.0.0.1:3000:3000"
44-
environment:
45-
# Please read the following file for a comprehensive list of all available
46-
# configuration options and their associated syntax:
47-
# https://github.com/iv-org/invidious/blob/master/config/config.example.yml
48-
INVIDIOUS_CONFIG: |
49-
db:
50-
dbname: invidious
51-
user: kemal
52-
password: kemal
53-
host: invidious-db
54-
port: 5432
55-
check_tables: true
56-
# external_port:
57-
# domain:
58-
# https_only: false
59-
# statistics_enabled: false
60-
hmac_key: "CHANGE_ME!!"
61-
healthcheck:
62-
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1
63-
interval: 30s
64-
timeout: 5s
65-
retries: 2
66-
logging:
67-
options:
68-
max-size: "1G"
69-
max-file: "4"
70-
depends_on:
71-
- invidious-db
72-
73-
invidious-db:
74-
image: docker.io/library/postgres:14
75-
restart: unless-stopped
76123
volumes:
77-
- postgresdata:/var/lib/postgresql/data
78-
- ./config/sql:/config/sql
79-
- ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh
80-
environment:
81-
POSTGRES_DB: invidious
82-
POSTGRES_USER: kemal
83-
POSTGRES_PASSWORD: kemal
84-
healthcheck:
85-
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
86-
87-
volumes:
88-
postgresdata:
89-
```
124+
postgresdata:
125+
```
90126
91-
Note: This compose is made for a true "production" setup, where Invidious is behind a reverse proxy. If you prefer to directly access Invidious, replace `127.0.0.1:3000:3000` with `3000:3000` under the `ports:` section.
127+
Note: This compose is made for a true "production" setup, where Invidious is behind a reverse proxy. If you prefer to directly access Invidious, replace `127.0.0.1:3000:3000` with `3000:3000` under the `ports:` section.
92128
93129
94130
### Docker-compose method (development)
@@ -106,6 +142,22 @@ docker-compose up
106142

107143
### Linux
108144

145+
#### Generate po_token and visitor_data identities
146+
147+
[Follow these instructions here on the official tool `youtube-trusted-session-generator`](https://github.com/iv-org/youtube-trusted-session-generator?tab=readme-ov-file#tutorial-without-docker)
148+
149+
These two parameters will be required for passing all verification checks on YouTube side and you will have to configure them in Invidious. You have to run this command on the same public IP address as the Invidious server. Not necessarily the same machine, just the same public IP address.
150+
151+
??? warning "About po_token and visitor_data identities"
152+
153+
po_token known as Proof of Origin Token. This is an attestation token generated by a complex bot verification system created by Google named BotGuard/DroidGuard. It is used to confirm that the request is coming from a genuine device.
154+
155+
These identity tokens (po_token and visitor_data) generated in this tutorial will make your entire Invidious session more easily traceable by YouTube because it is tied to a unique identifier.
156+
157+
There is currently no official automatic tool to periodically change these tokens. This is working in progress but, for the time being, this is the solution the Invidious team is offering.
158+
159+
If you want to be less traceable, you can always script the process by changing the identities every X hour.
160+
109161
#### Install Crystal
110162

111163
Follow the instructions for your distribution here: https://crystal-lang.org/install/
@@ -158,6 +210,10 @@ make
158210
# Configure config/config.yml as you like
159211
cp config/config.example.yml config/config.yml
160212

213+
# edit config.yaml to include po_token and visitor_data previously generated
214+
215+
edit config/config.yaml
216+
161217
# Deploy the database
162218
./invidious --migrate
163219

@@ -173,6 +229,22 @@ systemctl enable --now invidious.service
173229

174230
### MacOS
175231

232+
#### Generate po_token and visitor_data identities
233+
234+
[Follow these instructions here on the official tool `youtube-trusted-session-generator`](https://github.com/iv-org/youtube-trusted-session-generator?tab=readme-ov-file#tutorial-without-docker)
235+
236+
These two parameters will be required for passing all verification checks on YouTube side and you will have to configure them in Invidious. You have to run this command on the same public IP address as the Invidious server. Not necessarily the same machine, just the same public IP address.
237+
238+
??? warning "About po_token and visitor_data identities"
239+
240+
po_token known as Proof of Origin Token. This is an attestation token generated by a complex bot verification system created by Google named BotGuard/DroidGuard. It is used to confirm that the request is coming from a genuine device.
241+
242+
These identity tokens (po_token and visitor_data) generated in this tutorial will make your entire Invidious session more easily traceable by YouTube because it is tied to a unique identifier.
243+
244+
There is currently no official automatic tool to periodically change these tokens. This is working in progress but, for the time being, this is the solution the Invidious team is offering.
245+
246+
If you want to be less traceable, you can always script the process by changing the identities every X hour.
247+
176248
#### Install the dependencies
177249

178250
```bash
@@ -211,7 +283,11 @@ psql invidious kemal < config/sql/playlist_videos.sql
211283
make
212284

213285
# Configure config/config.yml as you like
214-
cp config/config.example.yml config/config.yml
286+
cp config/config.example.yml config/config.yml
287+
288+
# edit config.yaml to include po_token and visitor_data previously generated
289+
290+
edit config/config.yaml
215291
```
216292

217293
### Windows

mkdocs.yml

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ nav:
2727
- 'nginx.md'
2828
- 'caddy.md'
2929
- 'apache2.md'
30-
- 'gluetun.md'
3130
- 'db-maintenance.md'
3231
- 'captcha-bug.md'
3332
- 'register-user.md'

0 commit comments

Comments
 (0)