NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
23.29k stars 2.7k forks source link

Change listen Port #675

Open michelkoeller opened 4 years ago

michelkoeller commented 4 years ago

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

Wadera commented 4 years ago

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
vvel0x commented 4 years ago

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.

mgutt commented 3 years ago

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:

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.

jqiuyin commented 2 years ago

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

github-actions[bot] commented 8 months ago

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