Confused on self-host setup

Hello, just want to preface that I'm pretty new to this whole networking thing so sorry if I make mistakes.

Context: I currently have local server pc running Ubuntu Server, and I have a minecraft server up and running on it using AMP (game server console). I am currently using playit.gg to tunnel so I don't have any open ports and its been working good, but latency is a little high so I found zrok. I found this video tutorial and github, but I don't want to be limited by an account so Im trying to self host zrok (also something for me to do lol). In the selfhost set up guide it says I would need:

  • a Linux server with a public IP
  • a wildcard DNS record like *.zrok.quigley.com that resolves to the server IP

So in my case my public IP is my router's IP, and I would need to create a dns record for that. How would I do that? Would I technically need to port forward to allow public traffic (in this case Oracle VPS) to flow from my public ip address to my local server ip address? A little confused on how this all works, thank you

Hi @calvinnguyenq, welcome to the community and to zrok!

If you're using an Oracle VPS, you want to use the vps IP. Not your home router. You'd assign your DNS entries to that IP.

I'm sorry but there's a lot of guides on the Internet for setting up dns and there's just too many variables for us to help here. Sorry :pensive: you need to pick a DNS registrar, and set that up.

It'll definitely be a bit of work for you to learn all you'll need to learn to get this setup, but it is worth it if you spend the time and energy!

With a VPS, you won't be doing port forwarding so to speak. You'll be installing zrok as a proxy. Kinda similar but you don't add rules to your router in this deployment mechanism.

I'm not sure if there's anything we can help with just yet.

Thanks for the quick reply, just to clarify, I can use the public ip and wildcard DNS record of my oracle vps to set up a self hosted zrok on my local server pc?

Not quite. Here's the cliff's notes of what you would do

  • Obtain a DNS zone you control
  • Assign wildcard DNS entry to the public VPS
  • Acquire a wildcard cert
  • Deploy zrok on the vps
  • Run zrok share locally (which will connect to your OpenZiti overlay, part of zrok) to share the server
  • Run zrok access somewhere publicly (the vps probably) to provide an IP address/port on the vps which your friends can use. This is effectively the same as port forwarding through your router without having to forward a port through your router
  • Alternatively, have your friends run zrok access on each of their computers and use a private share. This is (imo) the safest option, but since your friends would need to run zrok, it's more complex to orchestrate

I think that's the overall idea, lots of details obviously missing in there, but I think it's pretty close to the steps you'd take.

Note that if you use the public zrok access idea, I would honestly just use the public zrok.io infrastructure just because it's less work on you (and it's what that video demonstrates). Having your own instance of zrok though is quite useful for many reasons, so it might be worth it (and it's a leaning experience).

Glhf

Oh my mistake, I just reread what I asked and it was really dumb facepalm. Okay Im beginning to understand now, just a couple more questions:

  • Deploy zrok on the vps
    Are you referring to the zrok.exe or self host (or is that the same thing)?

  • Run zrok share locally (which will connect to your OpenZiti overlay, part of zrok) to share the server
    Same questions as above

Thanks for the help, really appreciate it!

Though you don't realize it yet, this is an overloaded question...

Self hosting zrok means running a full zrok instance. Frontend, controller, and OpenZiti overlay network.

However whether you self host your zrok instance or use zrok.io, you'll still need to run zrok again for the share and again for the access.

The same zrok binary is used for the frontend/controller. So the one zrok binary kinda "does all the things"

1 Like

Gotcha, make sense!

  • "Run zrok share locally (which will connect to your OpenZiti overlay, part of zrok) to share the server"
    Since the mc server is on my local server pc, if I went the self-host route, I will need to self host on that pc and then run zrok for the share, and oracle vps can run zrok to access that share. Does that mean I still have to open a port on the local pc to be able to self host zrok?

Actually I found this forum post that had you explain it: Zrok & Zrok's Public Share Firewall

Thanks again for the help!

Yep, you got it now. What you describe looks like this.

You run the zrok/openziti components and the zrok access on the vpc (the orange box). Mincraft users don't need zrok in this case as you have the open port on the vps which proxies/tunnels back through the zrok share running in the purple 'private' network where the mincraft server runs

"yes and no" you don't have an open port through your firewall but when you run your zrok share, technically you don't have an open port in your firewall but you'd have a public port on the vps that is effectively the same thing...

:slight_smile: i just saw your last reply, I was just about to hit reply on this one..

1 Like