Live data from Hacker News

Show HN: Caddy 2

caddyserver.com

51–60 of 247 posts

Re: Show HN: Caddy 2

#51
post #33

I started using caddy v1 thanks to lightning-fast and simple TLS setup and extremely simple configuration in general, thanks to the excellent docs and handy plugins for common stuff like cors, rewrites and fastcgi. Shortly after upgrading to caddy v2, I switched to nginx, after spending way too much time trying to make sense of the new Caddyfile and docs (the thing I miss the most of the docs is the plugin list, alon…

As francislavoie said, the website with its nice one-click custom download page and list of registered plugins is a lot of work. It'll come, but it's not ready yet. Much like the v1 release 5 years ago where the interactive download page didn't come until about a year later, it'll take some time. Hopefully not a full year though. :) I've already got the new build server mostly written -- should be way faster.

Maybe this has changed since I looked at things yesterday, but I couldn't find a list of default plugins anywhere on the website, nor how to configure those default plugins. I think this is what the person you're replying to is talking about.

On the old site, there was a plugin documentation page that made it trivial to see what the plugins were called and what options they took.

I eventually asked my local copy of Caddy what plugins were available, which answered one of the two questions, but am I missing some kind of documentation page?

The interactive, custom build page is an unrelated, but also interesting topic. About a year ago, I was using abiosoft's Caddy Builder image to build a Caddy docker image with the plugins I wanted, but this no longer seems to work even for Caddy V1, and I don't think it has been updated for V2. It would be awesome if there were an official Caddy Builder docker image. Even if the website existed, I would still have to wrap that binary in a docker image somehow for my own use cases.

But, these are all just my personal opinions -- I'm sure you have your own priorities for the project, and I'm excited to see V2 has officially released!

Re: Show HN: Caddy 2

#52

I liked v1 a whole lot. I'm interested in v2, though I'm extremely skeptical of the additional complexity of the config adapter layer ( https://caddyserver.com/docs/config-adapters ) - I'm more or less sold on having an internal JSON structure with a DSL on top of it (allowing dynamic/programatic config is really interesting), but the idea of having _multiple_ different DSLs or config syntax bindings for it seems a b…

Don't worry about the "additional complexity" -- config adapters are modular, and only the Caddyfile adapter is baked into the standard modules. Just plug in the adapters you need. Caddy functionality can grow rather infinitely without bloat because of this.

Some adapters are 1:1 translations so they are just a few lines of code: https://github.com/caddyserver/json5-adapter/blob/master/jso...

True, the Caddyfile adapter is a bit of a beast because it is extensible itself -- but it's a lot cleaner and more flexible than the v1 implementation, where the Caddyfile was its native config syntax.

Believe me, this is a big improvement.

Anyway, you don't have to use the adapters if you don't want to. That's the beauty of it.

More info on the architecture and config adapters:

- https://caddyserver.com/docs/architecture

- https://caddyserver.com/docs/config-adapters

Re: Show HN: Caddy 2

#53

Earlier quoted context omitted.

Same here! We are huge fans of Caddy at Narration Box ( https://narrationbox.com ) and we are considering replacing NGINX completely in our Django production stack. (Currently we only use Caddy for development and staging) The author of Caddy, Matt Holt, is a really great person and is extremely responsive on Twitter and GitHub. Highly recommend checking them out.

I'm really curious your reasons / why you like Caddy over Nginx. Thoughts?

Nginx requires too much configuration. It is very brittle if you do not have a full time DevOps person monitoring things. E.g. for production web apps, take a look at the amount of tooling that has been developed to manage Nginx:

https://www.digitalocean.com/community/tools/nginx

https://github.com/yandex/gixy

This is not a criticism of Nginx per se, it comes from a time when Apache is the only other alternative and end-user UX is hardly priority. An analogy would be systemd and pm2, pm2 have few advantages over systemd on paper but in practice it has a much more pleasant UX and saner defaults even though it requires a separate installation on most servers while systemd is available by default. It is the difference between Heroku and AWS. For the 99th percentile of efficiency Nginx still beats Traefik and Caddy, but sometimes scaling servers is cheaper than hiring DevOps staff.

Re: Show HN: Caddy 2

#54
post #33

Earlier quoted context omitted.

As francislavoie said, the website with its nice one-click custom download page and list of registered plugins is a lot of work. It'll come, but it's not ready yet. Much like the v1 release 5 years ago where the interactive download page didn't come until about a year later, it'll take some time. Hopefully not a full year though. :) I've already got the new build server mostly written -- should be way faster.

Maybe this has changed since I looked at things yesterday, but I couldn't find a list of default plugins anywhere on the website, nor how to configure those default plugins. I think this is what the person you're replying to is talking about. On the old site, there was a plugin documentation page that made it trivial to see what the plugins were called and what options they took. I eventually asked my local copy of C…

> It would be awesome if there were an official Caddy Builder docker image

You're in luck! :D

https://hub.docker.com/_/caddy

Note that the v2 images were _just_ pushed a few minutes ago, so the description might still point to rc3.

See "Adding custom Caddy modules" on that page for instructions on how to use the `caddy:builder` image.

Re: Show HN: Caddy 2

#55
I just upgraded a server to Caddy 2 this past weekend. It's running a single WordPress site.

There were some gotchas in converting the Caddyfile to the new format, but I eventually sorted it out. Caddy 2's method of updating the config made the iteration process a lot faster.

Re: Show HN: Caddy 2

#56
post #33

Earlier quoted context omitted.

As francislavoie said, the website with its nice one-click custom download page and list of registered plugins is a lot of work. It'll come, but it's not ready yet. Much like the v1 release 5 years ago where the interactive download page didn't come until about a year later, it'll take some time. Hopefully not a full year though. :) I've already got the new build server mostly written -- should be way faster.

Maybe this has changed since I looked at things yesterday, but I couldn't find a list of default plugins anywhere on the website, nor how to configure those default plugins. I think this is what the person you're replying to is talking about. On the old site, there was a plugin documentation page that made it trivial to see what the plugins were called and what options they took. I eventually asked my local copy of C…

The new website does not yet have the ability to register plugins. I'm writing it -- I already have the new build server mostly written -- but like with v1, it may take a few months.

It's not worth delaying the release for that, especially when we have tools like xcaddy that make it easy to build Caddy with plugins, no need to touch any code: https://github.com/caddyserver/xcaddy

Right now, the process is: find a plugin you like, then run:

    xcaddy build --with 
But yeah, it will get easier with time. We'll get there.

Re: Show HN: Caddy 2

#57

and does it currently work with python apps that work via wsgi?

There's no wsgi transport built-in, we haven't found any golang libraries that let us do this yet. For now, until we find a solution, we recommend using something like gunicorn and use the `reverse_proxy` directive in Caddy to proxy to it.

Re: Show HN: Caddy 2

#58
I see a mention of using it as an ingress controller, but not much in the docs. Is there more details on this or is this better suited to run in a container as opposed to using nginx for that and leave the ingress to traefik/etc?

Re: Show HN: Caddy 2

#59
post #14

Hi HN -- this is what I've been working on for the last 14 months, with the help of many contributors and the backing of several sponsors. (Thank You!) Caddy 2 is a fresh new server experience. Some things might take getting used to, like having every site served over HTTPS unless you specify http:// explicitly in your config. But in general, it will feel familiar to v1 in a lot of ways. If you've used v1 before, I r…

Thanks for the great work - caddy is a much needed breath of fresh air in the server space.

One thing I stumbled upon the other day was that I (and google apparently, too) have trouble navigating the new website.

I find it much simpler to find relevant information on the old site.

Anyway, keep up the good work and stay healthy!

Re: Show HN: Caddy 2

#60

I see a mention of using it as an ingress controller, but not much in the docs. Is there more details on this or is this better suited to run in a container as opposed to using nginx for that and leave the ingress to traefik/etc?

We have an ingress controller plugin here: https://github.com/caddyserver/ingress

It's still very much a work-in-progress and could use help to complete.

Post reply on HN