Skip to content

Repository files navigation

🏠 Homeserver

Your passwords, files and photos β€” on a machine you own, in a room you're standing in.

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.

License: MIT CI Release Go Platforms

Quick start Β· What you get Β· How it works Β· Backups Β· Documentation

The homeserver dashboard β€” tiles for every app

✨ Why

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?

πŸ” HTTPS that's real

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.

πŸ–₯️ A dashboard, not a shell

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.

πŸ’Ύ Backups that are tested, not hoped for

hsctl backup verify runs a five-check restore drill β€” including booting a real Vaultwarden image and proving a byte-identical SQLite round-trip, plus a WAL-loss regression test β€” against throwaway volumes, never your live data.

⚑ One command in, one command out

A prebuilt hsctl installs on x86-64 or arm64 (a Pi 4/5 on a 64-bit OS) with no toolchain β€” and sudo hsctl uninstall removes everything except your data and backups.


πŸ“¦ What you get

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
Install β€” hsctl install starts the HTTPS dashboard and prints the first-login details Settings β€” review the automatically detected server configuration
hsctl install output Setup wizard settings
Your logins β€” save the generated app credentials before starting Ready β€” live startup progress, then install the certificate on each device
Generated app logins Setup complete and certificate step
Admin β€” CPU/RAM/disk, SMART health, backup freshness, container control Command Center β€” every hsctl command as an explained card
Admin dashboard Command Center
Apps β€” switch any app on or off; its data is kept, so switching back on is instant Updates β€” newer app versions at a glance, routine ones applied in one click
Apps page Updates page
Backups β€” destination, retention, off-site replica, snapshots Drives β€” attached disks, one-click mount for backups
Backups page Drives page
Terminal β€” a real shell on the server, admin-gated Setup guide β€” the onboarding page you hand to a new user
Terminal Setup guide

πŸš€ Quick start

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: restic for backups, docker-buildx-plugin for hsctl updates, smartmontools for 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 install
What 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 tag

sudo 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.


🧭 How it works

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ 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-edge Docker 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 on 443), each with a tls internal certificate 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 ui binds 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 through host.docker.internal.
  • Start order is fixed in hsctl/internal/layout/layout.go: apps first, Caddy last; hsctl down reverses it.

More on the security posture: docs/security.md.


🧰 hsctl

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.


πŸ”„ Updating β€” and uninstalling

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.


πŸ’Ύ Backups

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 recovery

sudo 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.


πŸ“š Documentation

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)

🀝 Contributing

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 stack

See CONTRIBUTING.md for the details, and docs/adding-an-app.md if you're adding a service.

πŸ”’ Security

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.

Releases

Packages

Used by

Contributors

Languages