Hosting a minecraft server

Hey, I purchased a domain through Cloudflare and I'm looking to host a minecraft server through it. Since my ISP uses CGNAT, I cannot open ports to the public, so I thought Cloudflare Tunnel would be a good choice, but I can't get that to work with minecraft communicating through TCP (from what I've found). I'd like some help on how to setup this server for me and my couple friends, where I start the server locally and my friends just connect through the URL.
5 Replies
Laudian
Laudian4d ago
To play minecraft with tunnels, your friends will also need to install the tunnel.
Laudian
Laudian4d ago
Cloudflare Docs
Arbitrary TCP
Cloudflare Access provides a mechanism for end users to authenticate with their single sign-on (SSO) provider and connect to resources over arbitrary TCP without being on a virtual private network (VPN).
Cirax856
Cirax856OP4d ago
so I need to use warp? or is that the cloudflared access thing do you think there's some workaround where my friend doesn't need any setup? also it still doesn't work for me. what I've done is ran cloudflared tunnel --protocol http2 --url tcp://localhost:25565 run mc-server and started the minecraft serveron my host, and then cloudflared access tcp --hostname <domain> --url localhost:25565 on my client PC, but minecraft still says connection timed out. I tried both <domain> and <domain>:25565 in my minecraft client to connect
Laudian
Laudian4d ago
No. The clients connect to 127.0.0.1, not to your domain if you use the tunnel If you want the clients to use your domain, they need to install warp instead of the tunnel on their end. You also need a private network in that case, not a public hostname
Cirax856
Cirax856OP3d ago
alright, thanks so I can't use my public domain? okay, I ran into another problem, since I have my tunnel created locally, I cannot manage access in the dashboard and I cannot figure out a way to manage access locally, because my friend is getting a 443 error

Did you find this page helpful?