Nginx Proxy Manager

repository·develop·Indexed 12 days ago

https://github.com/nginxproxymanager/nginx-proxy-manager

A Docker-based solution providing a web interface for managing Nginx reverse proxies, SSL termination via Let's Encrypt, and host forwarding. Features include management of proxy hosts, redirection hosts, streams, and access lists, with support for custom SSL certificates and raw Nginx configuration.

Tokens
9.8K
Snippets
28
Records
59
Agent score
99%

What's inside Nginx Proxy Manager

  1. Known Third-Party Integrations

    develop

    Nginx Proxy Manager is frequently integrated with various platforms. Note that these integrations are maintained by third parties and are not officially supported by the Nginx Proxy Manager maintainers unless explicitly stated in their respective documentation.

    Commonly used integrations include:

    • Home Assistant: Available as a Hass.io plugin.
    • NAS/Hypervisors: Specialized setups for UnRaid, Synology, and Proxmox (via Proxmox Scripts or Proxmox VE Helper-Scripts).
    • Monitoring: nginxproxymanagerGraf for visualization.
    • Deployment Guides: selfhosting.sh provides a complete Docker Compose setup guide covering SSL, access lists, and proxy host management.
    • Security/Auth: NPM Auth Gateway for user-level access control and auto IP whitelisting via auth providers.
  2. Nginx Proxy Manager Features Overview

    develop

    Nginx Proxy Manager provides a web-based interface to manage Nginx configurations without manual file editing. Key features include:

    • Forwarding & Redirection: Easily create forwarding domains, redirections, streams, and 404 hosts.
    • SSL/TLS: Free SSL via Let's Encrypt or support for custom SSL certificates.
    • Security: Access Lists and basic HTTP Authentication for hosts.
    • Advanced Configuration: Access to raw Nginx configuration for power users.
    • Management: User management, permissions, and audit logs via a Tabler-based Admin UI.

    Note on Architecture Support: As of version 2.14+, armv7 (armhf) is no longer supported due to Node.js changes. If you are using an armv7 device, use the 2.13.7 image tag instead.

  3. What is a Stream in Nginx Proxy Manager?

    develop

    A Stream is a feature in Nginx used to forward raw TCP or UDP traffic directly to another computer or service on your network. Unlike standard HTTP proxying which operates at the Application Layer (Layer 7), Streams operate at the Transport Layer (Layer 4). This makes them ideal for non-HTTP protocols such as:

    • Game servers
    • FTP servers
    • SSH servers
  4. What is an Access List and when to use it

    develop

    An Access List is a security layer used to restrict access to your Proxy Hosts. It allows you to define a blacklist or whitelist of specific client IP addresses and can enforce authentication via Basic HTTP Authentication.

    Key Capabilities:

    • IP Filtering: Define specific client IP addresses that are allowed or denied access.
    • Authentication: Configure multiple usernames and passwords for a single Access List.
    • Reusability: Create an Access List once and apply it to one or multiple Proxy Hosts.

    Use Cases:

    • Protecting web services that lack built-in authentication mechanisms.
    • Restricting access to known clients and protecting services from unknown/unauthorized clients.
  5. What is a 404 Host and when to use it

    develop

    A 404 Host is a specific host configuration in Nginx Proxy Manager designed to return a 404 error page.

    Use a 404 Host in the following scenarios:

    • Search Engine Management: If a domain is indexed by search engines but no longer hosts active content, a 404 Host allows you to provide a custom error page or explicitly signal to indexers that the pages no longer exist.
    • Traffic Tracking: It allows you to monitor access logs for hits to that specific domain, enabling you to view referrers and understand where traffic is originating from even when no active service is hosted.
  6. What is a Redirection Host?

    develop
    A Redirection Host is a configuration used to intercept requests arriving at a specific incoming domain and automatically redirect the viewer to a different destination domain. This is primarily used for domain migrations, ensuring that old search engine links or existing referrers pointing to an outdated domain are seamlessly transitioned to the new domain.
  7. Understand NPM Auth Gateway

    develop

    NPM Auth Gateway is a companion application designed to add user-level access control to Nginx Proxy Manager (NPM). It automates the management of NPM Access Lists by mapping user identities from an Auth Provider to specific NPM proxy hosts.

    Core Workflow:

    1. Admin Setup: An admin creates a user (via email) and assigns them access to specific proxy hosts using a checkbox-based interface.
    2. User Login: When a user logs in through the gateway, their current IP address is automatically detected and added to the NPM Access Lists assigned to them.
    3. Dynamic Updates: If a user's IP changes (e.g., moving from Wi-Fi to mobile data), they simply log in again to have their new IP whitelisted.
    4. Revocation: Admins can revoke access with one click, which removes all IPs associated with that user from the NPM Access Lists.

    Key Architectural Principle: NPM remains the source of truth and the enforcement point. The gateway does not replace NPM's security; it only automates the IP whitelisting process via the NPM REST API. If the gateway fails, NPM continues to enforce the existing whitelists.

  8. Understanding 404 errors in Nginx Proxy Manager

    develop

    A 404 error indicates that the requested domain or host is not found. In the context of Nginx Proxy Manager, this typically occurs when a domain is listed in your configuration but the proxy cannot find a matching host or the requested resource.

    Using 404 errors can be useful for:

    • Identifying domains that are listed but no longer active or correctly routed.
    • Providing a cleaner error page to users.
    • Specifically informing search engine crawlers that certain domain pages no longer exist.
    • Monitoring logs to track access attempts and specific host references for debugging.
  9. Understand the Certbot DNS plugin configuration structure

    develop

    Nginx Proxy Manager uses a specific JSON structure to define available Certbot DNS plugins. For a plugin to be compatible, it must follow the standard argument structure:

    --authenticator <plugin-name> --<plugin-name>-credentials <FILE> --<plugin-name>-propagation-seconds <number>

    Each plugin entry in the configuration must include the following keys:

    • display_name: The name shown to the user in the UI.
    • package_name: The name of the package in the PyPi repository.
    • version_requirement: (Optional) PEP 440 compliant version specifiers (e.g., ==1.3 or >=1.2,<2.0).
    • dependencies: A space-separated list of additional dependencies to be installed via pip.
    • credentials: A template representing the required credentials file format.
    • full_plugin_name: The exact name used with the certbot command line (e.g., dns-cloudflare).
    {
      "cloudflare": {
        "display_name": "Name displayed to the user",
        "package_name": "Package name in PyPi repo",
        "version_requirement": "==1.3",
        "dependencies": "additional-dep1 additional-dep2",
        "credentials": "template of the credentials file",
        "full_plugin_name": "dns-cloudflare"
      }
    }
  10. Understand the concept of a Proxy Host

    develop

    A Proxy Host is the primary incoming endpoint used to forward traffic to a web service. It acts as a gateway that receives requests from the internet (or local network) and routes them to the appropriate internal service.

    Key functions of a Proxy Host include:

    • Traffic Forwarding: Routing incoming requests to a specific web service.
    • SSL Termination: Providing SSL/TLS encryption for services that do not have native SSL support built-in, allowing you to secure traffic at the proxy level.
  11. Limitations of using multiple DNS providers

    develop

    Because DNS plugins are maintained independently of Certbot and Nginx Proxy Manager, users should be aware of the following risks:

    • Dependency Conflicts: Using more than one DNS provider in a single Nginx Proxy Manager instance may introduce Python dependency conflicts between different Certbot plugins.
    • Version Lag: Some plugins may not be on the latest Certbot or dependency versions.
    • Compatibility Issues: A plugin might install package versions that conflict with other Certbot components.
    • Variable Support: Support quality and testing frequency vary significantly between different DNS providers.