News for hackers. Stuff that matters.
Re:Show HN: Caddy 2 by nikisweeting on Monday May 04, 2020 @02:35PM (#23071610)
YESSS so happy there's now an apt install method:

    echo "deb [trusted=yes] https://apt.fury.io/caddy/ /" | sudo tee -a /etc/apt/sources.list.d/caddy-fury.list
    apt update && apt install caddy
Re:Show HN: Caddy 2 by jamieweb on Monday May 04, 2020 @07:46PM (#23074727)
Be aware that the [trusted=yes] config disables GPG signature verification for the repository, which does slightly break the security model of Apt (where repositories can be untrusted/HTTP-only as long as all packages are signed by trusted keys).

Unless I'm mistaken, a malicious package with the same name as a critical system package could be added to that untrusted repository by an attacker who had compromised it, and if the version number is higher than that of the 'official' package and your Apt priority config prioritises it, your system would download and install it without any verification.

This is a fairly niche attack vector that may not be considered a significant risk in some environments, but it's one to consider when establishing your threat model and risk appetite.

As a side note, it's worth noting that GPG signing packages is not a silver bullet either, especially if the signing keys and administrative access to the repository fall within the same security boundary (e.g. developer doing both from their PC without any segregation/sandboxing). However, it has proven to be a robust method so far, and definitely beats explicit [trusted=yes].

Re:Show HN: Caddy 2 by francislavoie on Monday May 04, 2020 @08:20PM (#23074943)
Yeah, we're aware. Unfortunately Gemfury doesn't support GPG signing yet (see https://gemfury.com/help/apt-repository#apt-setup) but we will set that up as soon as they do. Their service made it the easiest to get set up on short notice.
Re:Show HN: Caddy 2 by francislavoie on Monday May 04, 2020 @02:47PM (#23071772)
Yay!

That was my pet project for the past couple weeks, I'm so glad to see people appreciate it!

Re:Show HN: Caddy 2 by nikisweeting on Tuesday May 05, 2020 @11:58AM (#23081440)
Thank you so much for investing the time to do it, this was the only thing holding me back from using Caddy for everything over the last ~2 years. I know it's a painful process for Go packages in particular, but it's definitely worth it to be more easily installable for diehard apt users like myself.
Re:Show HN: Caddy 2 by jbverschoor on Monday May 04, 2020 @03:13PM (#23072086)
Yeah, not gonna use just any apt source. I'll pass.
Re:Show HN: Caddy 2 by francislavoie on Monday May 04, 2020 @03:39PM (#23072385)
You may already know this, but it's very tricky to package Golang projects in official debian repos because they require that every dependency be a separate package. This is a ton work both upfront and to maintain in the long-term, so we haven't made much progress on that front.

We'd love to get some help from people who are more comfortable with the debian ecosystem though! It's definitely something we want to achieve, but for the short term we had to make the decision to simply release the .deb via https://gemfury.com which provides us with free APT repo hosting for open source projects.

Re:Show HN: Caddy 2 by jbverschoor on Monday May 04, 2020 @04:22PM (#23072809)
So you’re saying that even if your app compiles to a single binary, that’s a requirement?

I understand why, but it’s indeed quite a pain.

Re:Show HN: Caddy 2 by francislavoie on Monday May 04, 2020 @04:27PM (#23072864)
Re:Show HN: Caddy 2 by thayne on Tuesday May 05, 2020 @02:26AM (#23077107)
Unless I'm missing something, that only says you need to package all dependencies if it is a library. Which means you could make a binary-only statically compiled package without adding a bunch of dependencies right?

Of course, that isn't helpful if you need to compile with extra plugins, but in that case you are probably using standard go tools and not apt packages anyway.

Re:Show HN: Caddy 2 by francislavoie on Tuesday May 05, 2020 @07:18AM (#23078763)
See https://github.com/Debian/dh-make-golang/issues/131

We were specifically told that we would need to have all our dependencies packaged. Debian needs to be able to validate that it was built entirely from source code from library packages, not from a binary built externally.

Re:Show HN: Caddy 2 by m_sahaf on Monday May 04, 2020 @03:25PM (#23072232)
It's not a random source. The package is created by the release script in Caddy's repo: https://github.com/caddyserver/caddy/blob/e051e119d1dff75972...

There's ongoing effort to package Caddy into Debian. Until then, this is the alternative as stopgap.

Re:Show HN: Caddy 2 by jbverschoor on Monday May 04, 2020 @04:20PM (#23072793)
Nowhere on the website old or new is any info available.

Thanks for pointing out

Re:Show HN: Caddy 2 by m_sahaf on Monday May 04, 2020 @04:23PM (#23072828)
It's mentioned on the "Install" page in the "Documentation" part of the website https://caddyserver.com/docs/install#debian-ubuntu-raspbian :)
Re:Show HN: Caddy 2 by jbverschoor on Monday May 04, 2020 @04:49PM (#23073079)
I swear I couldn't find that page... been looking for half an hour.
Re:Show HN: Caddy 2 by francislavoie on Monday May 04, 2020 @04:53PM (#23073110)
It's the second link in the top-left of the docs sidebar! I'm surprised you found that difficult to find.
Re:Show HN: Caddy 2 by Silhouette on Monday May 04, 2020 @09:17PM (#23075347)
That sidebar doesn't show on major landing pages, so it's not as silly a mistake as it might seem. I missed it for several minutes while looking around myself, as I started by following the prominent links on those landing pages. I only found the separate installation information page when someone else here helpfully linked to it.
Re:Show HN: Caddy 2 by mholt on Monday May 04, 2020 @09:24PM (#23075386)
Have you tried our site search? It's the same service that powers the HN search.
Re:Show HN: Caddy 2 by Silhouette on Monday May 04, 2020 @09:45PM (#23075501)
Honestly, I hadn't even noticed the search box. It appears in a slightly unusual place and styled sufficiently subtly that I totally overlooked it throughout my entire browsing session. (FWIW, this is on a very large and colour-calibrated monitor on my PC, so my experience here may not be typical.)

In case it's of interest, as a new visitor, I started browsing from your main v2 landing page, scanning down most of that information. Then I followed the prominent download and get started links near the top. I think I next went to the documentation area, and started browsing the links on the left, though I totally missed the "Install" link just under "Welcome" because my eye was drawn first to the Tutorials section and its getting started link, and then I went exploring from there on down.

I suppose that was an unfortunate combination of two things to miss. :-)

Re:Show HN: Caddy 2 by jbverschoor on Monday May 04, 2020 @07:52PM (#23074771)
Yeah guess I should go and sleep