# Self-Hosted Zrok with TCP/UDP support

**URL:** <https://openziti.discourse.group/t/self-hosted-zrok-with-tcp-udp-support/2218>\
**Category:** zrok\
**Created:** [March 6, 2024, 2:22pm UTC](https://openziti.discourse.group/t/self-hosted-zrok-with-tcp-udp-support/2218 "2024-03-06T14:22:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![offsetOP](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/offsetop/32/1830_2.png) [@offsetOP](https://openziti.discourse.group/u/offsetOP)\
**Post date:** [March 6, 2024, 2:22pm UTC](https://openziti.discourse.group/t/self-hosted-zrok-with-tcp-udp-support/2218/1 "2024-03-06T14:22:02Z")

</div>

I am a little confused about the documentation about the use of a self-hosted Zrok instance as I am a little new to networking concepts. For some context, I used to host my game servers on a local machine using Docker and I would setup reverse SSH tunnels to route traffic through a cheap Google VPS I had for free to expose the ports to the public. The issue now is that SSH doesn't support UDP (to my knowledge) so I found Zrok.

Could someone provide clarification if I could self-host Zrok on my Google VPS and be able to route my local machine network through it and essentially achieve the same functionality (TCP/UDP)? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![qrkourier](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/qrkourier/32/52_2.png) [@qrkourier](https://openziti.discourse.group/u/qrkourier)\
**Post date:** [March 6, 2024, 2:27pm UTC](https://openziti.discourse.group/t/self-hosted-zrok-with-tcp-udp-support/2218/2 "2024-03-06T14:27:33Z")

</div>

There's a more straightforward option than self-hosting your zrok instance that works with a cheap VPS to enable a TCP or UDP proxy (like a port forward).

On the VPS, you run this to expose your private zrok share on a public port:

```bash
zrok access private {token} --bind 0.0.0.0:4321

```

If the backend has mode `tcpTunnel` then it will open a TCP port, and a UDP port if backend mode `udpTunnel`.

Ensure the VPS's firewall allows the bind port you choose for the correct transport protocol: TCP or UDP.

---

<div class="post-metadata">

**Author:** ![chiappone](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/chiappone/32/2740_2.png) [@chiappone](https://openziti.discourse.group/u/chiappone)\
**Post date:** [October 16, 2024, 7:50pm UTC](https://openziti.discourse.group/t/self-hosted-zrok-with-tcp-udp-support/2218/3 "2024-10-16T19:50:07Z")

</div>

If we are self hosting, is it possible to set up a public tcpTunnel share?

---

<div class="post-metadata">

**Author:** ![michael.quigley](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/michael.quigley/32/1123_2.png) [@michael.quigley](https://openziti.discourse.group/u/michael.quigley)\
**Post date:** [October 16, 2024, 7:55pm UTC](https://openziti.discourse.group/t/self-hosted-zrok-with-tcp-udp-support/2218/4 "2024-10-16T19:55:37Z")

</div>

If you want to expose a `tcpTunnel` share publicly, you'll still use `zrok share private`, and you'll just run a `zrok access private -b <publicIp:port> <token>` on a machine with public internet access, and that will give you a "public" `tcpTunnel` share...

You can do that with either the service at [zrok.io](http://zrok.io), or with your own zrok instance. Either way, you'll need to run `zrok access private` on a machine connected to the internet.

Hope this makes sense.

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [October 16, 2024, 7:57pm UTC](https://openziti.discourse.group/t/self-hosted-zrok-with-tcp-udp-support/2218/5 "2024-10-16T19:57:49Z")

</div>

Q beat me to it. 🙂 If you're interested, i did a video on my own channel showing people how to do this with Minecraft -- if interested. Shows you how to do exactly what @michael.quigley stated but in video form.

[![](https://global.discourse-cdn.com/free1/uploads/netfoundry/original/2X/0/01c71e5c9ebc7fce6636b00ea5efa92db03f7bd3.jpeg "Public Minecraft Server without port forwarding") ](https://www.youtube.com/watch?v=Duz-ya_iwu4)
