Features
Settings and maintenance
The Settings menu collects values that apply to all of nginx and NPG's own operating settings. This page lays out the Settings menu and covers what other pages do not: global settings, error pages, maintenance (log retention), system logs, backup and restore, and raw log files.
The Settings menu
The settings tabs fall into four groups. A tab is shown only to roles with the matching permission area (mostly Settings; Backups for backups, Users for users and SSO, Roles for roles).
| Group | Tab | Covered in |
|---|---|---|
| General | Global Settings | nginx-wide values. This page |
| SSL / ACME | Certificate issuance settings. SSL certificates | |
| Error Pages | Replacing the 403, 502, 503 and 504 pages. This page | |
| Security | CAPTCHA | The challenge page. Geo and cloud blocking |
| GeoIP | The MaxMind database. Geo and cloud blocking | |
| Bot Filter | Bot lists. Bot filter | |
| WAF Auto-Ban | Automatic bans and Global Trusted IPs. Automatic bans, Trusted IPs and exceptions | |
| Filter Subscriptions | Blocklist subscriptions | |
| Trusted Proxies | Which proxies the real client IP is read from. Running behind Cloudflare | |
| Domain entries (DDNS) | Domain entries in access lists. Access lists and basic auth | |
| Access | Users, Roles, SSO | Users, roles and SSO |
| Operations | Maintenance | Log retention. This page |
| Backups | Backup and restore. This page | |
| System Logs | Container log collection. This page | |
| Cloudflare Tunnel | Publishing through Cloudflare Tunnel | |
| Notifications | Notifications |
Global Settings
Settings → Global Settings sets values for all of nginx. After a change, Save Changes reloads nginx automatically. Apply recommended fills in nginx's recommended tuning values (worker_connections 8192, keepalive 30s/1000 requests and so on) at once, and Reset to Defaults puts every global setting back to its default.

| Tab | Main fields |
|---|---|
| Worker | Worker processes and connections, Worker Shutdown Timeout (s) |
| HTTP | Keepalive, Max Body Size (default 100m), sendfile, Server Tokens (off by default) |
| Performance | Proxy buffers, proxy buffering and request buffering, open file cache |
| Compression | Gzip Compression (on by default), Brotli Compression (off by default), levels and types |
| SSL/TLS | SSL Protocols, ciphers, session cache, OCSP stapling |
| Timeouts | Client timeouts, Proxy Connect / Send / Read Timeout (s) (60 seconds by default) |
| Advanced | See below |
Fields on the Advanced tab:
| Field | Description |
|---|---|
| Direct IP Access Handling | How requests to the server's bare IP address are handled: Show Nginx Proxy Guard Welcome Page, Return 403 Forbidden or Close Connection (444). |
| DDoS Protection (Global) | Per-IP Connection Limit, Request Rate Limit and Bandwidth Limit across all hosts. See Security headers and rate limits. |
| IPv6 Support | Turns IPv6 listen directives on or off. Turn it off if the server has no IPv6. |
| Error Log Level | How much nginx writes to its error log |
| Also print access log to docker logs | Writes every request line to the npg-proxy container output as well. The record the log screens use is kept regardless. |
| Strip query string from access log | Logs only the path and drops the query string such as ?apiKey=…, so keys and tokens passed in the query do not end up in log files. |
| Custom HTTP Config, Custom Stream Config | Configuration written directly into nginx's http and stream blocks |
| Instance Name | A name shown at the top of every page and in the browser tab (up to 32 characters), to tell several NPG installs apart. Empty shows none. |
| Public Error Page Language | Default language of public error pages such as the 403 block page, and of the CAPTCHA page. Auto follows the visitor's browser (English unless it is Korean); ko and en force one language. A visitor's click on the page's language button takes precedence. |
Max Body Size and proxy buffering can be overridden per host on the proxy host's Performance tab; empty uses the global value. For large uploads see Large uploads, WebSockets and timeouts.
Error Pages
Settings → Error Pages replaces the pages NPG shows itself, the block page (403) and the backend error pages (502, 503, 504), with your own HTML. They apply to every proxy host and to visits for domains NPG does not know.

- Choose the status code to replace.
- Enter the HTML. Start from a template begins from the built-in page.
- Check it with Preview and click Save. It applies immediately.
- To go back, click Go back to the built-in page.
Error pages are shown on each site's own address, so for security scripts do not run on them. Styles, images and fonts work. A page can be up to 256 KB.
Maintenance (log retention)
Log Retention Settings in Settings → Maintenance sets how long each log type is kept. Logs older than that are deleted automatically.
| Preset | Access Logs | WAF Events | Error Logs | System Logs | Admin Audit |
|---|---|---|---|---|---|
| Default | 1095 days | 90 days | 30 days | 30 days | 1095 days |
| Extended | 365 days | 180 days | 90 days | 90 days | 1825 days |
| Minimal | 30 days | 30 days | 7 days | 7 days | 365 days |
Dashboard Stats Retention under Other Data Retention (90 days by default) is how long the data behind the dashboard charts and summary statistics is kept.
Raw log copies in old compressed logs deletes the raw copies of access and error log lines kept in compressed logs older than two days, to win back database disk space. The values used for analysis and the raw text of WAF events are kept. This cannot be undone, so read the confirmation dialog when you start it.
System Logs
With Enable System Log Collection on in Settings → System Logs, NPG collects the logs of its Docker containers and shows them in Logs → System Logs. Container Log Levels sets the level collected per container, and Exclude Patterns drops matching lines.
Raw log files
nginx also writes the access log to a file (access_raw.log), which NPG reads into the database. Rotation and retention of these files are managed in Logs → Raw Files.

| Field | Description |
|---|---|
| Max File Size (MB) | Checked every hour; the current file is rotated when it is larger. Files are also rotated every day at midnight regardless of size. 10 to 10240, default 100. |
| Retention Period (days) | Rotated files older than this are deleted at the next rotation. 1 to 3650, default 7. |
| Compress Rotated Files | Compresses with gzip. On by default. |
The screen shows the expected disk usage. The file list offers Preview, Download and Delete, and Manual Rotate rotates immediately.
Archive directory (another disk or NAS)
Rotated files can be moved to another disk or a NAS to free the log disk.
- Mount the shared folder on the host (with
nofailin fstab). - Bind that folder to
/archivein the api service ofdocker-compose.ymland recreate the container.
services:
api:
volumes:
- /mnt/nas/npg-raw-logs:/archive- In the archive card on Logs → Raw Files, click Check; if the file system and size shown are right, click Use this directory.
- Turn on Move rotated raw logs to the archive directory and save.
Only files that are compressed and have not changed for a while are moved. If the archive directory cannot be used (not mounted, not writable, out of space and so on), the files stay on the log disk and the card shows the status. Archive retention is 1 to 3650 days, default 365.
Backup and restore
Settings → Backups backs up and restores the NPG configuration as a .tar.gz file. The procedure around version updates is in Updating and backups.

Create Backup takes a description and Include Configuration Files, Include SSL Certificates and Include Database. Backups in Backup History can be downloaded, restored or deleted. Files are stored in /app/data/backups inside the API container (the npg_api_data volume).
In Auto Backup Settings, turn on Enable Auto Backup and set the Backup Schedule (Cron) (default 0 2 * * *, daily at 2 a.m.) and the Backup Retention Count (default 10; the oldest backups are deleted beyond that). A failing scheduled backup can be sent as the Scheduled backup failed notification.
A backup from another server is uploaded with Upload & Restore. The upload limit is about 100 MB.
| Included in a backup | Not included |
|---|---|
| Proxy hosts with their security settings and log collection rules | User accounts and role assignments |
| Redirect hosts, access lists, auth providers (ForwardAuth) | API tokens |
| Certificates (with private keys), DNS providers (with credentials) | Notification channels |
| WAF settings and exclusions, banned IPs, URI blocks, exploit rules | Log data such as access logs |
| Global security defaults, global Fail2ban, CAPTCHA settings | SSO identity links |
| Filter subscriptions, DDNS records, cloud providers | |
| Global settings, system settings, error pages, Cloudflare Tunnel settings | |
| Roles, SSO providers |
A restore overwrites the current configuration with the backup's. When it finishes, reload the page and assign roles to your users again.