nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

Change listen Port

Open michelkoeller opened this issue 5 years ago • 4 comments

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

michelkoeller avatar Oct 24 '20 21:10 michelkoeller

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

Wadera avatar Oct 27 '20 18:10 Wadera

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.

vvel0x avatar Nov 09 '20 18:11 vvel0x

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.

mgutt avatar Jun 22 '21 17:06 mgutt

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

jqiuyin avatar Jun 26 '22 09:06 jqiuyin

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

github-actions[bot] avatar Mar 24 '24 01:03 github-actions[bot]