Skip to content

The service catalog

Services are the self-hosted building blocks of the network. They are enabled per host, in etc/config.yaml. The host profile does not matter.

Under a host’s services key, each entry enables a service. The (optional) value customizes it:

etc/config.yaml
services:
immich:
title: "Photos"
description: "My photos & videos"
domain: "photos" # service subdomain
global: true # → https://photos.domain.tld (public, no zone)
nextcloud:
domain: "cloud" # → cloud.<zone>.domain.tld (not global)
restic: # default values
FieldRole
(key)The service to enable (e.g. immich)
titleName displayed on the portal
descriptionSubtitle on the portal
domainSubdomain (default: service name). FQDN: <domain>.<zone>.domain.tld
globalExposes publicly via HCS: <domain>.domain.tld, without the zone (public DNS)
iconPortal icon

A zone service (not global) keeps its zone URL <domain>.<zone>.domain.tld and normally only responds on the LAN, other zones and the tailnet. Some services are additionally marked externalAccess in the framework registry (dnf/config/modules.nix) : the HCS then publishes them to the outside while keeping the zone URL.

Routing : internet → public DNS → HCS → (tailnet) → zone gateway → backend. The HCS terminates the public TLS certificate and relays the request to the zone gateway, whose own vhost handles SSO and the backend. Internal resolution is unchanged (direct to host/gateway).

Exposing a service…FlagResult
Publicly, entire networkglobal: true (per service, config.yaml)<domain>.domain.tld, no zone, served by the HCS
Publicly, keeping the zone URLexternalAccess (registry)<domain>.<zone>.domain.tld, fronted by the HCS
CategoryServices
Authenticationidm (Kanidm), vaultwarden
Files & cloudnextcloud, oxicloud, immich, garage, minio, nfs
Communicationmatrix, element, jitsi-meet, turn
Media & leisurejellyfin, mealie, geneweb
Productivityoutline, docs, searx
AIai (Open WebUI + Ollama)
Networkdnsmasq, adguardhome, headscale, tailscale, homepage
Developmentforgejo, harmonia, nix-cache
Monitoring & backupmonitoring, loki, restic
Systemfail2ban, postfix, printing, audio, home-assistant
  • Portal: the homepage service provides a services dashboard, per zone.
  • Single sign-on: most services go through SSO Kanidm.
  • Local or global: a service stays in its zone, unless global: true exposes it publicly.

Some services cannot follow nixpkgs’ default version : their editor forbids skipping a major version. DNF therefore pins the package in the module, and upgrades happen one major version at a time.

ServiceOptionUpstream constraint
idm (Kanidm)services.kanidm.packageOnly one version maintained, end of life 30 days after the release of the next one
nextcloudservices.nextcloud.package33 → 34 possible, 33 → 35 impossible

An upgrade to plan is signaled by a warning at evaluation, emitted as soon as the pinned version is deprecated. The detailed Kanidm procedure, transposable to the others, is described at the end of the SSO and identities page.

These migrations rewrite the database schema at the first startup of the new version, with no rollback. The prior backup is not a comfort precaution.

Kanidm stores in SQLite, so service stopped :

Fenêtre de terminal
sudo systemctl stop kanidm
sudo install -d -o kanidm -g kanidm /var/lib/kanidm/pre-upgrade
sudo cp -a /var/lib/kanidm/kanidm.db* /var/lib/kanidm/pre-upgrade/
sudo kanidmd database backup /var/lib/kanidm/pre-upgrade/dump.json -c /etc/kanidm/server.toml
sudo chown -R kanidm:kanidm /var/lib/kanidm
sudo systemctl start kanidm

The * is essential : the write-ahead log kanidm.db-wal survives the service shutdown and carries the latest transactions.

Nextcloud stores in PostgreSQL, so without interruption : pg_dump -Fc takes a consistent transactional snapshot on a live database.

Fenêtre de terminal
sudo install -d -o nextcloud -g nextcloud -m 0750 /var/lib/nextcloud/pre-upgrade
sudo -u postgres pg_dump -Fc nextcloud > /var/lib/nextcloud/pre-upgrade/nextcloud.dump
sudo cp -a /var/lib/nextcloud/config/config.php /var/lib/nextcloud/pre-upgrade/
sudo chown -R nextcloud:nextcloud /var/lib/nextcloud/pre-upgrade

Do not omit config.php : it carries the installed version number, without which a restored database does not restart.