(lightweight) CaddyUI

Preface: As I just found this community and posting this, I see this very similar project: CaddyUI v2.4.3 — dashboard polish, smarter health dots, multi-host fixes - #11 by X4Applegate , not trying to steal credit I was simply unaware it existing until now. We both used Claude which delivered a similar look and feel. Interesting enough we both developed go web servers. The projects differ though almost as soon as they get started comparing them after the fact. I use data-star which handles routing a little differently. All responses stream back instead of traditional request/response format. I have also designed this project to have less functionality that what @X4Applegate included.


LLM Disclosure. I have been developing full stack web applications for almost 20 years, and learned much the hard way. I have also written a lot of technical documentation and articles meticulously by hand. In my day to day personal projects do use Claude, OpenAI, and occasional Gemini on Google to work as my assistants. I still take pride in being the system architecture that takes complete control over guiding and redirecting my tools when they start doing things I don’t want them to do. I am also odd that I read almost every line of code and output produced to get a good grasp of what is being produced and to use my experience to look for ways to improve the generative code and address security concerns. But I try not wasting my time writing by hand everything that a good assistant can write for me under close supervision.

As I am developing a new suite of services and web applications I have decided to use Caddy as our simplified Reverse Proxy service and have found it beyond capable of fulfilling our needs.

For the last 2 weeks I have been managing my CaddyFile with nano direclty on my server, but am trying to develop an ecosystem of tools that our team can continue to enhance to help collaborate and grow with. I was inspired by the Wright brothers who while building their flying machine discovered the need for a new propeller design, wind tunnel, custom built engine, and even spent time building garages to the finest detail of making their own needles when necessary. I try not to re-invent the wheel, but without finding what I was needing, I spent a half a day working to develop my own CaddyUI.

One of the latest adventures was attempting to convert JSON back to Caddyfile syntax even though I see in this community that it is “lossy” [ Is there any method to convert JSON files into cadyyfiles - #2 by francislavoie ].

Here is my repo for anyone who wants to check out an alternative CaddyUI: GitHub - Missions21-Ecosystems/caddyui at json-to-caddyfile · GitHub

Some of the [generated] README:

A lightweight web interface for the Caddy REST admin API.
Configure sites, reverse proxies, TLS, and more — no Caddyfile editing required.

Built with Go, templ, and Data-Star


…

UI Pages

Page What it does
Dashboard Caddy connectivity, loaded apps, upstream status
Config Fetch and edit the raw JSON config; load it back into Caddy. Includes an experimental → Caddyfile converter (see note below)
Routes View HTTP servers and routes; edit or delete routes in place
Reverse Proxy Live upstream table with request and failure counts
PKI / TLS View CA info and certificate chains
Config Builder Convert a Caddyfile to Caddy JSON using templates or your own input, then load in one step

:warning: Experimental — JSON → Caddyfile converter: The “-> Caddyfile” button on the Config page is a best-effort converter and is not intended for production use. Caddy has no native reverse-adaptation API, so the output is generated by pattern-matching common JSON structures. It handles the most common directives (reverse proxy, redirects, basic auth, handle_path, TLS transport) but complex or uncommon configurations may be incomplete or incorrect. Always review the output before using it as a real Caddyfile.

The Stop Server button in the sidebar sends POST /stop to gracefully shut Caddy down. There is no corresponding Start — once stopped, Caddy must be restarted through whatever process manager or shell controls it (e.g. docker compose restart caddy). Use with caution on remote servers.

4 Likes

Hey @amaster507 — welcome, and congrats on shipping! No worries at all about the overlap; two people reaching for Caddy + Go + a small web UI in the same month says more about Caddy than about either of us. I like that you kept yours deliberately lightweight — that’s a real design choice, not a lesser one, and the Data-Star streaming approach is interesting; I’ll take a look.

One thing from my side that might save you pain: I hit the same “JSON → Caddyfile is lossy” wall you linked. My way around it was to stop trying to reverse-adapt at all — when someone pastes a Caddyfile block, I keep the original text next to the adapted JSON and show the Caddyfile in the UI, so nothing is ever lost and users see the syntax they wrote. Your pattern-matching converter looks like a fair “best effort” for the other direction; just be ready for it to be a long tail.

Since we share a name, I’m happy to cross-link so people find the one that fits them — yours for a minimal admin-API front end, mine for the fuller control-plane / fleet side. And if you ever want to borrow anything (the health probes, the Caddyfile paste flow, the certificate lifecycle tracking), it’s all MIT — go for it. Feel free to ping me anytime.