# How to get user IP after updating commit b4a3389

**URL:** https://meta.discourse.org/t/commit-b4a3389-ip/406267
**Category:** Self-hosting
**Tags:** nginx, cloudflare
**Created:** [June 27, 2026, 3:02am UTC](https://meta.discourse.org/t/commit-b4a3389-ip/406267 "2026-06-27T03:02:07Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [June 29, 2026, 4:01pm UTC](https://meta.discourse.org/t/commit-b4a3389-ip/406267/3 "2026-06-29T16:01:19Z")

</div>

hello @CLOUD_PHT - welcome to Meta 🙂

i assume you are running more than one website on the same machine configuration? (like a wordpress site + discourse)

the issue is that you are routing traffic through docker’s internal network (port mapping), which masks all incoming requests as the docker gateway ip (`172.17.0.1`). because internal nginx doesn’t recognize `172.17.0.1` as a cloudflare ip, it drops the `CF-Connecting-IP` header for security.

to fix this, you need to switch your setup to use a unix socket - this allows your outer nginx to pass the traffic (and the headers) directly into Discourse without docker’s network borking the ip addresses.

follow this official guide, and make sure you keep `cloudflare.template.yml` in your `app.yml` file when you rebuild.

> [@Run other websites on the same machine as Discourse](https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247):
>
> @pfaffman edited this heavily 2022.02.24. Blame me if it’s broken. If you want to run other websites on the same machine as Discourse, you need to set up an extra NGINX or HAProxy proxy in front of the Docker container. NOTE: This is for advanced admins This guide assumes you already have Discourse working - if you don’t, it may be hard to tell whether or not the configuration is working. You cannot use ./discourse-setup to set up Discourse if another server is using port 80 or 443. You will…

---

_[View the full topic](https://meta.discourse.org/t/commit-b4a3389-ip/406267)._
