[GH-ISSUE #675] Change listen Port #568

Closed
opened 2026-02-26 06:33:26 +03:00 by kerem · 6 comments
Owner

Originally created by @michelkoeller on GitHub (Oct 24, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/675

Hi,
I want to have multiple servers on port 25565 (Minecraft). But I can't change the listen port (the default is 80). When I change it under /data/nginx/proxy_host (and the .conf file) it resets every time. The best practice I find is, when you can include this in the UI. Then is the NPM perfect.
Thanks for this nice Tool. But I can't use it when I can't change the listen port.
With friendly greetings
Michel

Originally created by @michelkoeller on GitHub (Oct 24, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/675 Hi, I want to have multiple servers on port 25565 (Minecraft). But I can't change the listen port (the default is 80). When I change it under /data/nginx/proxy_host (and the .conf file) it resets every time. The best practice I find is, when you can include this in the UI. Then is the NPM perfect. Thanks for this nice Tool. But I can't use it when I can't change the listen port. With friendly greetings Michel
kerem 2026-02-26 06:33:26 +03:00
Author
Owner

@Wadera commented on GitHub (Oct 27, 2020):

I'm kind of lost. You have problem with change listen ports on your minecraft server setup or Nginx proxy?

If Minecraft - then we can't really help you directly (there is some workaround below).
If it's Nginx Proxy Manager issue - you need to be more clear with describing your issue ;)

If you spawning multiple VMs / Containers / Dockers on separate, internal IP addresses and all of them works on default port 80 - then solution will be Port Streams,

On your external IP you can listen on port 25555 and push it into internal IP and port (lets say: 10.20.0.1:25565)
Then next one: your external IP can listen on 25556 and push it into next internal IP and port (lets say: 10.20.0.2:25565)
etc

To get it work you need to setup 2 things:

  1. Put some range port forwarding on your router, let' say: 25555 - 25600 into your docker node machine
  2. Modify your composer build file to be able to listen on it:
root@myhost:/docker/composer-configs/proxy# cat docker-compose.yml
version: "3"
services:
  app:
    image: jc21/nginx-proxy-manager:latest
    restart: always
    ports:
      - 80:80
      - 81:81
      - 443:443
      - 25555-25600:25555-25600/tcp
      - 25555-25600:25555-25600/udp
...

And then rebuild your Nginx Proxy Manager docker:

# docker-compose down && docker-compose up -d
<!-- gh-comment-id:717448578 --> @Wadera commented on GitHub (Oct 27, 2020): I'm kind of lost. You have problem with change listen ports on your minecraft server setup or Nginx proxy? If Minecraft - then we can't really help you directly (there is some workaround below). If it's Nginx Proxy Manager issue - you need to be more clear with describing your issue ;) If you spawning multiple VMs / Containers / Dockers on separate, internal IP addresses and all of them works on default port 80 - then solution will be Port Streams, On your external IP you can listen on port 25555 and push it into internal IP and port (lets say: 10.20.0.1:25565) Then next one: your external IP can listen on 25556 and push it into next internal IP and port (lets say: 10.20.0.2:25565) etc **To get it work you need to setup 2 things:** 1. Put some range port forwarding on your router, let' say: 25555 - 25600 into your docker node machine 2. Modify your composer build file to be able to listen on it: ``` root@myhost:/docker/composer-configs/proxy# cat docker-compose.yml version: "3" services: app: image: jc21/nginx-proxy-manager:latest restart: always ports: - 80:80 - 81:81 - 443:443 - 25555-25600:25555-25600/tcp - 25555-25600:25555-25600/udp ... ``` And then rebuild your Nginx Proxy Manager docker: ``` # docker-compose down && docker-compose up -d ```
Author
Owner

@vvel0x commented on GitHub (Nov 9, 2020):

Hi,
I want to have multiple servers on port 25565 (Minecraft). But I can't change the listen port (the default is 80). When I change it under /data/nginx/proxy_host (and the .conf file) it resets every time. The best practice I find is, when you can include this in the UI. Then is the NPM perfect.
Thanks for this nice Tool. But I can't use it when I can't change the listen port.
With friendly greetings
Michel

Running a Minecraft server behind NPM requires the use of a stream host, not a proxy host.

<!-- gh-comment-id:724201792 --> @vvel0x commented on GitHub (Nov 9, 2020): > Hi, > I want to have multiple servers on port 25565 (Minecraft). But I can't change the listen port (the default is 80). When I change it under /data/nginx/proxy_host (and the .conf file) it resets every time. The best practice I find is, when you can include this in the UI. Then is the NPM perfect. > Thanks for this nice Tool. But I can't use it when I can't change the listen port. > With friendly greetings > Michel Running a Minecraft server behind NPM requires the use of a stream host, not a proxy host.
Author
Owner

@mgutt commented on GitHub (Jun 22, 2021):

Running a Minecraft server behind NPM requires the use of a stream host, not a proxy host.

@chaptergy
Is it possible to re-open this issue? Adding a stream host is not a solution, because:

  • no advanced rules like banning IP ranges
  • not possible to host multiple non-web applications if IPv6 is used as the router/firewall can't NAT the ports and the stream hosts do not check the used domain

I tried to add this to the advanced rules of a proxy host:
listen number_of_port;

It seems to work for some apps I tried, but not for Minecraft. Don't know why.

<!-- gh-comment-id:866201367 --> @mgutt commented on GitHub (Jun 22, 2021): > Running a Minecraft server behind NPM requires the use of a stream host, not a proxy host. @chaptergy Is it possible to re-open this issue? Adding a stream host is not a solution, because: - no advanced rules like [banning IP ranges](https://github.com/jc21/nginx-proxy-manager/issues/172#issuecomment-527418610) - not possible to host multiple non-web applications if IPv6 is used as the router/firewall can't NAT the ports and the stream hosts do not check the used domain I tried to add this to the advanced rules of a proxy host: `listen number_of_port;` It seems to work for some apps I tried, but not for Minecraft. Don't know why.
Author
Owner

@jqiuyin commented on GitHub (Jun 26, 2022):

Is there any progress on this issue? I would like to get this feature

<!-- gh-comment-id:1166474865 --> @jqiuyin commented on GitHub (Jun 26, 2022): Is there any progress on this issue? I would like to get this feature
Author
Owner

@github-actions[bot] commented on GitHub (Mar 24, 2024):

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

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

@github-actions[bot] commented on GitHub (May 4, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:2848914121 --> @github-actions[bot] commented on GitHub (May 4, 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#568
No description provided.