Problems with server port

Hi, I am having an issue with the server port, the process I am doing is this

zrok reserve private localhost:25566 --backend-mode tcpTunnel --unique-name stefzzzfeb262024test
zrok share reserved stefzzzfeb262024test --headless
zrok access private stefzzzfeb262024test --bind

the command I use with my friends for them join to my minecraft server is this
zrok access private stefzzzfeb262024test

the problem is when they use the command they get other port

they get the same ip but with other port, it looks like this:, when it should be or (the problem I would like to solve)

I also want to say that yesterday it wasnt happening, it had happened a few times a time ago but I have never found a solution.

Hey again @stefzzzz! TCP port 9191 on the loopback (localhost) network interface is the default proxy port when you don't override it with --bind.

Your Minecraft guests can run the same command you did to change the port on their computer, e.g.,

zrok access private stefzzzfeb262024test --bind

This only changes their local proxy port, so it doesn't affect anyone else accessing your private share.

It's good for them to use Minecraft's default TCP port number when they run zrok access because that way Minecraft can "see" the server. I'm not even sure it's possible to tell Minecraft to look for a different port, so it may be necessary.

I wanted to ensure this worked so I tested it by running a Minecraft server in a Docker container like this.

# make a Docker network for the server
❯ docker network create minecraft                                                                                                                                                                                    

# run a server on the Docker network with domain name "minecraft-server"
❯ docker run \
    --detach  --restart "unless-stopped" \
    --name "minecraft-server" \
    --network "minecraft" \
    --env "EULA=TRUE" \

# reserve a zrok private share for the server targeting its domain name inside the Docker network
❯ zrok reserve private \
    --unique-name "kbmcsrv" \
    --backend-mode "tcpTunnel" \
[   1.009]    INFO main.(*reserveCommand).run: your reserved share token is 'kbmcsrv'                                                                                                                                

# run a headless zrok share in the same Docker network so it can reach the server
❯ docker run \
  --detach --restart "unless-stopped" \
  --name "zrok-share-minecraft" \
  --network "minecraft" \
  --volume ~/.zrok:/.zrok \
  --user "$UID" \
  openziti/zrok share reserved "kbmcsrv" --headless

# bind zrok access to the Minecraft port
❯ zrok access private "kbmcsrv" --headless --bind

Finally, in Minecraft Java Edition, I typed the IP address in "Direct connection" or "Add server" like Any guest of the server can use any bind IP starting with 127. as long as they use the same value for zrok access private and when connecting in Minecraft.

I left the server running for now in case you want to try connecting with the zrok access private command. :slightly_smiling_face: