Managed service architecture

Replace the server. Keep the directory.

Cix owns directory entries and DNS records. Containers run the LDAP and DNS servers that publish them. DHCP peers keep a different kind of state on persistent volumes so leases can survive a container replacement.

The model

Control-plane data.
Workload-plane servers.

Cix does not hide five custom daemons inside the host. It owns durable configuration and lifecycle relationships, then registers ordinary containers running real upstream service software. Each container declares the services it runs; cix-init supervises them and reports service-level state back to the API. The API stays stable while a provider can be rebuilt, replicated, or replaced.

01 / INTENTAPI resourcesRecords, identities, ranges, forwarders, registrations, health and drain state.

render / synchronise

02 / PROVIDERDeclared servicesservices[] runs under freestanding cix-init; real upstream dnsmasq, glauth, chrony, and sysklogd are built through Cix recipes.

standard protocol

03 / CONSUMERHost + workloadsDNS, LDAP, DHCP, NTP, and RFC 3164 clients consume familiar protocols.

LDAP / identity/v1/ldap/users

One directory. Replaceable servers.

Cix is the durable source of truth for users, groups, IDs, bcrypt password hashes, SSH keys, group membership, and search capability. Register one or more running glauth containers and Cix renders the complete current directory into each provider’s config. Glauth’s watcher reloads records live; listener configuration is API-owned separately, including plain LDAP and opt-in LDAPS ports.

  • Human accounts remain API-managed records even if every LDAP container is rebuilt.
  • ldap_provision stages the container account and bind secret before its first process starts. Staged configuration files can reference the provisioned identity and secret.
  • ldap_client stages NSS/PAM configuration so workloads can authenticate users live through LDAP; allowed groups can restrict which identities may log in.
  • Host login uses the same directory: LDAP bind first when enabled, with local verification only as an availability fallback—not a second password truth. The daemon’s own LDAP bind can also be configured to use TLS.
  • Plain LDAP remains the default until an operator enables TLS. Turning LDAPS on changes the listener and client endpoint, and uses the delivered certificate identity; TLS is refused when a registered server has no certificate.
  • Listener changes can request a sequenced server restart, one provider at a time, so a plain configuration update does not unexpectedly interrupt directory service.
PKI / certificates/v1/pki/ca

Trust the chain. Keep the keys on the host.

PKI is a managed platform service: Cix bootstraps a root CA, can add a single intermediate tier, and issues leaf certificates for workloads. The two-tier chain is delivered into a container before its first process starts, so TLS services receive their identity as part of creation rather than through a fragile post-start patch.

  • pki_issue creates and delivers a container-owned certificate; a separately named certificate can be delivered when the identity must outlive a container replacement.
  • For a service reached through a DNS alias, set pki_names with pki_issue. You can add up to eight DNS names with their site-qualified forms. On the next create, Cix reissues the container-owned certificate if the requested names or addresses have changed. A separately supplied certificate stays under its owner’s control.
  • Issued certificates expose metadata and public certificate material through /v1/pki/certs; private keys are not returned by inspection endpoints.
  • New root CAs carry critical key usage for strict TLS clients; an existing root can be reissued with its own key through the CA reissue operation. The complete PKI store can be exported encrypted under an operator passphrase and imported into an install with no CA yet.
  • A deliberate reset regenerates the CA chain, reissues tracked leaves, and redelivers replacement certificates to live owners.

/v1/pki/intermediate/v1/pki/export/v1/pki/import/v1/pki/reset

DNS / naming/v1/dns/records

Records in Cix. Answers from dnsmasq.

DNS records and upstream forwarders are API-owned state. Registered dnsmasq containers receive the full current hosts and forwarding configuration through their own filesystem view, then reload on SIGHUP.

  • One update synchronises every registered replica. Providers resolve localhost to loopback locally and keep those queries off upstream resolvers.
  • dns_register can bind a workload’s lifecycle to its own DNS record.
  • dns provision creates replicas, registers them, resolves their real addresses, and configures the host resolver as one re-runnable API workflow.
  • Providers serve standard DNS; Cix does not hand-roll a DNS server.
DHCP / addressing/v1/dhcp

Shared leases. Coordinated failover.

Cix renders configuration for one ISC dhcpd server or a two-server failover pair. Both peers serve the range and share leases; the pair uses a ten-minute auto-partner-down timer and a one-hour maximum client lead time. Configuration changes restart pair members one at a time.

  • DHCP relays connect remote networks to registered servers.
  • Lease files live on volumes and survive container replacement.
  • Cix projects active lease names into DNS and removes expired names. Use the lease list to find the address assigned to a client on a relayed network.
  • Server and relay registrations survive container deletion until explicitly removed.
  • Reservations must lie outside dynamic pools.
Syslog / observability/v1/syslog/targets

Durable locally. Forwarded optionally.

Cix’s consolidated host log store remains the source read by the API and dashboard. Register a syslog container and every subsequent container-sourced log line is additionally emitted as a real RFC 3164 UDP datagram.

  • The durable Cix copy is retained even if forwarding fails.
  • Kernel, cixd, and audit records stay local; only container log lines enter this forwarding path.
  • The message carries the originating container name.
  • A syslog target never receives its own captured output, preventing a feedback loop.
NTP / time/v1/system/ntp

Containerised sources. Host-owned clock.

Running chrony containers can register as internal time sources. They serve time to other clients; the host synchronises only against configured external upstreams to avoid reading its own clock back. The final host clock change remains in cixd, because clock_settime() requires host-namespace authority that should not be handed into a container.

  • Registered providers are ordinary NTP servers for other workloads.
  • Host synchronisation uses configured external upstreams, automatically or on request. Registered NTP containers do not supply the clock to their own host.

One operational view

Health and maintenance across providers.

Cix tracks every registered LDAP, DNS, NTP, and syslog provider through one server-health resource. Health is observed; drain is operator intent and persists.

●ldap-1healthy · tcp:3893
●dns-1healthy · tcp:53
●ntp-1healthy · process
○syslog-2drained · maintenance

Unhealthy or drained LDAP providers are withheld from generated client configuration. If filtering would remove every provider, Cix retains the unfiltered list: a possibly unavailable server is better than deliberately configuring none. Individual declared services can also be started, stopped, or restarted without restarting their whole container.

Why the distinction matters

Which state belongs to the provider?

The host owns the resource model, synchronisation, and lifecycle integration. The service containers own their protocol implementations and, where correct, their live protocol state. That boundary keeps the host small, makes providers replaceable, and prevents duplicated sources of truth.

Read the service contracts