v1.0.0 released MIT · Rust · systemd

One way in.
Everything else stays shut.

Hearthgate is the single gateway between the internet and your home server. Publish the services you choose with automatic certificates. Reach the rest over the built-in WireGuard VPN.

$ curl -fsSL https://github.com/krotovic-com/hearthgate/releases/latest/download/install.sh | sudo sh

Linux with systemd on x86_64, ARM64 or ARMv7. The script checks the package against SHA256SUMS before it installs anything.

One static binary, built with musl x86_64 · ARM64 · ARMv7, Raspberry Pi included .deb · .rpm · .tar.gz with checksums nftables firewall, WireGuard VPN
Secure by default

Closed until you open it.

A fresh install exposes nothing to the internet. Each public port exists because a public interface asked for it, and every other port is dropped by the firewall. Hearthgate can always tell you why.

  • Ports nobody publishes stay closed, including ones that Docker published with -p.
  • Internal services stay reachable over the VPN at name.home.internal.
  • The dashboard only answers on your LAN and the VPN. It never gets a public port.
  • A firewall change that locks you out undoes itself after 60 seconds.
Ports on this gateway · example home serverhearthgate status
PortStateWhy
443/tcpPublicInterface web: cloud.example.com, media.example.com
Certificate renews in 58 days
80/tcpPublicRedirects to 443 and answers ACME challenges
51820/udpPublicWireGuard VPN, 4 peers
22/tcpVPN-onlyssh.home.internal
No public interface, so the internet can't reach it
7380/tcpLAN + VPNDashboard and admin API
3389/tcpClosedNothing listens here
Blocked 42 requests from 203.0.113.7 today
8443/tcpClosedPublished by a container, not by an interface
What's in 1.0

The reverse proxy, firewall, VPN and container manager, in one service.

Hearthgate replaces the usual stack of a proxy, a certificate tool, firewall scripts, a VPN server and a container UI. They share one configuration, so they can't disagree about what is open.

Expose

Publish exactly what you choose, with TLS handled.

Public interfaces

A domain plus public ports, TCP, UDP or both. Certificates from Let's Encrypt or any ACME CA are issued and renewed automatically, wildcards included through DNS-01.

cloud.example.com · 443/tcp · https

Routes and load balancing

Send a port to one or more services by host and path. Round-robin with weights, least connections or source hash, with active health checks.

web:443 → app-1, app-2 ×2

TLS your way

Terminate TLS in Hearthgate, or pass it through untouched by server name on the same port. Upload your own certificates if you prefer.

Router port forwarding

Optionally keeps your router's forwards in line with your public interfaces over UPnP or NAT-PMP, and warns you about double NAT.

Protect

Everything else stays shut, and you can see why.

Firewall and blocklists

An nftables firewall that closes every port no interface opens. Add your own rules, subscribe to blocklists, block countries and set rate limits per interface.

Automatic bans

Clients that probe closed ports or fail to log in collect points and get banned for a while. You set the threshold, window and ban time.

20 points in 10m → ban 1h

Reach

Get to every service from anywhere, without publishing it.

Built-in WireGuard VPN

Add a phone or laptop by scanning a QR code. Each peer reaches every internal service, or only the few you allow.

Internal DNS

Services resolve by name over the VPN, so you type nas.home.internal instead of remembering addresses.

ssh.home.internal → 10.0.0.5

Run

Manage the house from one place.

Managed Docker

Run containers and Compose stacks from Hearthgate, update them on request and read their logs. Routes reach them without publishing a single host port.

Web dashboard

Live health and traffic, two-factor login and API tokens. It answers only on your LAN and the VPN.

Revisions and rollback

Every change is a numbered revision with a diff. Changes apply within a second, without dropping open connections, and roll back just as fast.

CLI, API and metrics

A REST API with an OpenAPI document, a CLI for scripts, and Prometheus metrics. Notifications and backups are built in.

AI assistant coming next

Bring your own provider, such as Claude, Gemini, OpenAI or Ollama, to review rules and troubleshoot services. Suggestions wait for your approval, and logs are redacted before they leave the machine.

Notifications

Hear about certificate renewals, failing health checks, bans, backups and updates by email or webhook.

Dashboard

See what's open, what's healthy and who's knocking.

Edits go into a draft. You review the diff, then apply it as a new revision.

https://192.168.1.10:7380/
Overview

homeserver · Debian 13 · Hearthgate 1.0.0 · up 12 days

Run health check
Public interfaces41 needs attention
Services61 down · 5 running
VPN peers3 onlineof 5 devices
Blocked today1,284312 more than yesterday
Traffic, last 24 hours
Allowed requestsBlocked
13:0019:0001:0007:00now
Recent activity
13:21Blocked 42 requests from 203.0.113.7 to port 3389. Nothing listens there.
13:20minecraft exited with code 137 (out of memory).
13:02Peer "phone" connected over VPN from 5G.
12:30home-assistant restarted after failing its health check.
11:58UPnP refreshed port 51820/udp on the router.
09:15Certificate renewal for media.example.com failed: HTTP challenge timed out.
Needs attention
minecraft is down Down

Out of memory 4 minutes ago. Its memory limit is 1 GB.

Edit containerLogs
media.example.com certificate 6 days

Renewal failed. Expires in 6 days.

Fix renewal
home-assistant restarted 3× Unstable

Restarted at 08:12, 10:47 and 12:30 today.

View service
Gateway
Public IP
198.51.100.24 (stable 9 days)
Router
FRITZ!Box 7590 · UPnP allowed
Open on router
443, 80, 25565/tcp · 51820/udp
VPN
wg0 · 10.8.0.0/24
Internal DNS
home.internal · 9 names
Docker
27.3 · 6 containers
Host load
CPU 18% · RAM 6.6/16 GB

Example data, shown at the size of the Figma designs.

Or describe it in a file

Your whole gateway in one TOML file.

Validate it, apply it, and get a revision you can diff and roll back. The dashboard and the file are two views of the same state.

state.tomlexcerpt
[[interfaces]]
name = "web"
domains = ["app.example.com"]
listeners = [
  { port = 80,  mode = "http" },
  { port = 443, mode = "https" },
]

[[services]]
name = "app-1"
kind = "external"
host = "10.0.0.11"
ports = { http = 8080 }
health = { type = "http", path = "/healthz" }

[[routes]]
name = "app"
interface = "web"
listener = 443
strategy = "round-robin"
targets = [
  { service = "app-1", port = "http" },
  { service = "app-2", port = "http", weight = 2 },
]
terminalhearthgate 1.0.0
$ hearthgate validate state.toml
ok 3 interfaces, 5 services, 4 routes

$ hearthgate apply state.toml -m "load-balance app"
revision 43 (was 42)
+ route app: target app-2 weight 2
+ service app-2 (10.0.0.12:8080)
applied in 0.4 s, no connections dropped

$ hearthgate revisions
  43  load-balance app       just now
  42  route media            2 hours ago
  41  add jellyfin           yesterday

$ hearthgate rollback 42
revision 44 has the content of 42
applied in 0.3 s
Download

Install Hearthgate 1.0.0

Runs on Debian, Ubuntu, Fedora, RHEL, openSUSE and any other Linux with systemd. The binaries are static, so the archive works on any distribution.

  1. Install with the script or a package for your system.
  2. Print the setup code with sudo -u hearthgate hearthgate setup-code.
  3. Open https://SERVER-LAN-ADDRESS:7380/ from your network and create the admin account.

Prefer to build it yourself? Build from source with cargo build --release.

How to install
Architecture
install.shDetects your system and architecture
Download

Every file is listed in SHA256SUMS. Check yours with sha256sum -c --ignore-missing SHA256SUMS. All files are on the releases page.