Looking to self host zrok for web hosting purposes

I want to do the below and need guidance on it:

  • Publicly share my localhost web app/server to anyone I want
    • Point a custom domain I bought (mysite.com) to this localhost so the webapp can be accessed via the domain

Im most confused as to how to go about pointing my domain to the localhost forwarded by zrok. Note, Im completely new to this.

I would recommend starting out with getting to know how zrok works using the free service at zrok.io, first.

You should be able to get a better understanding of how zrok works, without the complexity of setting up the entire stack.

Start with simple public HTTP sharing, and then move on to more complicated scenarios.

1 Like

Solid advice to first learn the basics. Once you’re up to speed, this blog post should help with setting up your custom domain: zrok Custom Domains

Also the myzrok docs page: Custom Domains | zrok

Edit: fixed the second link

1 Like

Thank you. Can I follow these same 2 links for a self hosted zrok instance too? Or would it look different for self hosted zrok?

Sorry - I missed the self-hosted part. No. These docs are for the hosted zrok service. You’ll have to handle all of the DNS setup on your own when you self-host

(Welcome to the community, btw :slight_smile: )

1 Like

Thank you. Thats okay. How does that look like in practice though, is it as simple as managing dns records at a domain registrar? If theres too much to elaborate on in this case, I’ll move on and explore it further

Basically. It will vary depending on your DNS provider, who will likely provide the docs you need. It’s touched on (very lightly) in the video embedded in this self-hosting guide: Self-Hosting Guide for Linux | zrok

1 Like

Dns provider is namecheap. I watched the video you linked; I’m thinking simply changing/creating an A Record will do the trick? Even though he changed the nameservers as well :sweat_smile:

This link from namecheap walks you through your options depending on how you’re hosting zrok: https://www.namecheap.com/support/knowledgebase/article.aspx/9837/46/how-to-connect-a-domain-to-a-server-or-hosting/

1 Like

Perfect. This is similar to cloudflare, should work seamlessly. I must note that zrok will be hosted on premise on a raspi4, if there are any issues with that please let me know.

That should work. You'll create one "wildcard" DNS record that resolves all subdomains in your zrok DNS zone to your self-hosted zrok frontend, which could be the public IP of a VPS.

Assuming you are willing to install Docker, this is the most complete and automated full stack of Ziti+zrok: Self-hosting guide for Docker | zrok

When your zrok instance is up and running, you allocate public domain names by creating a reserved share with zrok. For example, if the DNS zone of your public frontend is *.example.com, and you reserve a public share with token "fancymittens" for the website running on your localhost, then its public domain name is fancymittens.example.com.