Accessing Private TCP Tunnel Shares? (original) (raw)
December 5, 2025, 3:51am 1
Hi. Apologies if this has been asked before but I'm stumped. I've set up a private TCP Tunnel with a persistent unique name on my server computer. My client is a Raspberry Pi running 'zrok access private ' on startup. Everything works flawlessly and consistently, but in the API/browser dashboard where I see my connections, each time my client is powered off and restarted, i see a new branch off the client where the tunnel is accessed again. How can I configure my Pi to reuse the same access instead of duplicating a new access? It's not a major dealbreaker issue, but it'd be nice to not have a dashboard of 126765432 of the same dead access points all pointed in the same place. Is this something I've done wrong or is it a bug?
Note: The pi client is only powered off by a loss of power. Not sure of any way to close the connection securely before power is lost.
Hi @brennanjw04, welcome to the community and zrok! We're glad it's working fine for the most part.
It sounds to me like zrok just isn't cleaning itself up. When the shutdown isn't clean, the client doesn't get the chance to clean up after itself, leaving behind these dead accesses. I think there was a post a while back where you could script those removals, but I'm not 100%. I'm sure @michael.quigley will see this post at some point and give better insight. It'd be nice if the client were able to notice it didn't shut down cleanly and try to remove them on its own but I think that'd have to be some feature improvement later on. I'll add a link to your reddit post pointing here.
Hey @brennanjw04…
In the event of a power loss you’re going to have to manually clean up those accesses. Due to the way that zrok is designed, each zrok access creates a specific context for managing that access, and those are the things that you’re cleaning up. At some point in the future we might be able to consider adding “reserved” accesses, that re-use the same context each time, but for now you’re doing it correctly.
If you send SIGINT (Ctrl-C) to a running zrok access it reliably cleans up that context. If you shut the RPi down cleanly, I would expect that these things do get cleaned up for you.
Is there no way to cleanly shut down the RPi?