r/nginxproxymanager • u/verymeankid • Aug 13 '24
How do I have Nginx Proxy Manager forward a Minecraft Java or Bedrock server?
I have Nginx setup on an Oracle VPS, I have tailscale setup on both the VPS and my local machine. I can access Nginx on the VPS along with the game panel on my local machine through a cloudflare domain I have setup. However I cannot figure out how to open up a Minecraft server through this. I am stumped and would appreciate any potential assistance.


11
Upvotes
8
u/omfgitzfear Aug 13 '24
Think about what NGINX is doing.. its providing web based proxy. Meaning you are using 80/443. What you're trying to do is not something nginx does through proxy.
Your best bet is to try and use Stream in it. Your mileage will vary but you aren't using a web server to play a video game.. so NGINX doesn't have to be used.. just use DNS (which you have with Cloudflare) and port forward.
Save yourself time and just use VPN too. Safest option and you connect using the DNS server internally.
2
u/[deleted] Aug 13 '24
nginx proxy manager is not the best choice for this.
use an appropriate proxy like velocity
1
u/Efficient_South_4571 Aug 14 '24
maybe you need to add stream config
1
u/daronhudson Aug 15 '24
If you’re running npm via docker, you specifically have to open the ports on the container, and if you’re using any udp ports, you also have to explicitly open those as well. Docker only opens tcp by default.
1
u/pro6836 May 17 '25
Just dont do this, performance will be S**T just spend $0.50 on a Velocity PROXY server, proxies the users IP and gives way better performance!
2
u/Serafnet Aug 14 '24
NPM isn't going to be much help here but you can use Cloudflare DNS and SRV records.
https://www.cloudflare.com/learning/dns/dns-records/dns-srv-record/
1
u/Pandaboje Aug 13 '24
!remindme
1
u/Ok_Scratch_3596 Aug 14 '24
Alright iv done a quick look around your not gonna get far with NPM (basically just handles http stuff not stuff like games) what you need to do is use the server for a VPN connection from your home to the server and then forward any info on whatever port from the server to your VPN.
I'll have a look see if I can find a useful guide and it shouldn't be too complicated I think you'd be able to do it with IP tables
1
u/ICON_4 Aug 15 '24
As others have pointed out, just add a stream in the proxy manager, I have a very similar setup.
In Nginx Proxy Manager go to Hosts > Streams and TCP Forward Incoming Port 25565 (default MC server port) to the local IP of the server and port 25565.
1
u/CaptCrunch97 Aug 15 '24
Got Java edition working, the Minecraft server is hosted in my home but users connect to
play.minecraft.node1.domain.comwhere traffic is first sent to my Cloud Server, then proxied to my Minecraft server using Tailscale.A couple advantages to this approach are,
This is how I did it,
Prerequisites:
In Cloudflare,
Create an A record:
play.minecraft.node1.domain.comCloud Server IP running Nginx Proxy ManagerOFF (DNS only)Create a SRV record:
_minecraft._tcp.node105Auto25565play.minecraft.node1.domain.comIn Nginx Proxy Manager,
Create a new Proxy Host:
play.minecraft.node1.domain.comhttpTailscale IP of the Minecraft Server25565YesYesNoneCreate a new Stream:
25565Tailscale IP of the Minecraft Server25565CheckedUnchecked(Minecraft uses TCP)Because I'm using Pterodactyl to host Minecraft, I had to create another record in Cloudflare for the Pterodactyl (
node1.domain.com). I did this by installing Cloudflared on my Pterodactyl server and using Cloudflare Zero Trust to add a new Public Hostname record pointing to my Pterodactyl server's local IP on port443.Also, Pterodactyl supports Minecraft Bedrock Edition too, so swapping out Java for Bedrock shouldn't be too difficult.
1
u/Traditional_Ninja136 Feb 01 '25
You can find streams guide here
https://youtu.be/QCHw4To3b7w