Hangar
Your own Vercel on a spare Linux box. Every push builds, passes a health check, and goes live with zero downtime.
- Role
- Solo, design and engineering
- When
- Oct 2026 – present
- Stack
- TypeScriptVue 3FastifyPostgreSQLDockerTraefikCloudflare TunnelTailscalePlaywright
- unit, integration and browser tests
- 165+
- unit, integration and browser tests
- containers run the whole platform
- 3
- containers run the whole platform
- command to install it
- 1
- command to install it
Hangar turns a spare Linux machine into a small, self-hosted deployment platform. Install it once, connect a GitHub repository in its dashboard (the Control Tower), and every push builds and deploys to its own address, with live logs, rollbacks and a public URL on your own domain. It's open source under the MIT license, and v0.3.1 is out.
You can try it without installing anything: the tour runs the real dashboard with sample data in your browser. Its website, hangar.benduffaut.com, is deployed by Hangar itself, from the same repository, like any other app.
It has an aviation personality: a deploy waiting its turn is Holding, building is Preflight, starting up is Taking off, and live is Airborne. The rule I set was to theme the copy, not the code. Every table, route and status in the code has a plain name, every themed word lives in one copy file, and the type system makes sure each one has a plain explanation next to it.
How a deploy flies
- Clone the exact commit. The GitHub token goes in a header through environment variables, so it never shows up in a URL, a command line or a log.
- Build with the repo's Dockerfile, or let Railpack detect the framework and build the image when there isn't one. Environment variables reach the build as BuildKit secrets, so they never end up in image layers.
- Run the new version in its own container, next to the one that's serving.
- Health check it for up to 60 seconds. If it crashes or never answers, it's removed and the old version keeps serving. A failed deploy never takes the app down.
- Switch traffic to it, confirm with the proxy that the new route is live, and only then stop the old container.
Every successful deploy keeps its image, so a rollback restarts an earlier version in seconds without rebuilding.
Postgres runs the show
The database is the single source of truth. Docker containers, the proxy's routing table and the Cloudflare tunnel are all projections of it, produced by one reconciler that converges the machine to what the database says. If Docker and the database disagree, the database wins.
- Job queue. Builds, rollbacks, polling and cleanup run as jobs in Postgres (pg-boss), so there's no Redis to install.
- Live updates. Log lines and status changes travel through Postgres
LISTEN/NOTIFYand stream to the browser over server-sent events. A viewer that reconnects picks up from the last line it saw. - Crash recovery. If the server dies mid-deploy, it marks the deploy interrupted on restart, removes stray containers, reconciles, and requeues what was waiting.
- One contract. Every endpoint's method, path and request and response schemas are declared once with Zod. The server registers its routes from it and the dashboard is typed from it.
Private by default
Each person runs their own Hangar, and its dashboard is private. The installer joins the machine to
the owner's Tailscale network and Hangar listens only there, at an HTTPS address like
hangar.tail1234.ts.net: reachable from all of their devices, anywhere, and from nobody else's.
There's no login page on the open internet to attack, and Hangar refuses any dashboard request
that arrives through the public tunnel.
The apps it deploys are the public part. They go out through a Cloudflare Tunnel on the owner's own domain, with HTTPS, no open ports on the router, and the home IP never in DNS.
An earlier version ran one central dashboard for many servers over an outbound WebSocket relay. I removed it in 0.3.0: a private dashboard per person is simpler to secure and simpler to explain, and nothing a person deploys depends on my server staying up.
Built for more than one person
- Invite-only accounts for family or a team, with sign in through a GitHub App, which only gets read access to the repositories each person picks
- Isolation between accounts: each one gets its own Docker network and its own build cache, so one person's apps can't reach another's or reuse their image layers
- Encryption at rest for every secret, and apps that can't reach the database at all
- Measured status: every public address is checked over the internet every minute, so the dashboard shows what's actually reachable, not what ought to be
The Control Tower
The dashboard is Vue 3 with an aeronautical-chart look: a navy night chart or a white day chart,
magenta as the one accent, and cockpit colors for statuses. Its home screen is a widget board
built on custom-dashboard-grid, my own grid library, and each
person's layout follows them to any browser.
Install and tests
One command installs it on Ubuntu (22.04 to 26.04) or Debian (12 or 13), amd64 or arm64. It
downloads the matching GitHub release, checks its checksum, installs Docker and Tailscale, and
prints the private dashboard address, a QR code for your phone and a one-time setup code. The whole
platform is three containers: the app, Postgres and a Traefik proxy. hangar-doctor checks
Docker, Tailscale, HTTPS, the tunnel and disk and explains what to fix, and there are commands to
update and remove it. The test suite covers the shared schemas and state machine, integration tests that deploy
real sample apps against real Docker (including one with a failing health check), and Playwright
tests of the main flows.