[GH-ISSUE #2695] Configuration as Code : List of Proxy Hosts or Import Capability #1856

Closed
opened 2026-02-26 07:32:44 +03:00 by kerem · 4 comments
Owner

Originally created by @instantdreams on GitHub (Mar 16, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2695

Is your feature request related to a problem? Please describe.
My various servers use repositories to manage the configuration, including but not limited to:

  • docker compose files
  • environment variables
  • documentation
  • scripts
  • configuration files (e.g. prometheus.yml)

The ability to define proxy hosts in a yaml or toml file that are automatically imported if not existing into an instance of NPM would save time, but more importantly provide robustness and repeatability in the event of having to fully rebuild a host.h

I run NPM on two edge servers, with scripts to backup and restore the configuration and database if needed, but an initial load would certainly help with 50+ proxy hosts.

Describe the solution you'd like
Support for a nginx-proxy-manager.yml file in a suitable mapped folder with an example format of:

hosts-proxy:
  - domain-names:
    - [domain name 1]
    - [domain name x]
    scheme: [http | https]
    forward-host-ip: [hostname | ip address]
    foward-port: [port]
    cache-assets: [true | false]
    block-common-exploits: [true | false]
    websockets-support: [true | false]
    access-list: [access list]
    location: 
      - path: [path]
        scheme: [http | https]
        forward-host-ip: [hostname | ip address]
        foward-port: [port]
        [custom-configuration]: [not allowed with initial load]
    ssl-certificate:
      - request: [true | false]
        force-ssl: [true | false]
        http2-support: [true | false]
        hsts-enabled: [true | false]
        hsts-subdomains: [subdomains]
        email-address: [email]
        agreement: [true]    
    [custom-configuration]: [not allowed with initial load]

hosts-redirection:
  - [etc]

hosts-streams:
  - [etc]

Other clauses can be defined for Redirections, Streams, and 404s, but no DNS challenges or access list changes should be considered. This would be in order to perform the initial population of a fresh installation.

Describe alternatives you've considered

  1. Backup and Restore
    • Only useful when recovering or reimaging an existing location
  2. Duplicate existing data/nginx/proxy_host/*.conf files
    • Risky without knowing integration to NPM processes

Additional context
This would be a nice to have feature. The existing functionality of NPM make it worth using even if everything has to be set up from scratch with detailed documentation, rather than configuration as code.

Originally created by @instantdreams on GitHub (Mar 16, 2023). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2695 **Is your feature request related to a problem? Please describe.** My various servers use repositories to manage the configuration, including but not limited to: * docker compose files * environment variables * documentation * scripts * configuration files (e.g. prometheus.yml) The ability to define proxy hosts in a yaml or toml file that are automatically imported if not existing into an instance of NPM would save time, but more importantly provide robustness and repeatability in the event of having to fully rebuild a host.h I run NPM on two edge servers, with scripts to backup and restore the configuration and database if needed, but an initial load would certainly help with 50+ proxy hosts. **Describe the solution you'd like** Support for a nginx-proxy-manager.yml file in a suitable mapped folder with an example format of: ``` hosts-proxy: - domain-names: - [domain name 1] - [domain name x] scheme: [http | https] forward-host-ip: [hostname | ip address] foward-port: [port] cache-assets: [true | false] block-common-exploits: [true | false] websockets-support: [true | false] access-list: [access list] location: - path: [path] scheme: [http | https] forward-host-ip: [hostname | ip address] foward-port: [port] [custom-configuration]: [not allowed with initial load] ssl-certificate: - request: [true | false] force-ssl: [true | false] http2-support: [true | false] hsts-enabled: [true | false] hsts-subdomains: [subdomains] email-address: [email] agreement: [true] [custom-configuration]: [not allowed with initial load] hosts-redirection: - [etc] hosts-streams: - [etc] ``` Other clauses can be defined for Redirections, Streams, and 404s, but no DNS challenges or access list changes should be considered. This would be in order to perform the initial population of a fresh installation. **Describe alternatives you've considered** 1. Backup and Restore * Only useful when recovering or reimaging an existing location 2. Duplicate existing `data/nginx/proxy_host/*.conf` files * Risky without knowing integration to NPM processes **Additional context** This would be a nice to have feature. The existing functionality of NPM make it worth using even if everything has to be set up from scratch with detailed documentation, rather than [configuration as code](https://devops.com/the-pros-and-cons-of-configuration-as-code/).
kerem 2026-02-26 07:32:44 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 25, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:1909214345 --> @github-actions[bot] commented on GitHub (Jan 25, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@instantdreams commented on GitHub (Jan 25, 2024):

Issue is still relevant.

In the meantime, Traefik Hub with service discovery via labels provides configuration as code options.

<!-- gh-comment-id:1910521964 --> @instantdreams commented on GitHub (Jan 25, 2024): Issue is still relevant. In the meantime, Traefik Hub with service discovery via labels provides configuration as code options.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 13, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2472176966 --> @github-actions[bot] commented on GitHub (Nov 13, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Dec 1, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:3594244835 --> @github-actions[bot] commented on GitHub (Dec 1, 2025): Issue was closed due to inactivity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#1856
No description provided.