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 ›

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

image: redis:6-alpine
- ./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
# If you just want to test PeerTube on local
# If you need more than one IP as trust_proxy
# pass them as a comma separated array:
PEERTUBE_TRUST_PROXY=["", "loopback", "", ""]

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:

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


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