Self-hosting ConfigHub Enterprise
This page describes what you need to run ConfigHub Enterprise in your own environment and how to install it.
Before you begin, read the Evaluation License if you do not yet have a commercial agreement with ConfigHub. Pulling the image is unrestricted; using the software is not.
Prerequisites
ConfigHub Enterprise runs on infrastructure and third-party software that you provide and operate. These are not part of ConfigHub Enterprise and are not covered by ConfigHub support.
- A Kubernetes cluster to run the ConfigHub server. For a first evaluation the installer can create a local cluster for you.
- A PostgreSQL database. ConfigHub stores all of its data in PostgreSQL. For a real deployment use an instance you manage, for example Amazon RDS, so that you own the data, the backups, and encryption at rest. The installer can bundle a database for evaluation.
- Keycloak 26.7, if your users sign in through your identity provider. ConfigHub brokers single sign-on through a Keycloak instance that federates to your identity provider over OpenID Connect or SAML. Run the upstream Keycloak image; ConfigHub does not distribute its own build. An evaluation install does not need it: the instance is created with a local administrator and a generated keypair.
- An ingress controller and TLS certificates for the ConfigHub endpoints, for anything beyond a local evaluation.
- Network access to a container registry, either
ghcr.iodirectly or a mirror you maintain.
Each release states the versions of these components it is tested against.
The image
The server is published as a multi-architecture image:
ghcr.io/confighubai/confighub:<version>
Pin an explicit version for a reproducible install. The latest tag moves with every release.
The image includes the license texts for all third-party components it contains, at /srv/app/THIRD_PARTY_LICENSES.txt, /srv/app/UI_THIRD_PARTY_LICENSES.txt, and /srv/app/OS_LICENSE_NOTICE.txt, and the Evaluation License at /srv/app/EVALUATION-LICENSE.txt.
Installation
ConfigHub Enterprise is installed with the cub server plugin, published as open source at github.com/confighub/cub-server:
cub plugin install confighub/cub-server
cub server install -i
With nothing else named, this creates a local Kubernetes cluster with kind, deploys ConfigHub and a bundled PostgreSQL into it, and signs you in as the local administrator; --kube-context installs into a cluster you already have. Install a Self-Hosted Server covers the plugin: a first look on a Mac without Kubernetes, the flags a cluster you run needs, secrets from your secret store, adding people, upgrading, checking an instance, and uninstalling.
Deploying from your own manifests
cub server install --dry-run writes the manifests to --out-dir and applies nothing. You can edit them for your cluster (namespace labels, storage classes, registry mirror, how Secrets are produced) and apply them with your own tooling. The instance then has no record under ~/.confighub/servers, and the commands for upgrading and single sign-on work from the cluster and your Keycloak instead.
The manifests are split into config/ (namespace, ConfigMaps, Deployments, Services) and secrets/ (the generated keys and passwords), so the secrets can go to your secret store and stay out of the repository you keep the rest in.
To pull from a mirror, pass --registry with its prefix; it must hold the server and UI images as <prefix>/confighub and <prefix>/ui. --registry gcr takes them from gcr.io/confighubapp, a copy of every release for networks that cannot reach ghcr.io.
Exposing the OCI registry
Besides its API, the server runs an OCI registry that GitOps operators pull Releases from. It listens on its own port, OCI_PORT (9092 by default). Clients have to be told the registry's address, which is usually not that port: it is wherever your load balancer or ingress exposes it. The server advertises that address in three places, and they always agree:
/api/info, asOCIHost,OCIPort, andOCITLS(whether the registry is reached over https).cubreads it from there.- The
OCIRepositoryURLof every Space and Release, whichcub variant create --targetandcub cluster attachwrite into the Argo CD, Flux, and Sveltos resources they generate, along with the operator's registry credentials. - The token realm in the registry's
WWW-Authenticatechallenge,<registry URL>/token. This is where an operator such as Argo CD exchanges its credentials for a token, so if it is wrong, pulls fail to authenticate even when the registry address is right.
Setting the registry's address
Set OCI_EXTERNAL_URL in the server's environment to the URL clients reach the registry at:
OCI_EXTERNAL_URL=https://confighub-oci.example.com
The port is optional and defaults to the scheme's (443 for https, 80 for http): https://confighub-oci.example.com:8443 puts it on 8443. The host, port, scheme, and token realm all follow from this one setting. It must be an http or https URL with no path; the server refuses to start with anything else.
The registry can have any name. It does not have to be oci.<API host>, so a sibling name that your DNS and wildcard certificate already cover, such as confighub-oci.example.com next to confighub.example.com, works.
The server reads OCI_EXTERNAL_URL from v0.10.4.
With the cub server plugin, pass the URL to the install:
cub server install --kube-context my-cluster --oci-url https://confighub-oci.example.com
It is written to OCI_EXTERNAL_URL in the confighub-env ConfigMap, so a --dry-run that you edit and apply yourself starts with it too. The install checks the URL as the server does, before it writes anything or creates a cluster. cub server install -i asks for it when installing into a cluster you already have. A re-run without --oci-url keeps the URL the instance was installed with, and passing it again replaces it.
Without a URL, an install sets OCI_EXTERNAL_PORT to the registry's NodePort. With one, it leaves OCI_EXTERNAL_PORT out, because that setting would override the URL's port. If you add OCI_EXTERNAL_URL to the ConfigMap by hand, remove OCI_EXTERNAL_PORT from it as well.
Three older settings override one part of the address each. Existing deployments that use them behave as before; new ones need only OCI_EXTERNAL_URL.
| Setting | Overrides |
|---|---|
OCI_EXTERNAL_HOST |
The host of OCI_EXTERNAL_URL |
OCI_EXTERNAL_PORT |
The port of OCI_EXTERNAL_URL |
OCI_TOKEN_REALM |
The token realm, <registry URL>/token |
When the address is not set
With none of these set, the server works the address out from each request, following the convention of the hosted service:
- Host:
oci.<host the request reached>, or the request's host itself when that is an IP address orlocalhost. - Scheme: https when the request arrived over TLS, or when a proxy says so in
X-Forwarded-Proto,X-Forwarded-Protocol,X-Forwarded-Ssl,X-Url-Scheme, orForwarded: proto=. Otherwise http. - Port: 443 over https, otherwise 9092.
- Token realm:
<scheme>://<host the request reached>/token.
Forwarded headers are believed only from a direct peer on a loopback, link-local, or private address, so a client that reaches the server directly cannot choose the address that is sent back to it. The host is taken from the Host header. To take it from X-Forwarded-Host or Forwarded: host= instead, set OCI_TRUST_FORWARDED_HOST=true. Set it only behind a proxy that overwrites those headers rather than passing a client's through.
Load balancers
An L7 load balancer or ingress controller (an AWS ALB, ingress-nginx, and so on) terminates TLS and sets X-Forwarded-Proto, so with the registry at oci.<API host> the defaults are right. For any other name, set OCI_EXTERNAL_URL.
An L4 load balancer (an AWS NLB, or a TCP passthrough) sends no forwarded headers. If it terminates TLS, every request reaches the server as plain http, and the server cannot tell that clients used https: it would advertise a port and token realm for http, and operators could not authenticate. Behind an L4 load balancer, always set OCI_EXTERNAL_URL.
Checking the address
See what the server advertises with:
curl -s https://confighub.example.com/api/info
cub cluster attach and cub cluster app-bootstrap print the registry URL before they write it into the operator's credentials and resources, and where it came from:
Registry the controller will pull Releases from: https://confighub-oci.example.com
advertised by https://confighub.example.com at /api/info as https://confighub-oci.example.com
If the cluster reaches the registry at another address, set OCI_EXTERNAL_URL on the ConfigHub server.
If that is not the address the cluster reaches the registry at, set OCI_EXTERNAL_URL on the server and run the command again. With a cub server install, re-run the install with --oci-url, or set it in the confighub-env ConfigMap and restart the server.
Upgrading
cub server upgrade plans an upgrade, and with --apply makes it, reading the instance from the cluster, so it works however the instance was deployed. See Upgrading in the guide.
Monitoring
The server records OpenTelemetry metrics and serves them in the Prometheus text format at /internal/metrics on the API port. cub server install --enable-metrics annotates the server's pod for a Prometheus that discovers pods by annotation. See Monitoring with metrics for the metrics and how to collect them.
Single sign-on
To let people sign in with their work accounts through your identity provider, see Single sign-on.
Production
Beyond exposing the OCI registry, running behind your own ingress with TLS and hardening the deployment for production are not yet covered here. If you are evaluating ConfigHub Enterprise for such a deployment, contact us and we will work through it with you.