A self-hosted stack for a home network: a password manager, cloud storage, a network
ad-blocker and a few web tools, all behind HTTPS. One Go binary β hsctl β sets it up,
runs it, backs it up, and serves a web dashboard, so the people you share it with never have
to touch a terminal.
Quick start Β· What you get Β· How it works Β· Backups Β· Documentation
Most self-hosting guides leave you with a pile of docker-compose.yml files and no answer for
the parts that actually matter: how does a family member get on it, is HTTPS real, and does
the backup actually restore?
|
Everything runs over HTTPS on your LAN, with no public domain. Caddy runs a private CA and issues real certificates for the server's IP. Install the root cert once per device and the browser padlock is genuine β which is what makes the Bitwarden and Nextcloud mobile apps agree to connect at all. |
Non-technical users get tiles for each app, a rendered setup guide they can follow themselves, and an admin area with system health, drives, backups, a command center and a real terminal. |
|
|
A prebuilt |
| Tile | What it is | Folder | URL |
|---|---|---|---|
| π Dashboard | Home page β links to everything | hsctl/ |
https://HOST |
| π Vaultwarden | Password manager (works with the Bitwarden apps) | vaultwarden/ |
https://HOST:8443 |
| βοΈ Nextcloud | Cloud file storage / photos / calendar | nextcloud/ |
https://HOST:8444 |
| π‘οΈ Pi-hole | Network ad-blocker (admin) | pihole/ |
https://HOST:8445/admin |
| π Stirling-PDF | Compress / merge / split / convert PDFs | stirling/ |
https://HOST:8446 |
| π§° IT-Tools | Converters, QR codes, hashes, imageβbase64 | it-tools/ |
https://HOST:8447 |
| πΌοΈ Image tool | Resize / compress-to-KB / convert (in your browser) | imagetools/ |
https://HOST:8448 |
| πͺ Caddy | The HTTPS front door β one cert per app | caddy/ |
β |
HOST = your server's LAN IP. The dashboard is built from
services.json, so adding or removing an app updates it automatically.
πΈ More screenshots β install, setup wizard, logins, admin, apps, updates, commands, backups, drives, terminal
You'll need:
- π₯οΈ a 64-bit Linux machine that stays on β x86-64 or arm64: a mini-PC, a NUC, or a Raspberry Pi 4/5 on 64-bit Raspberry Pi OS (Ubuntu/Debian assumed)
- π€ a user with
sudo - π³ Docker Engine + Compose v2 β
curl -fsSL https://get.docker.com | sh - π‘ a fixed LAN IP for the server (a DHCP reservation in your router)
- β optional:
resticfor backups,docker-buildx-pluginforhsctl updates,smartmontoolsfor disk health
Note
arm64 binaries ship with every release and every app image publishes arm64, but the stack hasn't been tested on real arm64 hardware yet. If you run it on a Pi, an issue saying how it went β either way β would be very welcome.
# 1. Install hsctl + the stack (prebuilt binary, no Go toolchain needed)
curl -fsSL https://raw.githubusercontent.com/Rishikesh01/homeserver/main/install.sh | sh
# 2. Start the dashboard as a service β it prints the URL and your admin password
cd /opt/homeserver && sudo hsctl installWhat the installer does β and building from source instead
It downloads the hsctl release binary for your architecture, checks it against the
release's checksums.txt, installs it to /usr/local/bin, and clones this repo at the
matching tag into /opt/homeserver, owned by your user (hsctl reads the compose files
from there at runtime). It starts nothing, writes no config, and runs once β it refuses
to touch an existing install; after that, app updates come from hsctl updates and the
dashboard. VERSION=, HOMESERVER_DIR= and PREFIX= override the release, the checkout
path and the install prefix β place them before sh
(curl -fsSL β¦ | VERSION=v1.8.0 sh); before curl they'd only reach curl.
To build it yourself instead β needs Go, see hsctl/go.mod for the version:
git clone https://github.com/Rishikesh01/homeserver.git && cd homeserver
make -C hsctl install # version stamped from the git tagsudo hsctl install is the last thing you type. It brings up Caddy (the HTTPS front door)
and the dashboard, then tells you to open https://HOST/ from any device on your
network. The first visit lands in a setup wizard: confirm the autodetected IP,
timezone, Pi-hole DNS address, and enabled apps; it generates every app's logins (shown
once β save them), then press Start everything. Startup progress remains available if
the browser briefly reconnects while images download, and the wizard finishes by walking
you through installing the certificate.
Tip
Prefer a shell? hsctl setup β hsctl up does the same β see docs/setup.md.
Important
Then, once per device: open http://HOST/, download homeserver-ca.crt, and trust it as a
certificate authority β otherwise browsers warn and the mobile apps refuse to connect. The
per-OS steps live in ONBOARDING.md, which the dashboard also serves at
https://HOST/help so you can just send someone the link.
Full walkthrough: docs/setup.md.
ββββββββββββββββββββββββββββ your LAN βββββββββββββββββββββββββββββ
β β
phone / laptop βββΌβββΊ :443 βββββββββ β
(trusts the β :8443β¦ β Caddy ββββΊ homeserver-edge (internal docker network) β
private CA) β βββββββββ β β
β β ββ vaultwarden ββ stirling-pdf β
β β ββ nextcloud-appββ it-tools β
β β ββ pihole ββ imagetools β
β βΌ β
β host.docker.internal βββΊ hsctl ui (host process, root) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- No app is published on the LAN. Every service joins the external
homeserver-edgeDocker network and Caddy reaches it by container name, so Caddy's HTTPS is the only way in and nothing serves plaintext HTTP. The exceptions are deliberate: Pi-hole's:53(that's the point of Pi-hole) and port:80, which serves the CA certificate download only. - One HTTPS port per app (
8443β8448, dashboard on443), each with atls internalcertificate carrying the server's IP in its SAN. - The dashboard runs on the host, not in a container β it manages Docker and offers a root
shell, so
hsctl uibinds only to loopback and the Docker bridge gateway, not the LAN (if the bridge can't be detected it warns and falls back to all interfaces). Caddy reaches it throughhost.docker.internal. - Start order is fixed in
hsctl/internal/layout/layout.go: apps first, Caddy last;hsctl downreverses it.
More on the security posture: docs/security.md.
sudo hsctl install Dashboard as a systemd service (+ first-install bootstrap β setup wizard)
hsctl setup Configure and generate each service's .env (interactive)
hsctl up | down | status Start / stop / inspect the stack
hsctl updates Check whether newer app images are available (read-only)
hsctl images Check every app image runs on amd64 and arm64 β this machine included
hsctl get-ca Write caddy-root-ca.crt to install on devices
hsctl ui Serve the web dashboard
hsctl secrets show Print the generated logins (read from the .env files)
hsctl apps [enable|disable NAME] List apps / switch one on or off (data kept; also Admin β Apps)
hsctl secrets rotate-vw-admin Generate a new Vaultwarden /admin token
hsctl backup config | init | run Configure / create / write to the encrypted repo
hsctl backup list | forget List snapshots / apply retention and prune
hsctl backup verify Self-test backup+restore on throwaway volumes
hsctl backup replicate Copy every snapshot to the off-site replica
hsctl backup restore [snapshot] Extract a snapshot (--into-volumes = one-command DR)
sudo hsctl uninstall Remove everything EXCEPT your data (--data / --all delete more)
Every one of these is also a card in the dashboard's Command Center, with an explanation and a Run button (uninstall stays terminal-only, deliberately). Full reference: hsctl/README.md.
Updates are pull-based and yours to schedule; nothing changes under you:
- Check and apply from the dashboard's Updates page (or
hsctl updates). Every app is compared against its registry; routine updates apply in one click. Major upgrades (a new Nextcloud or Postgres generation) are deliberately skipped there β try those in the sandbox first, then apply them one at a time. - Applied updates live outside git. The compose files pin images as
image: ${VAR:-default}; applying an update records the new pin in that app's gitignored.env. Your checkout stays pristine β no local drift, nothing to stash, nothing to commit. - Compatibility is checked, not assumed. The "Check app compatibility" card
(
hsctl images) asks each registry which processor types every pin publishes and confirms the whole stack runs on both amd64 and arm64 β including the machine it just ran on.
And if you're done, leaving is as safe as staying: sudo hsctl uninstall removes the
apps, their images, the services, the test sandbox, the generated secrets and hsctl
itself β but keeps your app data volumes and backups. Deleting those too is explicit
(--data for the volumes, --all for the backups as well) and always sits behind a typed
double confirmation.
Encrypted, deduplicated restic snapshots β the destination only ever sees ciphertext. A snapshot holds a consistent Postgres dump, a consistent Vaultwarden SQLite fileset, every data volume, and your config. Vaultwarden pauses for about a second so its database is captured cleanly; nothing else goes offline.
hsctl backup config --repo /mnt/restic # off the box: also sftp:, s3:
sudo hsctl backup init && sudo hsctl backup run
sudo hsctl backup verify # prove it restores β five checks, never touches live data
sudo hsctl backup restore latest --into-volumes # one-command disaster recoverysudo hsctl install also installs a nightly timer, switched on once backups are set up; the
dashboard shows the last run, flags a backup overdue after 36 hours, and can send a failure
alert. The repo is a vanilla restic
repository, so you can recover from any machine with the restic binary and the password β
no hsctl, no Docker, no this repo.
Details: docs/backup-restore.md.
| Doc | What's in it |
|---|---|
| docs/setup.md | Prerequisites, install, certificates, day-to-day, Pi-hole DNS |
| docs/security.md | Threat model, hardening, where secrets live, rotating passwords |
| docs/backup-restore.md | Backups, the verify drill, off-site replica, disaster recovery |
| docs/configuration.md | Every configurable value, in one place |
| docs/adding-an-app.md | Add your own service to the stack and dashboard |
| ONBOARDING.md | The page you hand to a new person or device |
| hsctl/README.md | hsctl command reference and the web admin pages |
| sandbox/README.md | The throwaway test sandbox (try updates and restores safely) |
Contributions are welcome. The short version:
make -C hsctl build # build
make -C hsctl vet # go vet, the integration tests included
make -C hsctl test # integration tests, in a throwaway Docker-in-Docker container
make sandbox # try changes in an isolated copy of the whole stackSee CONTRIBUTING.md for the details, and docs/adding-an-app.md if you're adding a service.
Warning
This is designed for a LAN only β don't port-forward it. The threat model and hardening checklist are in docs/security.md.
MIT Β© Rishikesh
The applications this stack runs (Vaultwarden, Nextcloud, Pi-hole, Stirling-PDF, IT-Tools, Caddy) are separate projects under their own licenses.











