Skip to content

Commit 8ab4374

Browse files
authored
Remove step about permissions + simplify docker-compose file
1 parent e4b7a0c commit 8ab4374

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

docs/companion-installation.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ Make sure to run the newer Docker Compose V2: https://docs.docker.com/compose/in
4242
cd invidious
4343
```
4444

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)
4646
```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)
4949
```
5050

5151
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
8181
# Please consult for more doc: https://github.com/unixfox/invidious/blob/invidious-companion/config/config.example.yml#L57-L88
8282
public_url: "http://localhost:8282/"
8383
# 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
8485
invidious_companion_key: "CHANGE_ME!!"
8586
# external_port:
8687
# domain:
8788
# https_only: false
8889
# statistics_enabled: false
90+
# Use the key generated in the 2nd step
8991
hmac_key: "CHANGE_ME!!"
9092
healthcheck:
9193
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
102104
companion:
103105
image: quay.io/invidious/invidious-companion:latest
104106
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
106109
# SET this value IF you are using a reverse proxy OR accessing invidious from an external IP.
107110
# Please consult for more doc: https://github.com/iv-org/invidious-companion/wiki/Environment-variables
108111
# - 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
117120
cap_drop:
118121
- ALL
119122
read_only: true
120-
user: 10001:10001
121123
# cache for youtube library
122124
volumes:
123-
- /var/tmp/youtubei.js:/var/tmp/youtubei.js:rw
125+
- companioncache:/var/tmp/youtubei.js:rw
124126
security_opt:
125127
- no-new-privileges:true
126128

0 commit comments

Comments
 (0)