A reverse proxy that shows every request and stops the ones that shouldn't get through
A reverse proxy for nginx that you manage from a web UI. You set up proxy hosts, SSL certificates, the WAF (ModSecurity) and access controls per domain; Nginx Proxy Guard writes the nginx config, checks it with nginx -t and applies it. If the check fails, the previous config stays in place.
Latest v2.72.9 (2026-11-26) · Docker Compose · amd64, arm64 · MIT License
- 15:15:14403photos.example.com/.envExploit
- 15:15:12200cloud.example.com/remote.php/davNot Blocked
- 15:15:09403git.example.net/?q=1' or 1=1--WAF 942100
- 15:15:07403home.example.com/wp-login.phpGeo Block
- 15:15:05200photos.example.com/api/assetsNot Blocked
- 15:15:02403status.example.com/Bot Filter
- 15:14:58302cloud.example.com/loginCloud
- 15:14:55200game.example.comUDP :25565Stream
What changes compared with plain nginx
NPG still runs nginx underneath. It takes over the parts you would otherwise do by hand and adds the security features nginx doesn't come with.
How a request reaches your service
A request only goes through the stages its host has turned on. The stage that stopped it shows in the logs as the block reason.
Request
Internet
Browsers, apps, bots
1
Country, IP, bot
Country and cloud ranges, banned IPs, bot filter, exploit and URI rules
2
WAF
ModSecurity, OWASP CRS
3
Rate limit
Requests per second per IP
4
Access list
Allowed IPs and domains, usernames and passwords
5
Challenge
Hosts that set country or cloud blocking to challenge
Passed
Your service
Containers, internal servers

Features
Security features can be turned on per host, or set once as a global default that every host follows.
Proxy hosts
Connects a domain to a service on your network. Docker containers can be picked from a list, and HTTP/2, HTTP/3, WebSocket, load balancing across several backends and TCP/UDP streams are supported.
Proxy host docs
Blocked requests come with a reason
Every log line shows which stage and rule stopped the request. If it was a false positive, the log detail lets you turn that rule off for the whole host, one path or one parameter.
Reading logs and block reasons
Access lists with usernames and passwords
Allow or deny by IP, range or domain name. Add accounts to a list and visitors are asked for a username and password; with Satisfy Any on, the allowed IPs get in without one.
Access list docs
SSL certificates
Issues Let's Encrypt certificates with the HTTP or DNS challenge and by default renews them 30 days before they expire. The DNS challenge also gets you wildcard certificates, and the key can be RSA or ECDSA. Certificates you already have can be uploaded.
SSL certificate docs
More features
WAFDocs
Inspects requests with ModSecurity (v3.0.15) and the OWASP CRS (v4.26.0). Each host runs in blocking or detection mode.
Country and cloud blocking, bot filterDocs
Allows or blocks by country, blocks cloud provider IP ranges or shows them a challenge page, and filters known bots by User-Agent.
Automatic bansDocs
fail2ban and the WAF auto-ban block IPs that keep causing trouble, for as long as you set. Public blocklists can be subscribed to as well.
Users and rolesDocs
Several admins with role-based permissions, two-factor authentication, OIDC sign-in (SSO) and API tokens.
TCP/UDP streamsDocs
Forwards ports that aren't HTTP, such as a game server or MQTT, and logs each connection.
Notifications and backupsDocs
Sends notifications to Discord, Telegram or a webhook and backs up and restores the configuration. DDNS and Cloudflare Tunnel are managed from the web UI too.
Install
Installs on a Linux server with Docker and Docker Compose.
Requirements
- Docker 24.0 or later and Docker Compose v2
- A linux/amd64 or linux/arm64 host (Raspberry Pi 4/5 and other ARM64 servers work)
- Ports 80, 443 and 81 free on the host
- (Optional) a MaxMind license key for GeoIP
| Address | Used for |
|---|---|
https://your-server:81 | Admin UI |
http://your-server | Proxy (HTTP) |
https://your-server | Proxy (HTTPS) |
The first login is admin / admin. Nothing else works until you change that password. Keep the admin UI (port 81) off the internet, on your LAN or behind a VPN.
To update, run docker compose pull and then docker compose up -d in the install folder. The installation docs have the details.
# 1. Create directory
mkdir -p ~/nginx-proxy-guard && cd ~/nginx-proxy-guard
# 2. Download files
wget https://raw.githubusercontent.com/svrforum/nginxproxyguard/main/docker-compose.yml
wget -O .env https://raw.githubusercontent.com/svrforum/nginxproxyguard/main/env.example
# 3. Auto-generate secure secrets
sed -i "s/DB_PASSWORD=.*/DB_PASSWORD=$(openssl rand -base64 24)/" .env
sed -i "s/JWT_SECRET=.*/JWT_SECRET=$(openssl rand -hex 32)/" .env
# 4. Start services
docker compose up -dRecent changes
- v2.72.92026-11-26On a host using the geo challenge or ForwardAuth, an upload larger than the global "max…
- v2.72.82026-11-25A 403 returned by the site itself showed in the logs as a bot-filter block, so a site…
- v2.72.72026-11-25The global Fail2ban jail could not be switched on while Trusted Proxies was empty.
- v2.72.62026-11-23The dashboard charts, the traffic graphs, a banned IP's recent connections and other…