[GH-ISSUE #1674] Minecraft domain to server stream #1250

Closed
opened 2026-02-26 06:36:24 +03:00 by kerem · 2 comments
Owner

Originally created by @FurJorden on GitHub (Dec 22, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1674

Hello,

Is it possible to redirect an incoming domain for a Minecraft server like Test.domain.com:25565 to an internal ip like 192.168.2.15:25585?

With kind regards

Originally created by @FurJorden on GitHub (Dec 22, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1674 Hello, Is it possible to redirect an incoming domain for a Minecraft server like Test.domain.com:25565 to an internal ip like 192.168.2.15:25585? With kind regards
kerem 2026-02-26 06:36:24 +03:00
Author
Owner

@chaptergy commented on GitHub (Dec 23, 2021):

Yes and no. Routing based on the domain is only available for HTTP protocols or protocols which include SNI information, and not for TCP or UDP streams. Minecraft uses its own protocol based on TCP and does not include any SNI info. However routing based on ports is available. As long as you don't want multiple domains on port 25565, you can just use the port and ignore the domain (as long as the domain points to your npm instance). To do that you can create a stream host for port 25565 and forward it to your minecraft server (don't forget to expose port 25565 in your docker-compose as well).

More advanced routing like forwarding mc1.example.com:25565 to 1.2.3.4:25565 and mc2.example.com:25565 to 5.6.7.8:25565 is not possible for the reasons described above.

<!-- gh-comment-id:1000209426 --> @chaptergy commented on GitHub (Dec 23, 2021): Yes and no. Routing based on the domain is only available for HTTP protocols or protocols which include SNI information, and not for TCP or UDP streams. Minecraft uses its own protocol based on TCP and does not include any SNI info. However routing based on ports is available. As long as you don't want multiple domains on port `25565`, you can just use the port and ignore the domain (as long as the domain points to your npm instance). To do that you can create a stream host for port `25565` and forward it to your minecraft server (don't forget to expose port `25565` in your docker-compose as well). More advanced routing like forwarding `mc1.example.com:25565` to `1.2.3.4:25565` and `mc2.example.com:25565` to `5.6.7.8:25565` is not possible for the reasons described above.
Author
Owner

@operinko commented on GitHub (Dec 23, 2021):

You'd be better off using SRV records to point different MC domains to certain ports.
So:
_minecraft._tcp.name TTL priority weight port target

Example:
_minecraft._tcp.server 30 0 5 25585 server.example.com

That effectively makes it so that if you put in "server.example.com" in your Minecraft client, it looks up the SRV record and fetches the port from that (25585 in this case), without the need to specify it in the address field.

<!-- gh-comment-id:1000251510 --> @operinko commented on GitHub (Dec 23, 2021): You'd be better off using SRV records to point different MC domains to certain ports. So: `_minecraft._tcp.name TTL priority weight port target` Example: `_minecraft._tcp.server 30 0 5 25585 server.example.com` That effectively makes it so that if you put in "server.example.com" in your Minecraft client, it looks up the SRV record and fetches the port from that (25585 in this case), without the need to specify it in the address field.
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#1250
No description provided.