mc server via tunnels
trying to run a mc server. it runs fine locally, but putting it on a tunnel will give me this error. now sure what's wrong because cloudflare claims it's healthy
26 Replies
how are you trying to connect? You can't just use the public hostname if that's what you're trying
?tunnel-tcp
Cloudflare Tunnels use Cloudflare's proxy, which only supports proxying HTTP Traffic. If you want to use non-http applications over your tunnel, Cloudflare has a few other options:
For a few specific protocols such as SSH, RDP, and SMB, Cloudflare has guides for them here:
https://developers.cloudflare.com/cloudflare-one/applications/non-http/
For Arbitrary TCP like Minecraft, MySQL, and any other tcp application, Cloudflare has a guide here: https://developers.cloudflare.com/cloudflare-one/applications/non-http/arbitrary-tcp/
For Arbitrary UDP like Minecraft Bedrock, SMTP, and any other udp application, you will need to use Private Networking with WARP: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/private-net/connect-private-networks/
Please note for all of these except SSH and VNC which can be browser-rendered, you will either need to use cloudflared (Cloudflare's tunnel daemon) on the client machine running in the background or Private Networking with WARP, and have WARP installed on the client machine logged into your Zero Trust Team.
(tldr, each client has to install/run cloudflared or warp, could work for private servers though)
so do they all just need to have cloudflared running?
they all dont have cf accounts with sites
yes, running in the background whenever they'd want to play
they don't need cf accounts, but they would need to pass whatever access policy you setup (email totp, some other auth provider, etc)
noted
ill get back to you when i figure it out
i have cloudflared running and it still does not connect
i feel like im missing something super clear here
yea, the guide I linked goes over the exact command to run and such
oh i need to run the connect
i thought minecraft would just do that
you need a public hostname with tcp service pointing to the mc server, and then run
cloudflared access tcp --hostname tcp.site.com --url localhost:25565
, and on mc you'd want to connect via localhost:25565
(replace tcp.site.com with your public hostname)
oop and you need to create an access policy for the public hostname too, that guide mentions thatseems to be working with all of that, thanks
nice! yea it's a bit confusing, would be nice if the zt team made a guide just for mc one day
sorry for the ping @Chaika but do you know why one of my friends is seeing this
would have to show more context/entire output, looks like the hostname he specified in the access tcp command is wrong. If he's trying to connect to your mc server same as you, make sure he used the exact same command
oh good point he added https:// lmao
thanks
wait no nevermind he didnt
the output is
im running the exact same one and it woreks fine
and anothwer one of my friends is
that error is cloudflared saying "I tried to establish a websocket connection to minecraft.darkpixlz.com and I got this: "
was that same subdomain unproxied before or didn't exist at one point? Could just be DNS Cache
it didnt exist until tonight
i could ask him to flush his dns
hmm yea that's a very specific error too, could be firewall restrictions/restricted network stuff.
You might want to add an access policy to that hostname restricting access btw (or delete that screenshot for now). Just as a sanity test I tried on my end, and it established fine. So something more local/specific
yep will be adding an allowlist tomorrow
also he said flushing dns did not help and he reinstalled cloudflared
if he visits <the public hostname url directly> directly in his browser, does he see anything other then a blank page?
his vpn is working for now but i'll update here if something else goes wrong
also fyi whitelist enabled just now incase anybody else had any ideas