Install Self-Hosted Base on any Kubernetes cluster, on-premises or in any cloud, with your own PostgreSQL database and an S3-compatible object store.

Deploy on any Kubernetes cluster

This guide installs Self-Hosted Base on any conformant Kubernetes cluster, on-premises or in any cloud, with a PostgreSQL database and an S3-compatible object store you already run, such as MinIO, Ceph, or Cloudflare R2. Self-Hosted Base reads the store’s access keys from a Secret.

Prerequisites

  • A Kubernetes cluster, and kubectl and Helm 3 configured for it.
  • A PostgreSQL database the cluster’s pods can reach, with a user that owns it. For thousands of tasks at once, give it a connection limit of at least 300; see Sizing.
  • A bucket in an S3-compatible store, and an access key that can read, write, list, and delete objects in it.

Make the store reachable

The SDK uploads code and downloads outputs through signed URLs that point at the store, so the store’s endpoint must be reachable at the same address from inside the cluster and from your users’ machines. Use a DNS name that resolves in both places, such as the store’s public or corporate hostname, rather than a cluster-internal Service name.

Allow the UI to read the bucket

Give the bucket a CORS rule that allows GET and HEAD from the address your users open (see Bucket CORS). With the AWS CLI against an S3-compatible store:

cat > cors.json <<EOF
{"CORSRules": [{"AllowedOrigins": ["https://<host>"], "AllowedMethods": ["GET", "HEAD"],
                "AllowedHeaders": ["*"], "MaxAgeSeconds": 3600}]}
EOF
aws s3api put-bucket-cors --endpoint-url https://<store endpoint> --bucket <bucket> --cors-configuration file://cors.json

Some stores configure CORS differently, for example per deployment rather than per bucket; follow your store’s documentation.

Create the namespace and Secrets

Create the namespace and two Secrets: the database password, and the store’s access key:

kubectl create namespace union
kubectl -n union create secret generic selfhosted-base-db --from-literal=password='<database password>'
kubectl -n union create secret generic selfhosted-base-s3 \
  --from-literal=AWS_ACCESS_KEY_ID='<access key id>' \
  --from-literal=AWS_SECRET_ACCESS_KEY='<secret access key>'

Install Self-Hosted Base in a namespace of its own: task pods, their secrets, and the other Kubernetes objects created for tasks all live in it. Task pods get the store’s access key from the same Secret.

Install with the CLI

flyte install selfhosted-base, from flyteplugins-union 0.25.1 or later, checks the cluster, collects what the chart needs, and installs it with Helm (3.8 or later, on your PATH):

pip install flyte "flyteplugins-union>=0.26.2"
flyte install selfhosted-base -n union --db-host <postgres host> --db-name <database> --db-user <user> \
  --db-password-secret selfhosted-base-db --bucket <bucket> --endpoint https://<store endpoint> \
  --set storage.authType=accesskey --set storage.existingSecret=selfhosted-base-s3

The two --set flags hand Self-Hosted Base the store’s access key from the selfhosted-base-s3 Secret. Without them it uses the node’s or pod’s cloud identity (storage.authType: iam), which an S3-compatible store doesn’t have.

Before installing, it checks:

  • that the cluster is reachable and runs Kubernetes 1.28 or later;
  • the namespace, and whether you can create what the chart installs;
  • the permissions Self-Hosted Base itself needs;
  • the total allocatable CPU and memory of the nodes that accept pods, warning below 4 CPUs and 8 GiB. It doesn’t subtract what already runs there;
  • that the database host and the bucket are set, and that the database password’s Secret exists. It doesn’t connect to either;
  • with apps on, whether the chart can run Knative Serving or the cluster already runs it;
  • with the bundled image builder, that the namespace’s Pod Security level allows its privileged BuildKit.

Whatever is missing (the database host or password, the bucket, or what the storage type needs), with a terminal, it opens an editor on a values template to fill in. Without one, it lists the missing inputs. Inputs can also come from --values/-f files and --set, and --db-password-secret, --storage-type (s3, gcs, or azure), --region, --gcp-project, and --azure-account name the rest.

Flag What it does
--preflight-only Run the checks and stop.
--dry-run Render the install against the cluster without applying it.
--serving Turn on apps and LLM gateways.
--edit Review the inputs in the editor even when nothing is missing.
--skip-preflight Install even if a check fails.
-n/--namespace The namespace to install into (default union).
--organization The installation’s organization: the one you signed up as, which your license key names. Default onebox. Set it on the first install; an upgrade keeps it and refuses another. Requires flyteplugins-union 0.26.2 or later.
--release The Helm release name. Default selfhosted-base, which also names its resources; if the namespace already has a onebox release, the command upgrades that one. Requires flyteplugins-union 0.25.1 or later.
--version The chart version (default: the latest).
--kubeconfig, --context The Kubernetes configuration file and context to use.

It keeps the values it installed with in ~/.flyte/onebox/<release>-values.yaml (readable only by you, since it can hold the database password) for later helm upgrade -f runs. Then go on to Check it.

Install with Helm

To do the same by hand, save this as values.yaml:

database:
  host: <postgres host>
  port: 5432
  name: <database>
  user: <user>
  existingSecret: selfhosted-base-db
  # disable, require, verify-ca or verify-full
  sslMode: require
storage:
  type: s3
  bucket: <bucket>
  region: us-east-1
  endpoint: https://<store endpoint>
  authType: accesskey
  existingSecret: selfhosted-base-s3

Install the chart:

helm repo add unionai https://unionai.github.io/helm-charts
helm repo update
helm install selfhosted-base unionai/selfhosted-base -n union -f values.yaml --wait --timeout 10m

Check it

kubectl -n union port-forward svc/selfhosted-base 8080:80

Open http://localhost:8080/v2, and run a workflow as in Install the chart on k3d.

Anyone who can reach port 80 can use Self-Hosted Base until you put an authenticating proxy in front of it. See Authentication.

Serve under a path of a shared host

To serve Self-Hosted Base under a path of a host something else owns, such as https://platform.example.com/union/, set basePath. This works with any of the install guides:

basePath: /union

The UI is then at /union/v2, and the API, /login, and /logout are under /union. Point the SDK and CLI at https://platform.example.com/union. Each basePath segment must be a lowercase DNS label.

The proxy in front must:

  • forward /union/ to Self-Hosted Base’s Service with the path unchanged (with nginx, give proxy_pass no URI);
  • keep the Host header and set X-Forwarded-Proto;
  • pass WebSocket upgrades;
  • not buffer responses.

Apps can share the host too, each under its own path.

Settings to review

Setting Default When to change it
database.sslMode require disable for a database without TLS on a network you trust; verify-full to check the server certificate.
database.maxOpenConnections 40 Keep it under your database’s connection limit. 100 for thousands of tasks at once.
storage.region us-east-1 Set the region your store expects; most S3-compatible stores accept any value.
resources 1 CPU, 2 GiB requested 2 CPUs to accept more than about 32 runs a second quickly. The defaults run 4,000 tasks at once. See Sizing.
extraConfig.leaseworker.capacity 500 You want more than 500 tasks running at once. Set it to what your cluster can run.
networkPolicy.enabled On when authz.enabled is Needs a CNI that enforces NetworkPolicy. See Authorization.
caBundle Unset Your store, database, or identity provider uses a certificate from a private CA. See A private CA, extra mounts and proxies.
taskPods.extraEnv Unset Task pods reach the internet through an outbound proxy (HTTPS_PROXY, NO_PROXY).

Troubleshooting

Symptom Cause and fix
flyte run fails while uploading the code bundle The SDK can’t reach storage.endpoint from your machine. Use an endpoint that resolves outside the cluster too.
Tasks fail reading their inputs The pods can’t reach storage.endpoint, or the access key can’t read the bucket.
The Self-Hosted Base pod restarts with TLS errors from the database The database doesn’t offer TLS. Set database.sslMode: disable, only on a network you trust.
The Self-Hosted Base pod restarts with OOMKilled Its memory limit is too small for the actions in flight; 2 GiB holds about 13,000. Raise resources; see Sizing. Self-Hosted Base before 2026.11.14 needs about 1 GiB plus 1 MiB for each action queued or running.
Tasks stay queued while the cluster has room for them Self-Hosted Base runs at most 500 tasks at once. Raise extraConfig.leaseworker.capacity; see Sizing.