Forwarding internet sites to a local IP using a Nginx reverse proxy.
This is useful when you have a device on your local network that needs access to resources that are directly blocked or restricted on that specific device.
flowchart TB
subgraph LAN["🏠 Local Network"]
subgraph ClientMachine["💻 Client Machine"]
Browser[🌐 Browser]
end
subgraph LocalityServer["🖥️ Locality Server
(e.g. 192.168.0.237)"]
direction LR
WebUI["Web Interface :8099<br/><i>Display and Manage proxies</i>"]
Nginx[Nginx Proxy<br/>Ports 8100-8200]
end
end
subgraph Internet["🌍 Internet"]
Claude[claude.ai]
Gemini[gemini.google.com]
ChatGPT[chatgpt.com]
end
Browser -->|"Proxy setup"| WebUI
Browser -->|"https://192.168.0.237:8100"| Nginx
Browser -->|"https://192.168.0.237:8101"| Nginx
Browser -->|"https://192.168.0.237:810X"| Nginx
WebUI -.->|"Create/Delete configs"| Nginx
Nginx -->|"Port 8100 → claude.ai"| Claude
Nginx -->|"Port 8101 → gemini.google.com"| Gemini
Nginx -->|"Port 8102 → chatgpt.com"| ChatGPT
style LAN color:white,fill:#1a1a2e,stroke:#6366f1,stroke-width:3px
style ClientMachine fill:#16213e,stroke:#10b981,stroke-width:2px,color:white
style LocalityServer fill:#16213e,stroke:#ef4444,stroke-width:2px,color:white
style WebUI fill:#6366f6,color:#fff
style Nginx fill:#10b981,color:#fff
style Internet fill:#0f3460,stroke:#888,stroke-dasharray: 5 5
linkStyle default stroke:#22d3ee,stroke-width:2px
- You launch Locality on a device with unrestricted internet access (e.g., your home PC).
- Locality starts up on your local network at:
https://{local device IP}:{WEB_INTERFACE_PORT from .env file}. - Connect to this address via the Locality web interface from any other device on your local network (e.g., a corporate laptop).
- Skip the security warning upon first connection (more on this below).
- In the web interface, add the websites you need to access. Locality will "forward" them to a local IP.
At the first visit on Locality web-ui, browser warns about the certificate because it is unknown to authorized Certificate Authorities (CA) and is not added to the device's trusted certificate store. This does not make the connection any less secure.
- The connection to your local IP is established via HTTPS. Therefore, all requests are encrypted
- Nginx generates a new encryption certificate when Locality starts.
- MITM Protection: Alerts on TLS downgrades (below 1.3). This indicates that traffic is being intercepted and decrypted by an intermediary (e.g., a corporate firewall or antivirus).
Locality requires nothing but Docker. The entire application lifecycle takes place inside the container.
-
Clone the repository (or download the ZIP archive):
git clone https://github.com/novibe/locality.git -
Navigate to the Locality folder
-
Configure ports in the
.envfile if necessary -
Launch Locality with the command:
docker compose up -d -
Go to
https://{local device IP}:{WEB_INTERFACE_PORT from .env file}
Typically, a local IP looks like 192.168.0.x.
Open the command prompt and run: ipconfig | findstr /i "IPv4"
Open the terminal and run: hostname -I