Nginx Proxy Guard

Getting started

Introduction

Nginx Proxy Guard (NPG) manages an nginx reverse proxy from a web UI. It forwards requests for each domain to an internal service, issues and renews certificates, and applies security settings such as the WAF and access control per host or globally. It installs with Docker Compose and is built for the home-server case: one machine exposing several services to the internet.

Dashboard: traffic, blocked requests, system resources
Dashboard: traffic, blocked requests, system resources

How settings are applied

A value saved in the UI is written to the database, and NPG turns it into nginx configuration.

  1. The setting is stored in the database.
  2. NPG regenerates that host's nginx configuration file.
  3. nginx -t checks the whole configuration.
  4. If the check passes, nginx reloads.

If the check fails, nginx is not reloaded and the previous configuration stays in place. The host then shows as Error in the Proxy Hosts list, and hovering over the status shows the message nginx reported. You never edit configuration files by hand: change the value in the UI and save again.

Components

docker compose up -d starts five containers.

ContainerRole
npg-proxynginx, with the ModSecurity WAF and the OWASP CRS rules. It runs in host network mode, opens ports 80 and 443 directly and sees visitors' real addresses. The Cloudflare Tunnel connector (cloudflared) also runs in this container.
npg-apiThe API server. It renders settings into nginx configuration, collects logs, and runs certificate issuance, renewal and scheduled jobs.
npg-uiThe admin UI, served over HTTPS on port 81 by default.
npg-dbTimescaleDB (PostgreSQL). It stores settings and logs, and compresses older logs.
npg-valkeyCache. Optional: without it, the API caches in its own memory.

What it does

Requirements

  • Docker 24.0 or later with Docker Compose v2
  • linux/amd64 or linux/arm64 (ARM64 servers such as Raspberry Pi 4/5 included)
  • Admin UI languages: Korean and English

Next steps

  1. Installation
  2. Your first proxy host
  3. Turning on HTTPS