Error: can not retrieve oauth client

I am trying to run peertube as docker image in my ubuntu machine.

I already have postgres database running as docker in same machine.

My docker compose file:


version: ‹ 3 ›

services:
peertube:
image: chocobozzz/peertube:latest
env_file:
- .env
ports:
- « 9000:9000 »
volumes:
- ./docker-volume/assets:/app/client/dist
- ./docker-volume/data:/data
- ./docker-volume/config:/config
depends_on:
- redis
restart: « always »

redis:
image: redis:6-alpine
volumes:
- ./docker-volume/redis:/data
restart: « always »


My env file server config

# PeerTube server configuration
# If you test PeerTube in local: use "peertube.localhost" and add this domain to your host file resolving on 127.0.0.1
#PEERTUBE_WEBSERVER_HOSTNAME=peertube.localhost
# If you just want to test PeerTube on local
#PEERTUBE_WEBSERVER_PORT=9000
#PEERTUBE_WEBSERVER_HTTPS=false
# If you need more than one IP as trust_proxy
# pass them as a comma separated array:
PEERTUBE_TRUST_PROXY=["127.0.0.1", "loopback", "172.18.0.0/16", "192.168.10.0/16"]

I have commented all props as of now but when i un-comment also i get same error

Getting can not retrieve oauth client

This usually happens when PEERTUBE_WEBSERVER_HOSTNAME does not exactly correspond to the URL in your browser.

if am trying to access the url only in local and accessing via browser at localhost:9000 … what should be the value?

If your env file has not changed: http://peertube.localhost:9000.

I did not pay attention before my first answer. You are using docker for what seems to be a test environment.
There are some tricky parts to do this. The Peertube’s docker config is meant to use for production environment.

I documented a way to have a dev env using docker here (in french):

There is an english version on this git repo:
https://codeberg.org/mose/pt-plugin-dev

Thanks… it worked fine and able to run in local network…

Great!

You can mark this thread as solved (there should be a button next to my response).