PeerTube thinks your web browser public IP is 127.0.0.1

Hi,

I’ve found out that videos views are not counting properly in my instance. This is because PeerTube thinks your web browser public IP is 127.0.0.1.

I’ve checked my Nginx configurarion file which is identical to the file found in .../support/nginx/. It only differs in the proxy_pass http://backend; statement where backend points to 127.0.0.1:9000.

I’m using all official packages from Debian 12 which includes Nginx 1.22.1.

What am I doing wrong?

Thanks.

Have you another reverse proxy in front of Nginx?

No, in front of Nginx there is nothing other than The Internet.

What is the value of https://github.com/Chocobozzz/PeerTube/blob/develop/config/production.yaml.example#L66?

1 « J'aime »
trust_proxy:
  - 0.0.0.0

I changed that for some reason but I don’t remember why.

Reset it to the default value, restart peertube and retry to check your ip :slight_smile:

Great! Now it works as expected. Idk why I did that change in the first place.

Thanks @Chocobozzz

You can mark the topic as solved (there should be a button underneath the chocobozzz’ response).

1 « J'aime »