Skip to content

Commit

Permalink
Remove step about permissions + simplify docker-compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
unixfox authored Dec 27, 2024
1 parent e4b7a0c commit 8ab4374
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions docs/companion-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ Make sure to run the newer Docker Compose V2: https://docs.docker.com/compose/in
cd invidious
```

2. Assign the correct permissions to Invidious companion for the cache directory:
2. Generate two secret keys, one for Invidious (HMAC_KEY) and one for Invidious companion (invidious_companion_key)
```bash
mkdir -p /var/tmp/youtubei.js
chown 10001:10001 -R /var/tmp/youtubei.js
pwgen 16 1 # for Invidious (HMAC_KEY)
pwgen 16 1 # for Invidious companion (invidious_companion_key)
```

3. Edit the docker-compose.yml with this content:
Expand Down Expand Up @@ -81,11 +81,13 @@ Make sure to run the newer Docker Compose V2: https://docs.docker.com/compose/in
# Please consult for more doc: https://github.com/unixfox/invidious/blob/invidious-companion/config/config.example.yml#L57-L88
public_url: "http://localhost:8282/"
# IT is NOT recommended to use the same key as HMAC KEY. Generate a new key!
# Use the key generated in the 2nd step
invidious_companion_key: "CHANGE_ME!!"
# external_port:
# domain:
# https_only: false
# statistics_enabled: false
# Use the key generated in the 2nd step
hmac_key: "CHANGE_ME!!"
healthcheck:
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1
Expand All @@ -102,7 +104,8 @@ Make sure to run the newer Docker Compose V2: https://docs.docker.com/compose/in
companion:
image: quay.io/invidious/invidious-companion:latest
environment:
- SERVER_SECRET_KEY=CHANGE_ME!!SAME_AS_INVIDIOUS_COMPANION_SECRET_KEY_FROM_INVIDIOUS_CONFIG
# Use the key generated in the 2nd step
- SERVER_SECRET_KEY=CHANGE_ME!!SAME_AS_INVIDIOUS_COMPANION_SECRET_KEY_FROM_INVIDIOUS_CONFIG
# SET this value IF you are using a reverse proxy OR accessing invidious from an external IP.
# Please consult for more doc: https://github.com/iv-org/invidious-companion/wiki/Environment-variables
# - SERVER_BASE_URL=http://localhost:8282
Expand All @@ -117,10 +120,9 @@ Make sure to run the newer Docker Compose V2: https://docs.docker.com/compose/in
cap_drop:
- ALL
read_only: true
user: 10001:10001
# cache for youtube library
volumes:
- /var/tmp/youtubei.js:/var/tmp/youtubei.js:rw
- companioncache:/var/tmp/youtubei.js:rw
security_opt:
- no-new-privileges:true
Expand Down

0 comments on commit 8ab4374

Please sign in to comment.