Live data from Hacker News

Lcl.host: fast, easy HTTPS in your local dev environment

anchor.dev

41–50 of 101 posts

Re: Lcl.host: fast, easy HTTPS in your local dev environment

#41
post #21

Why modify the trust stores with the personal CA? Is there any risk to just publishing a globally valid wildcard cert for *.lcl.host, since it always resolves to 127.0.0.1 anyway?

Some sites have tried this before, but I dont think they stay online long. The certificates are "leaked" when they are shared, so the CA will revoke them. I think a better approach is to get a domain name and a Let's Encrypt certificate. There's lots of tooling for this, and it matches production. I built https://www.getlocalcert.net/ to act as free, Let's Encrypt compatible subdomain service specifically for these s…

Cool. I was hoping something like this existed, and glad to see you got it into the public suffix list. I'd been considering doing something like it for some time.

Re: Lcl.host: fast, easy HTTPS in your local dev environment

#42

Warning: This checks if it’s running the latest version and refuses to run if it isn’t up to date. They just released v0.0.16 15 minutes ago and the update hasn’t hit Homebrew yet, so it has completely disabled itself and won’t run. There doesn’t seem to be any option to skip the version check. So don’t use this unless you don’t mind it breaking randomly whenever there’s an update.

Sorry about that, we're working on switching this to a warning and not an error, that slipped by us before release. After the next update, it will only show a warning if you're not on the latest release.

We just released a fix for the version error, this will be the last one you see, we promise!

Re: Lcl.host: fast, easy HTTPS in your local dev environment

#43
post #8

I don't see OrbStack mentioned here much, but it's completely replaced Docker Desktop for me. Aside from having a better UI, faster and uses less battery, it also gives local https with custom domains for free [0]. [0] https://docs.orbstack.dev/features/https

If you don't need a GUI, the following combo works pretty well:

- https://github.com/abiosoft/colima

- https://github.com/peterldowns/localias

Re: Lcl.host: fast, easy HTTPS in your local dev environment

#44
post #8

I don't see OrbStack mentioned here much, but it's completely replaced Docker Desktop for me. Aside from having a better UI, faster and uses less battery, it also gives local https with custom domains for free [0]. [0] https://docs.orbstack.dev/features/https

It looks nice, but it is MacOS only, and it is really expensive at $96 per year! Probably why it doesn't get mentioned often.

Re: Lcl.host: fast, easy HTTPS in your local dev environment

#46
Can you not use Letsencrypt locally? I think I actually saw something about that recently here on HN.

What is the difference between this and LE if true?

I would like to use a .test domain. I use that currently and just click "proceed anyway" whenever the warning pops up and It's pretty often lately.

Re: Lcl.host: fast, easy HTTPS in your local dev environment

#47

It surprises me how few people dev/test against HTTPS, given that it isn't exactly hard to setup manually (with tools like this making it even easier). Just point a wildcard DNS entry at 127.0.0.1 or some other useful address if your dev copy is actually not that local, and chuck a web server there acting as a proxy to what-ever apps, with a LetsEncrypt wildcard cert. It isn't zero work, but saves time in the long ru…

It is hard to set up. Creating a cert and trusting it is easy – a Powershell script can do that in 3 lines.

But then, trouble begins. You have to configure every server to use the certificate (or use a proxy) and every client to accept the certificate. Sometimes the proxies eat headers, or they have trouble with WebSockets and hot reloading or whatever.

We also use IPs instead of domains to find our locally running prod servers so that our customers don't have to configure anything DNS on their maybe-offline WiFi network. We also have to test with external devices, such as iPads. How do you automate getting your certificate onto them?

..And then your IP changes and all is lost again.

Yeah, if you have a 50 line Svelte "app" that you serve as site it's easy. But who does that?

Re: Lcl.host: fast, easy HTTPS in your local dev environment

#48

Warning: This checks if it’s running the latest version and refuses to run if it isn’t up to date. They just released v0.0.16 15 minutes ago and the update hasn’t hit Homebrew yet, so it has completely disabled itself and won’t run. There doesn’t seem to be any option to skip the version check. So don’t use this unless you don’t mind it breaking randomly whenever there’s an update.

Gross. Thanks for the heads up!

Not affiliated with them, but it seems this was a mistake. https://news.ycombinator.com/item?id=39768685 -- maybe give it another shot?

Re: Lcl.host: fast, easy HTTPS in your local dev environment

#50
I’m skimming the docs looking for how “in containers” is handled and so far I can only see a one liner in the release notes. One problem in local environments I keep having and building tricks for is for services inside containers getting certs for other containers. From within the container, resolving to 127.0.0.1 isn’t helpful as that’s the internal loopback not the host.
Post reply on HN