Nginx Proxy Manager (NPM) icon

Nginx Proxy Manager (NPM)

Interact with your NPM instance

Overview

This node integrates with an Nginx Proxy Manager (NPM) instance, allowing users to manage various aspects of their proxy configuration programmatically. Specifically, the Redirection Host - Update operation enables updating existing redirection host entries in the NPM system.

A redirection host in NPM is used to redirect incoming requests from one or more domain names to a specified target domain or URL, optionally preserving paths and controlling HTTP status codes for the redirection.

Typical use cases include:

  • Updating domain redirections when migrating websites.
  • Changing forwarding schemes (HTTP/HTTPS) or HTTP status codes for SEO or traffic management.
  • Enabling security features like SSL enforcement or HSTS on redirection hosts.
  • Adjusting advanced settings such as blocking exploits or enabling HTTP2 support.

For example, you might update a redirection host to force HTTPS, preserve the original request path, and set a permanent redirect (HTTP 301) to a new domain.

Properties

Name Meaning
ID The unique identifier of the redirection host entry to update. Required to specify which redirection host to modify.
Domain Names One or more domain names associated with this redirection host. You can specify multiple domains that will be redirected.
Options A collection of optional settings for the redirection host:
  Forward Scheme The scheme to use when forwarding requests. Options: HTTP, HTTPS, or Auto (automatically determine).
  Forward Domain Name The target domain name where requests should be redirected.
  Forward HTTP Code The HTTP status code used for redirection. Options include: 300 Multiple Choices, 301 Moved Permanently, 302 Found Permanently, 303 See Other, 307 Temporary Redirect, 308 Permanent Redirect.
  Preserve Path Whether to preserve the original request path during redirection (true or false).
  SSL Forced Whether to force SSL (HTTPS) on the redirection host (true or false).
  HTTP2 Support Enable or disable HTTP/2 support (true or false).
  HSTS Enable Enable HTTP Strict Transport Security (true or false).
  HSTS Subdomains Apply HSTS policy to subdomains (true or false).
  Certificate ID The ID of the SSL certificate to associate with this redirection host.
  Block Exploits Enable protection against common exploits (true or false).
  Advanced Config Custom advanced configuration as a multiline string for fine-tuning the redirection host behavior.

Output

The node outputs JSON data representing the updated redirection host object as returned by the Nginx Proxy Manager API. This typically includes fields such as:

  • The redirection host's ID.
  • The list of domain names.
  • Forwarding options and settings.
  • Status and metadata about the redirection host.

If the node supports binary data output (not indicated here), it would represent related files or certificates, but this operation primarily deals with JSON data.

Dependencies

  • Requires an active Nginx Proxy Manager instance accessible via its API.
  • Requires credentials including the NPM URL, user email, and password to authenticate and obtain an API token.
  • The node uses HTTP requests to communicate with the NPM API endpoints.
  • No additional external services are required beyond the NPM API.

Troubleshooting

  • Login failed: No token received
    This error indicates authentication failure. Verify that the provided credentials (email and password) are correct and that the NPM instance URL is reachable.

  • Invalid ID or resource not found
    If the specified redirection host ID does not exist, the update will fail. Ensure the ID corresponds to an existing redirection host.

  • Validation errors on domain names or options
    Make sure all required fields are provided and valid. For example, domain names must be valid strings, and options must conform to allowed values.

  • Network or connectivity issues
    Confirm that the NPM API endpoint is accessible from the n8n environment and that no firewall or network restrictions block the connection.

  • Permission issues
    The authenticated user must have sufficient permissions to update redirection hosts.

Links and References

Discussion