Bonjour à tous,
J’essaie d’installer PeerTube sur mon serveur dédié avec Docker et Nginx Proxy Manager, mais je n’arrive pas à accéder à la page.
A la fin le docker-compose
identique au fichier d’exemple, mais avec webserver
et certbot
de commenté, car j’utilise Ngin Proxy Manager pour le reverse proxy (je ne pense pas avoir faux ?
J’ai aussi changé les networks, est-ce que cela peut avoir une incidence ?
Pour Nginx Proxy Manager, j’ai redirigé le NDD https://domotube.mcflypartages.fr vers le conteneur http://peertube:1935 avec seulement le Websocket Support
d’activé et Force SSL
, HTTP/2 Support
et HSTS Enabled
dans la config SSL (vu dans un sujet ici).
Pour la partie mail, je passe par OVH.
Les logs des conteneurs docker ont l’air bon (à la fin du message aussi).
Pourtant, je n’ai pas accès à mon instance, c’est un écran blanc 502 Bad Gateway openresty qui s’affiche.
Ce que j’ai essayé :
- Vérifier que npm et peertube soit bien sur le même réseau,
- Dans le fichier
.env
j’ai essyé -
- Delaissé
PEERTUBE_TRUST_PROXY=
d’origine,
- Delaissé
-
PEERTUBE_TRUST_PROXY=["0.0.0.0"]
(vu dans un [sujet ici](https://Rereading the post, I have the impression that it’s listening on port 9000, isn’t there a problem with the official doc, or did I miss something? Well, even if the change doesn’t work, things have improved. I’ve put the rest of the logs at the end of the post.))
-
- Le commenter,
-
- Ajouter l’adresse du réseau IP npm et peertube du conteneur
PEERTUBE_TRUST_PROXY=["127.0.0.1", "loopback", "172.18.0.0/16", "192.168.160.0/20", "172.28.0.0/16"]
- Ajouter l’adresse du réseau IP npm et peertube du conteneur
- Regarder pas mal de sujet du forum sur docker et peertube (tout 2023).
Je n’arrive pas à trouver, avez-vous une idée ?
N’hésitez pas s’il vous manque des informations.
Merci d’avance.
Hello everyone,
I’m trying to install PeerTube on my dedicated server with Docker and Nginx Proxy Manager, but I can’t access the page.
At the end the docker-compose identical to the example file, but with webserver and certbot of commented, because I use Ngin Proxy Manager for the reverse proxy (I don’t think I’m wrong?
I’ve also changed the networks, could this have an impact?
For Nginx Proxy Manager, I redirected the NDD https://domotube.mcflypartages.fr to the http://peertube:1935 container with only Websocket Support enabled and Force SSL, HTTP/2 Support and HSTS Enabled in the SSL config (seen in a topic here).
For mail, I use OVH.
The docker container logs look good (at the end of the message too).
However, I don’t have access to my instance, a white screen 502 Bad Gateway openresty is displayed.
What I tried:
- Check that npm and peertube are on the same network,
- In the
.env
file I tried -
- Downgrade
PEERTUBE_TRUST_PROXY=
from original,
- Downgrade
-
PEERTUBE_TRUST_PROXY=["0.0.0.0"]
(seen in a [topic here](https://Rereading the p](Help needed for configuring Peertube behind Nginx Proxy Manager))
-
- Comment on it,
-
- Add the npm and peertube IP network address of the container
PEERTUBE_TRUST_PROXY=["127.0.0.1", "loopback", "172.18.0.0/16", "192.168.160.0/20", "172.28.0.0/16"]
- Add the npm and peertube IP network address of the container
- Look at a lot of forum topics on docker and peertube (all 2023).
I can’t find it, do you have an idea?
Don’t hesitate if you need more information.
Thanks
docker-compose.yaml
version: "3.3"
services:
# # You can comment this webserver section if you want to use another webserver/proxy or test PeerTube in local
# webserver:
# image: chocobozzz/peertube-webserver:latest
# # If you don't want to use the official image and build one from sources:
# # build:
# # context: .
# # dockerfile: Dockerfile.nginx
# env_file:
# - .env
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - type: bind
# # Switch sources if you downloaded the whole repository
# #source: ../../nginx/peertube
# source: ./docker-volume/nginx/peertube
# target: /etc/nginx/conf.d/peertube.template
# - assets:/var/www/peertube/peertube-latest/client/dist:ro
# - ./docker-volume/data:/var/www/peertube/storage
# - certbot-www:/var/www/certbot
# - ./docker-volume/certbot/conf:/etc/letsencrypt
# depends_on:
# - peertube
# restart: "always"
# # You can comment this certbot section if you want to use another webserver/proxy or test PeerTube in local
# certbot:
# container_name: certbot
# image: certbot/certbot
# volumes:
# - ./docker-volume/certbot/conf:/etc/letsencrypt
# - certbot-www:/var/www/certbot
# restart: unless-stopped
# entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot -w /var/www/certbot; sleep 12h & wait $${!}; done;"
# depends_on:
# - webserver
peertube:
# If you don't want to use the official image and build one from sources:
# build:
# context: .
# dockerfile: ./support/docker/production/Dockerfile.bookworm
image: chocobozzz/peertube:v6.0.2-bookworm
container_name: peertube
# Use a static IP for this container because nginx does not handle proxy host change without reload
# This container could be restarted on crash or until the postgresql database is ready for connection
env_file:
- .env
# ports:
# - "1935:1935" # Comment if you don't want to use the live feature
# - "9000:9000" # Uncomment if you use another webserver/proxy or test PeerTube in local, otherwise not suitable for production
volumes:
# Remove the following line if you want to use another webserver/proxy or test PeerTube in local
- ./assets:/app/client/dist
- ./data:/data
- ./config:/config
depends_on:
- postgres
- redis
# - postfix
restart: "always"
networks:
- peertube
- npm
postgres:
image: postgres:13-alpine
container_name: peertube_postgres
env_file:
- .env
volumes:
- ./postgres:/var/lib/postgresql/data
restart: "always"
networks:
- peertube
redis:
image: redis:6-alpine
container_name: peertube_redis
volumes:
- ./redis:/data
restart: "always"
networks:
- peertube
# postfix:
# image: mwader/postfix-relay
# env_file:
# - .env
# volumes:
# - ./docker-volume/opendkim/keys:/etc/opendkim/keys
# restart: "always"
networks:
peertube:
name: peertube
npm:
name: npm
# certbot-www:
logs postgres :
PostgreSQL init process complete; ready for start up.
2023-12-14 10:35:29.862 UTC [1] LOG: starting PostgreSQL 13.13 on x86_64-pc-linux-musl, compiled by gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014, 64-bit
2023-12-14 10:35:29.862 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2023-12-14 10:35:29.862 UTC [1] LOG: listening on IPv6 address "::", port 5432
2023-12-14 10:35:30.030 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-12-14 10:35:30.289 UTC [51] LOG: database system was shut down at 2023-12-14 10:35:29 UTC
2023-12-14 10:35:30.396 UTC [1] LOG: database system is ready to accept connections
logs redis :
1:C 14 Dec 2023 10:35:11.704 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 14 Dec 2023 10:35:11.704 # Redis version=6.2.14, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 14 Dec 2023 10:35:11.704 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
1:M 14 Dec 2023 10:35:11.707 * monotonic clock: POSIX clock_gettime
1:M 14 Dec 2023 10:35:11.793 * Running mode=standalone, port=6379.
1:M 14 Dec 2023 10:35:11.794 # Server initialized
1:M 14 Dec 2023 10:35:11.794 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
1:M 14 Dec 2023 10:35:11.889 * Ready to accept connections
Logs peertube
[domotube.mcflypartages.fr:443] 2023-12-14 10:35:46.422 info: Using following configuration file hierarchy: /app/config/default.yaml -> /app/support/docker/production/config/production.yaml -> /app/support/docker/production/config/custom-environment-variables.yaml.
[domotube.mcflypartages.fr:443] 2023-12-14 10:35:48.354 info: Database peertube is ready.
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:29.657 info: Creating application account.
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:29.686 info: Creating a default OAuth Client.
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:29.730 info: Creating the administrator.
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:29.787 info: Client id: XXXXXXXXXXXXXXXXXXX
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:29.789 info: Client secret: XXXXXXXXXXXXXXXXXX
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:30.566 info: Generating a RSA key...
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:30.833 info: Generating a RSA key...
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:30.845 info: Generating a RSA key...
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:33.649 info: Username: root
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:33.650 info: User password: XXXXXXXXXXX
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:33.699 info: Connecting to redis standalone...
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:33.710 info: Using XXXXXXXXXXX:465 as SMTP server.
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:33.740 info: Testing SMTP server...
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:34.027 info: Connected to redis.
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:35.471 info: Secure connection established to XXX.XXX.XX.XXX:465 {
"component": "smtp-connection",
"sid": "XXXXX",
"tnx": "network",
"localAddress": "192.168.160.8",
"localPort": 59016,
"remoteAddress": "XXX.XXX.XXX.XXX",
"remotePort": 465
}
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:35.664 info: User "XXX@XXXX.fr" authenticated {
"component": "smtp-connection",
"sid": "XXXXXXXXX,
"tnx": "smtp",
"username": "XXXXX@ndd.fr",
"action": "authenticated",
"method": "PLAIN"
}
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:35.666 info: Successfully connected to SMTP server.
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:35.722 info: Connection closed {
"component": "smtp-connection",
"sid": "XXXXXXXX",
"tnx": "network"
}
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:35.776 info: HTTP server listening on 0.0.0.0:9000
[domotube.mcflypartages.fr:443] 2023-12-14 10:36:35.778 info: Web server: https://domotube.mcflypartages.fr
[domotube.mcflypartages.fr:443] 2023-12-14 10:38:35.685 info: Cleaning video viewers.
Edit 1 :
En relisant le post, j’ai l’impression qu’il écoute sur le port 9000, il n’y a pas un problème sur la doc officielle, ou j’ai surement loupé un truc ? # - "9000:9000" # Uncomment if you use another webserver/proxy or test PeerTube in local, otherwise not suitable for production
Ben même avec ce changement ça ne marche pas, il y a du mieux, j’ai mis la suite des logs en fin de message.
Rereading the post, I have the impression that it’s listening on port 9000, isn’t there a problem with the official doc, or did I miss something? # - "9000:9000" # Uncomment if you use another webserver/proxy or test PeerTube in local, otherwise not suitable for production
Well, even with this change doesn’t work, things have improved. I’ve put the rest of the logs at the end of the post.
logs peertube with port 9000
[domotube.mcflypartages.fr:443] 2023-12-14 10:39:55.293 error: Cannot generate HTML page. {
"err": {
"stack": "Error: ENOENT: no such file or directory, open '/app/client/dist/fr-FR/index.html'",
"message": "ENOENT: no such file or directory, open '/app/client/dist/fr-FR/index.html'",
"errno": -2,
"code": "ENOENT",
"syscall": "open",
"path": "/app/client/dist/fr-FR/index.html"
}
}