Web TippsUse custom web fonts in Google Sheets charts(08.09.2026 um 17:05 Uhr)
Web TippsIntroducing the new 1Password App for Google Chat(08.09.2026 um 18:02 Uhr)
Web TippsUse custom web fonts in Google Sheets charts(08.09.2026 um 17:05 Uhr)
Web TippsIntroducing the new 1Password App for Google Chat(08.09.2026 um 18:02 Uhr)

🔧 Programmierung 🕛 vor 3 Monaten 3 Min Lesezeit
0

CLI wrapper for Cloudflare Tunnel with Zero Trust

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

I got tired of configuring Cloudflare Zero Trust manually, so I built a 15s CLI wrapper.

Every time I wanted to expose a new local service (like Grafana or a dev API) securely, the routine was always the same:

Open Cloudflare Dashboard.

Create a new Tunnel.

Configure Ingress rules.

Add a DNS CNAME record.

Switch to the Zero Trust panel.

Create an Access Application.

Set up an Access Policy to restrict access to my email.



It’s an amazing, enterprise-grade security stack, but doing this manually for the 10th time just to test something is an absolute UX nightmare.

I wanted something as simple as ngrok, but with Cloudflare's Zero Trust protection under the hood. Since I couldn't find a lightweight tool that does exactly this, I wrote zt in Go.



How it works

Now, when I need to share or expose a local service, I just run:



zt up grafana 3000



In about 15 seconds, it automatically handles the whole chain:



Creates the Cloudflare Tunnel.

Sets up DNS and Ingress.

Locks it behind Cloudflare Access (asks for email OTP by default).

Fires up cloudflared in the background and saves the state locally.



If I need it to be completely public (like an webhook endpoint), I just pass a flag: zt up api 8080 --public. If I want to share it with specific colleagues: --allow [email protected]



When I'm done, zt down grafana wipes everything clean and stops the process.



The Stack

It’s a single binary written in Go, using the official Cloudflare API package. Configuration and state are kept locally in ~/.zt-config.json and ~/.zt-state.json (secured with 0600 permissions).



I’ve been using it daily in my home lab and dev environment, and it has saved me hours of clicking through web UIs.



The project is completely open-source (MIT). If you're managing self-hosted apps or often need to expose local ports securely, feel free to check it out, open an issue, or drop a star!







GitHub logo



cloudflare tunnel zero trust UX







zt — Zero Trust tunnel manager



One command to expose a local service through Cloudflare Zero Trust.


CODE
zt up grafana 3000
# → https://grafana.yourdomain.com (ZT-protected, running in 15s)


What it does



zt up <name> <port> automatically:



  1. Creates a Cloudflare Tunnel

  2. Configures ingress rules

  3. Creates a CNAME DNS record

  4. Creates a Zero Trust Access application

  5. Starts cloudflared in the background

  6. Saves state locally


zt down <name> reverses all of the above.




Prerequisites




  • A domain on Cloudflare



Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
3 Quellen
Use custom web fonts in Google Sheets charts
2 Quellen
Introducing the new 1Password App for Google Chat
1 Quelle
Context-aware access controls are available for Gemini Enterprise in the Admin console
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten CLI wrapper for Cloudflare Tunnel with Zero Trust

Thematisch verwandte Begriffe: wrapper, Cloudflare, Tunnel, with · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...