r/pihole • • 2d ago

Automatic HTTPS certificates and renewal for Pi-hole without a public domain

Post image

I've been working on Local HTTPS, previously known as Pi-hole HTTPS.

I originally built it to simplify HTTPS certificate management on my Pi-hole installation without needing a public domain or reverse proxy.

What it does:

  • Generates a local Root CA and HTTPS certificates.
  • Automatically configures HTTPS in Pi-hole.
  • Supports Pi-hole 6 (FTL) and older versions (Lighttpd).
  • Automatically renews and deploys certificates.
  • Supports local IP addresses, custom domains and Tailscale hostnames.

You only need to trust the Root CA on your devices once.

The project has recently expanded to support Technitium DNS, and the generated certificates can also be used with other local services, such as Grafana and Nginx.

It supports Debian, Ubuntu, Raspberry Pi OS and Armbian.

It's completely free and open source under MPL-2.0.

GitHub: https://github.com/luizbizzio/local-https

160 Upvotes

18 comments sorted by

31

u/mowdep 1d ago

Or you can ask for a wildcart cert and publish only local domain in you pihole. That you never leak your sub domains and you have a trusted LE cert

3

u/luizbizzio 1d ago

That's a good solution if you already own a public domain. The idea behind Local HTTPS is to avoid needing one at all, while also supporting direct access through private IPs and local domains like pi.hole.

1

u/mowdep 1d ago

Come on, a public domain cost around 10 buck a year...

5

u/luizbizzio 1d ago

It's not about saving $10. It's about not needing a public domain for something that is supposed to be local.

3

u/RedditWhileIWerk 1d ago • Bravo

that's where I'm at as well. I don't want to have to pay for a public domain to do LOCAL things, ffs.

2

u/mowdep 1d ago

Yeah sure what kind of problem undocumented will happen when people overlap public DNS record for their private stuff with perfectly secure gateway..

2

u/BlazingThunder30 1d ago

That's why .internal and .home.arpa. exist for local domain uses. Or a local subdomain on a public domain like OP doesn't want which is the best solution imo

10

u/thefcknhngryctrpillr 1d ago

This is a 10x better solution

1

u/tinycrazyfish 22h ago

If you don't own a domain, you could also get a certificate for your IP address, will work only for your public address though.

14

u/Graphical-Source5090 2d ago

How is this different than smallstep?

3

u/luizbizzio 2d ago

Smallstep is a more complete solution for managing certificates across multiple devices. Local HTTPS is mainly designed for smaller setups, with automatic HTTPS configuration and renewal for Pi-hole and Technitium, without needing a separate CA server running in the background.

8

u/Graphical-Source5090 2d ago

So more of a shell scripted openssl?

15

u/thefcknhngryctrpillr 2d ago

How was AI used to build your solution?

2

u/luizbizzio 1d ago

I used AI to assist with development, debugging, code reviews and automated tests.

7

u/Resistant4375 1d ago

The whole thing reeks of it

1

u/pobruno 16h ago

Neat project if you just want something quick for a single box, though it kinda feels like tackling TLS at the wrong layer

Baking cert generation and renewals straight into individual apps via shell scripts creates extra moving parts and hassle. Having to manually push and trust a self-signed Root CA on every phone and laptop is a pain, plus if that CA key ever gets compromised on the host, all your devices are exposed

Usually in a homelab, it's way cleaner to handle SSL at the edge with a reverse proxy like Caddy or Traefik using a DNS challenge, or just put everything behind Tailscale or WireGuard. That way your internal apps stay on plain HTTP, you don't mess with client cert stores, and it scales easily once you start spinning up more services.

2

u/luizbizzio 15h ago

I agree that a reverse proxy makes more sense for larger setups. The idea behind local-https is to provide a simpler option for people who don't want to set up a reverse proxy or use a public domain.

For Pi-hole and Technitium, the entire process is automated, including certificate generation, TLS configuration, permissions and renewal. You only need to trust the Root CA once on each device.

It's not meant to replace Caddy or Traefik, just to offer a simpler alternative.