Documentation

Getting Started

Build the installer, describe your machines in a configuration file, check it, and bring up a cluster.

What you'll need

  • One or more machines you can reach over SSH, with a user that has passwordless sudo. Exactly one of them will be the K3s server; the rest join as agents.
  • Unused disks, on any node that should offer storage. The installer only ever touches a disk that is demonstrably unused — see Storage.
  • A domain, if applications should be reachable from the internet, and a way for traffic to reach a gateway node — a public address, or a router forwarding ports.
  • Bun, to build the installer from source. The finished binary needs nothing.

Build the installer

The installer ships as a single executable. The manifests and values files under k8s/ are embedded in it, so the result runs on a machine that has never seen the repository.

build
$ git clone https://github.com/Mellow-Technology/community-cloud.git
$ cd community-cloud/installer
$ bun install
$ bun run build # every platform
$ bun run build linux # or a filter: linux, macos, windows, arm64, musl

Executables land in installer/build/. Every target cross-compiles from whatever machine you build on:

Target File
Linux x64 (glibc) community-cloud-linux-x64
Linux arm64 (glibc) community-cloud-linux-arm64
Linux x64 (musl/Alpine) community-cloud-linux-x64-musl
Linux arm64 (musl/Alpine) community-cloud-linux-arm64-musl
macOS Apple silicon community-cloud-macos-arm64
macOS Intel community-cloud-macos-x64
Windows x64 community-cloud-windows-x64.exe
Windows arm64 community-cloud-windows-arm64.exe

The examples throughout these docs call it community-cloud. To run from source without building, use bun run cc <args> from the installer directory.

Quick start

Four commands take you from nothing to a running cluster you can check on:

quick start
$ community-cloud # build a configuration
$ community-cloud preflight cc.config.json # check it could work
$ community-cloud install cc.config.json # build the cluster
$ community-cloud doctor cc.config.json # ask the cluster how it's doing

1. Build a configuration

Run community-cloud with no arguments and it walks you through describing your cluster — nodes, networking, storage, and packages — and writes cc.config.json. Run it again to edit an existing file, or jump straight to one section:

configure
$ community-cloud configure --section nodes

The file holds secrets — the cluster token, registry passwords, a Nebula API key — so keep it out of version control. See Configuration for every key it can contain.

2. Check it

preflight reads the configuration and connects to every node to say what would stop an install: no server, two servers, a missing token, a node that can't be reached, a gateway with no addresses. It changes nothing.

preflight
$ community-cloud preflight cc.config.json

3. Install

install builds the whole cluster, every node in lock step. Use --dry-run first to see every step without running any of them.

install
$ community-cloud install cc.config.json --dry-run
$ community-cloud install cc.config.json

If a step fails, every node stops at the same place. Fix the cause and run the install again. See Cluster Operations for how that works.

4. Check on it

doctor asks every node at once how it's doing, and compares the running cluster against your configuration file. It only runs checks that change nothing, so it's safe to point at a cluster people depend on.

doctor
$ community-cloud doctor cc.config.json

Deployment order

The installer works out most of the ordering for you. If you're applying pieces by hand, this is the order they depend on each other in:

  1. Provision nodes — preflight, then the base packages and K3s
  2. Networking — Cilium → Gateway API → the cluster Gateway → cert-manager
  3. Storage — TopoLVM and the StorageClasses → Garage
  4. CRDs — Webapp, Site
  5. Databases — CloudNative-PG → Redis
  6. Applications — Twenty CRM → Authentik → Mattermost → Headlamp
  7. Routes — Gateway API HTTPRoutes for each domain

Trying it locally

The repository includes a Vagrantfile describing a local development environment: three Ubuntu 24.04 VMs, each with three 25GB disks — enough to exercise multi-node installs and storage classes without any hardware.

vagrant
$ cd community-cloud
$ vagrant up