HytaleTalk – Hytale Servers, Mods & Community Forum

Welcome to HytaleTalk — the community hub for all Hytale fans! You're currently viewing the forum as a guest. By creating a free account, you unlock full access: post your own topics, share creations, join discussions, and connect with other members through private messages. Ready to join the adventure?

  • HytaleTalk has a Discord now, bridged with the forum: server help, mod releases and new threads in one place. Link your forum account with /link once you are in. Join the Discord

Connect Hytale SRV record: let players join without typing a port (Update 8)

This thread is also on our Discord in #server-help. Replies here show up there, and members who linked their account with /link can answer straight from Discord.
Join
Hi Hytaler,

short answer: since the Update 8 pre-release (part 5, Nov 19) a Hytale server can be reached by hostname alone. You add a DNS SRV record called _hytale._udp and the client finds your port on its own. Players type play.example.com, not play.example.com:24000.

Right now this is pre-release only. Players need a client that has part 5 or newer, so for most people it starts working when Update 8 goes live. You can set the record up today though, it doesn't hurt anything.

From the official notes:

Hytale patch notes said:
Servers can now be reached by hostname alone through a _hytale._udp SRV record. When a player enters an address without a port, the client follows that record, so a server can use a custom port without players typing it.

When you need it​


  • Your server does not run on the default port UDP 5520. For example you have two servers on one box, or your host gave you a random port.
  • You want a clean address for your Discord, your server list entry or your website.

If you run on 5520 anyway, a normal A record is enough. Players type the hostname and the client uses 5520.

The record​


You need two things in your DNS:

  1. An A record (and AAAA if you have IPv6) for a hostname that points to the server's IP, for example node1.example.com → 203.0.113.10
  2. The SRV record that says "Hytale for this name runs on that host, on that port"

FieldValueNote
Name_hytale._udp.playfull name: _hytale._udp.play.example.com
Priority0
Weight5
Port24000your real server port
Targetnode1.example.coma hostname with an A record, not an IP
TTL3600lower it while you test

In zone file style:

Code:
node1.example.com.              IN A    203.0.113.10
_hytale._udp.play.example.com.  IN SRV  0 5 24000 node1.example.com.

The players then type play.example.com. Notice that play.example.com itself doesn't need an A record for this. The client asks for the SRV record of the name they typed.

Want it on your main domain (example.com without play.)? Then the SRV name is just _hytale._udp (the root of your zone).

Things that go wrong a lot​


  • Target is an IP. SRV targets have to be hostnames. Make an A record and point to that.
  • Target is a CNAME. Also not allowed by the DNS standard. Point to a name with a real A/AAAA record.
  • _tcp instead of _udp. Hytale runs QUIC over UDP, so it's _udp. Same reason you forward UDP and not TCP, see can't connect.
  • Your DNS panel adds the domain twice. Many panels want only _hytale._udp.play in the name field and add .example.com themselves. If you type the full name you end up with _hytale._udp.play.example.com.example.com. Check with the command below.
  • Port in the address. If a player types play.example.com:24000, the client uses that port directly. The SRV record is only used when there is no port in the address.
  • Proxy on. If your DNS provider has a proxy or "orange cloud" option, the A record of the target has to be DNS only. A web proxy doesn't forward game traffic.

Check it​


Linux / Mac:

Code:
dig +short SRV _hytale._udp.play.example.com
# 0 5 24000 node1.example.com.
dig +short A node1.example.com
# 203.0.113.10

Windows:

Code:
nslookup -type=SRV _hytale._udp.play.example.com

If that shows your port and host, the DNS part is done. If not, wait for the TTL or check the name for the double domain problem above.

The server side doesn't change at all. It still listens on its port, you still forward that port as UDP in your firewall and router.

Other connect fixes in the same part​


Part 5 also changed some things that help when players can't connect:

  • If a server's first address doesn't respond, the client tries the next one after about 5 seconds instead of 20
  • If looking up the address takes too long, the error now says so, instead of "server could not be found"
  • Fixed connecting to servers that transfer players to (or fall back to) a port above 32767

What the notes don't say: how the client handles several SRV records with different priority or weight. So for now I'd stick to one SRV record per name.

If you set it up and it works (or doesn't), post your result below. And if you still need a start script or firewall rules, the server setup generator does that for you 🙂

- BitaceS
 
Back
Top