[GH-ISSUE #2542] [Feature Request] Allow fully custom configs (To allow stream SSL termination) #1776

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

Originally created by @devedse on GitHub (Jan 15, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2542

Is your feature request related to a problem? Please describe.
I would like to create a reverse-proxy for a TCP stream that is encrypted with a certificate. (E.g. the NNTP protocol does this).

Describe the solution you'd like
Basically create a 'stream' or something with a custom nginx config:

upstream stream_backend {
  server ********:563;
}

server {
  listen                563 ssl;
  proxy_pass            stream_backend;
  proxy_ssl  on;

  ssl_certificate /etc/letsencrypt/live/npm-9/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/npm-9/privkey.pem;

  proxy_ssl_protocols           TLSv1 TLSv1.1 TLSv1.2;
  proxy_ssl_ciphers             HIGH:!aNULL:!MD5;
}

Describe alternatives you've considered
I could run another Nginx host but I want to run everything in the nginx-proxy-manager

Additional context
By manually modifying the file: /data/nginx/stream/6.conf I was able to get this working. This however will break the next time I modify this through the UI.

Originally created by @devedse on GitHub (Jan 15, 2023). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2542 **Is your feature request related to a problem? Please describe.** I would like to create a reverse-proxy for a TCP stream that is encrypted with a certificate. (E.g. the NNTP protocol does this). **Describe the solution you'd like** Basically create a 'stream' or something with a custom nginx config: ``` upstream stream_backend { server ********:563; } server { listen 563 ssl; proxy_pass stream_backend; proxy_ssl on; ssl_certificate /etc/letsencrypt/live/npm-9/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/npm-9/privkey.pem; proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2; proxy_ssl_ciphers HIGH:!aNULL:!MD5; } ``` **Describe alternatives you've considered** I could run another Nginx host but I want to run everything in the nginx-proxy-manager **Additional context** By manually modifying the file: `/data/nginx/stream/6.conf` I was able to get this working. This however will break the next time I modify this through the UI.
kerem 2026-02-26 07:32:24 +03:00
Author
Owner

@devedse commented on GitHub (Jan 31, 2023):

Any way this could be implemented?

<!-- gh-comment-id:1410036352 --> @devedse commented on GitHub (Jan 31, 2023): Any way this could be implemented?
Author
Owner

@simqui commented on GitHub (Feb 4, 2023):

See:
https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1829

<!-- gh-comment-id:1416790632 --> @simqui commented on GitHub (Feb 4, 2023): See: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1829
Author
Owner

@devedse commented on GitHub (Feb 4, 2023):

@simqui , ah nice. I hope either that one or just support for custom configs van be implemented.

<!-- gh-comment-id:1416800573 --> @devedse commented on GitHub (Feb 4, 2023): @simqui , ah nice. I hope either that one or just support for custom configs van be implemented.
Author
Owner

@amoshydra commented on GitHub (Feb 14, 2023):

It is possible to use custom stream config by writing into data/nginx/custom/stream.conf

This is the content of my stream.conf

upstream dns-servers {
    server    192.168.0.2:53; # IP to my DNS server 
}

server {
    listen 853 ssl;
    proxy_pass dns-servers;

    # using existing cert
    ssl_certificate /etc/letsencrypt/live/npm-1/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/npm-1/privkey.pem;

    ssl_protocols        TLSv1.2;
    ssl_ciphers          HIGH:!aNULL:!MD5;

    ssl_handshake_timeout    10s;
}

Reference:


if you are using docker-compose, make sure to add port 853:853 and run docker-compose up -d again

<!-- gh-comment-id:1430047264 --> @amoshydra commented on GitHub (Feb 14, 2023): It is possible to use custom stream config by writing into `data/nginx/custom/stream.conf` This is the content of my `stream.conf` ```ini upstream dns-servers { server 192.168.0.2:53; # IP to my DNS server } server { listen 853 ssl; proxy_pass dns-servers; # using existing cert ssl_certificate /etc/letsencrypt/live/npm-1/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/npm-1/privkey.pem; ssl_protocols TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5; ssl_handshake_timeout 10s; } ``` Reference: - nginx proxy manager document the usage of custom config here: - https://nginxproxymanager.com/advanced-config/#custom-nginx-configurations - https://github.com/NginxProxyManager/nginx-proxy-manager/blob/b9a6b5d4f5a192d390c3695a464ef2b5991e0914/docs/advanced-config/README.md#custom-nginx-configurations - technitium's guide for dns over TLS - https://blog.technitium.com/2018/12/configuring-dns-over-tls-and-dns-over.html --- if you are using docker-compose, make sure to add port `853:853` and run `docker-compose up -d` again
Author
Owner

@lesca commented on GitHub (Mar 9, 2023):

Using custom conf brings issues if the cert is changed, and somehow forget to update the custom settings. It could be a workaround but finally I expect the support from official, and within UI.

<!-- gh-comment-id:1461365395 --> @lesca commented on GitHub (Mar 9, 2023): Using custom conf brings issues if the cert is changed, and somehow forget to update the custom settings. It could be a workaround but finally I expect the support from official, and within UI.
Author
Owner

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

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

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

@github-actions[bot] commented on GitHub (Mar 16, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:2727129070 --> @github-actions[bot] commented on GitHub (Mar 16, 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#1776
No description provided.