DEV Community

Tony Colston
Tony Colston

Posted on

1

how to run https and localhost with caddy2

Caddy alludes to this but due to reasons there is no example. And it took me a long while to figure it out.

If you run this command (on Windows at least)

caddy file-server --domain localhost
Enter fullscreen mode Exit fullscreen mode

The first time Caddy will add a cert to your machine and then you can run https://localhost in your browser. YAY!

Again it was not obvious from the documentation in any way shape or form that this is the right way to do it. I am not convinced this is what they intended but it works.

Top comments (0)

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay