Skip to content
SHC Docs

One node to build on

This ladder builds apps of your own, from one service to groups of members, one idea a page. An app needs only one node to run, so the ladder starts on one machine and adds more only where a page needs them: groups and drains, near the end.

Use one fresh Debian 13 machine with SHC installed and a root shell on it, with 2 CPUs and 8 GB of memory. Name it home01. It belongs to location home in cloud learn. Put your Pro licence file at ~/shc-license.token on it; the licence must cover four nodes, for the pages that add three more. P@ssw0rd is the example vault password throughout this ladder. Use the machine only for learning.

Initialize home01. shc init makes it a cluster of one node and installs the cluster’s own modules; on a node with 2 CPUs it skips openobserve, which needs 3, and says so.

home01
$ shc init --name home01 --cloud learn --location home --vault-password P@ssw0rd --yes
DNS ownership identity for this cluster: shc-05214cef, stored in dns.owner_id
backup repository key generated and sealed at vault backup/password
backup.password = ref+vault://backup/password
backup.repo is not set: shc backup create refuses until it is
warning: skipped 1 module, no node is big enough for them:
[X200916SYSCAP] module openobserve needs 3 CPUs for service openobserve but no node measured more than 2. openobserve was skipped. shc reconcile installs it once a node with the capacity has joined
installing modules postgres, keycloak, traefik for tenant "master"
[postgres] Healthy 1/1
✔ postgres-1 healthy
[keycloak] Healthy 1/1
✔ keycloak healthy
[traefik] Healthy 3/3
✔ forward-auth healthy
✔ traefik healthy
✔ traefik-init healthy
added repository shc from https://selfhostedcloud.org/apps/0.1/index.yaml
✔ initialized cluster on node "home01" with runtime docker

Install the licence. Unlicensed, the cluster stops at one node of two cores, and the pages that add nodes would be refused.

home01
$ shc license install ~/shc-license.token
...
$ shc node ls
...
$ shc ls
...

shc node ls lists the one node, and shc ls the cluster’s own apps, all in tenant master, the only tenant a new cluster holds. Add prod, the tenant your apps go in, and select it with shc ctx -t. Every later command on home01 then reads prod without naming it. --no-admin leaves the tenant’s Keycloak realm without users, since no page here signs anyone in. The realm finishes in the background.

home01
$ shc tenant add prod --no-admin
✔ created tenant "prod"
warning: keycloak realm provisioning still in progress
$ shc ctx -t prod
...
$ shc tenant ls
ACTIVE NAME DEPLOYMENTS
master 3
* prod 0

shc tenant ls marks the selected tenant with *. Leave prod selected.

Next: Your first app.