@@ -42,10 +42,10 @@ Make sure to run the newer Docker Compose V2: https://docs.docker.com/compose/in
42
42
cd invidious
43
43
```
44
44
45
- 2. Assign the correct permissions to Invidious companion for the cache directory:
45
+ 2. Generate two secret keys, one for Invidious (HMAC_KEY) and one for Invidious companion (invidious_companion_key)
46
46
` ` ` bash
47
- mkdir -p /var/tmp/youtubei.js
48
- chown 10001:10001 -R /var/tmp/youtubei.js
47
+ pwgen 16 1 # for Invidious (HMAC_KEY)
48
+ pwgen 16 1 # for Invidious companion (invidious_companion_key)
49
49
` ` `
50
50
51
51
3. Edit the docker-compose.yml with this content:
@@ -81,11 +81,13 @@ Make sure to run the newer Docker Compose V2: https://docs.docker.com/compose/in
81
81
# Please consult for more doc: https://github.com/unixfox/invidious/blob/invidious-companion/config/config.example.yml#L57-L88
82
82
public_url: " http://localhost:8282/"
83
83
# IT is NOT recommended to use the same key as HMAC KEY. Generate a new key!
84
+ # Use the key generated in the 2nd step
84
85
invidious_companion_key: " CHANGE_ME!!"
85
86
# external_port:
86
87
# domain:
87
88
# https_only: false
88
89
# statistics_enabled: false
90
+ # Use the key generated in the 2nd step
89
91
hmac_key: " CHANGE_ME!!"
90
92
healthcheck:
91
93
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1
@@ -102,7 +104,8 @@ Make sure to run the newer Docker Compose V2: https://docs.docker.com/compose/in
102
104
companion:
103
105
image: quay.io/invidious/invidious-companion:latest
104
106
environment:
105
- - SERVER_SECRET_KEY=CHANGE_ME!! SAME_AS_INVIDIOUS_COMPANION_SECRET_KEY_FROM_INVIDIOUS_CONFIG
107
+ # Use the key generated in the 2nd step
108
+ - SERVER_SECRET_KEY=CHANGE_ME!! SAME_AS_INVIDIOUS_COMPANION_SECRET_KEY_FROM_INVIDIOUS_CONFIG
106
109
# SET this value IF you are using a reverse proxy OR accessing invidious from an external IP.
107
110
# Please consult for more doc: https://github.com/iv-org/invidious-companion/wiki/Environment-variables
108
111
# - SERVER_BASE_URL=http://localhost:8282
@@ -117,10 +120,9 @@ Make sure to run the newer Docker Compose V2: https://docs.docker.com/compose/in
117
120
cap_drop:
118
121
- ALL
119
122
read_only: true
120
- user: 10001:10001
121
123
# cache for youtube library
122
124
volumes:
123
- - /var/tmp/youtubei.js :/var/tmp/youtubei.js:rw
125
+ - companioncache :/var/tmp/youtubei.js:rw
124
126
security_opt:
125
127
- no-new-privileges:true
126
128
0 commit comments