I use Crafty Controller for Minecraft. I have a server running at 192.168.50.16:25540. I want it to resolve to minecraft.example.com. I have Nginx Proxy Manager setup for my domain and can access it from inside my network, but it’d be nice to be able to use a domain instead.

NPM only has options for http and https, so is this even possible using NPM?

EDIT: this is for only internal access I have external access via tailscale.

0 points

You need a public DNS record that points to your public IP of your server.

permalink
report
reply
1 point

it’d be nice to be able to use a domain instead.

If your looking to access it outside your LAN, you’re gonna want to open up the correct ports on your router’s firewall.

permalink
report
reply
1 point
*

No I’m not.

I have tailscale setup for external access. (I have dns records already in my domain provider pointing to a tailscale ip, so a device on my tailnet can access my domain. ie an authorized tailscale device can access nginx.example.com)

I want to know what I have to do to get minecraft.example.com to resolve interenally.

permalink
report
parent
reply
2 points
*

I have to admit, I’m a bit confused.

I have dns records already in my domain provider pointing to a tailscale ip

I want to know what I have to do to get minecraft.example.com to resolve interenally.

Since your domain resolves to an internal private Tailscale IP and your question is how to access using the domain, locally…. I feel like there’s an error in your architecture here. Wouldn’t any device that is on your Tailscale private network already have access using the domain name? If by “resolve internally” you mean hosts on your LAN, not connected to Tailscale scale? How would that be possible if it resolves to a Tailscale IP. If you have control of your DNS on your LAN, you could simply add an override and point it to the LAN address of the Minecraft server.

permalink
report
parent
reply
1 point
Deleted by creator
permalink
report
reply
1 point

NPM won’t help you here. As you said, it’s only for http. You will have to set up port forwarding in your router. But as far as I recall Minecraft changes its port with every game. So you could either change that in your router every time you start another game.

But it would be better (for security as well) to set up a VPN. Many routers actually have that built in.

That is, if your goal is to have your Minecraft server reachable through the internet.

For DNS you will need a Dynamic DNS service to let the name always point to your public IP. For this as well many routers have built-in functionality. Maybe even a preferred service.

permalink
report
reply
1 point

With Crafty you can bind a specific port.

I use tailscale for public access, and have set it up so tailscale users can access the domain.

I guess what I’m asking for is NPM but for tcp.

permalink
report
parent
reply
4 points

Regular nginx does this just fine https://docs.nginx.com/nginx/admin-guide/load-balancer/tcp-udp-load-balancer/

Keep in mind that you can’t route tcp by hostname, because hostname is not a property of tcp. It only knows IP addresses. Host routing requires a protocol like HTTP.

permalink
report
parent
reply
1 point
*

Port forwarding is what you’re looking for. You almost certainly can configure that in your router. You tell it what the port in the outside should be and to what IP and port in your LAN it should go.

Edit: Just saw your other comments. I’m a bit at a loss.

permalink
report
parent
reply
1 point
*
permalink
report
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 5.2K

    Monthly active users

  • 1.8K

    Posts

  • 19K

    Comments