Error: can not retrieve oauth client

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