Installation
This guide walks you through deploying MatrixHub in production. We support two official, production-ready installation methods: Docker Compose (for single-node hosts) and Helm Charts (for Kubernetes clusters).
đ System Prerequisitesâ
Before starting, ensure your target host/environment satisfies these requirements:
- Docker Compose Deployment: Docker 20.10+ and Docker Compose v2.0+ installed.
- Helm (Kubernetes) Deployment: Kubernetes cluster v1.19+ and Helm CLI v3.0+ configured.
- Database: An accessible MySQL database instance (v5.7 or v8.0). Note: Docker Compose and Helm default installations automatically spin up a built-in MySQL database.
đ Method A: Docker Compose Deploymentâ
Docker Compose is the easiest way to deploy MatrixHub on a standalone virtual machine or server.
1. Fetch Configuration Filesâ
Download the official deployment compose configurations:
docker-compose.yaml(Defines the API server and MySQL container configuration)config.yaml(Configures database DSN, log levels, and local storage bindings)
2. Start the Registry Serviceâ
Ensure both files are in the same directory and execute:
# Start all containers in background daemon mode
docker compose -f docker-compose.yaml up -d
3. Verificationâ
Check the running state:
docker compose ps
The API server will listen on local host port 3001 (http://localhost:3001).
â¸ī¸ Method B: Helm (Kubernetes) Deploymentâ
For enterprise-grade high availability, dynamic scaling, and direct cluster caching, install MatrixHub on Kubernetes using Helm.
Set the deployment environment variables first:
# Define your Helm chart target versions and target namespace
export CHART_VERSION=0.1.0
export NAMESPACE=matrixhub
Option 1: Install from OCI Registry (Recommended)â
Our Helm charts are securely published to GitHub Container Registry (ghcr.io) as OCI artifacts:
helm install matrixhub oci://ghcr.io/matrixhub-ai/matrixhub \
--version ${CHART_VERSION} \
--namespace ${NAMESPACE} --create-namespace
Option 2: Install from Local Chart Sourceâ
If you have cloned the source repository:
helm install matrixhub ./deploy/charts/matrixhub \
--namespace ${NAMESPACE} --create-namespace
đ Exposing the Serviceâ
1. ClusterIP (Default)â
By default, the service is only exposed within the internal Kubernetes network on port 9527. To access it externally for diagnostics, establish a port-forward:
export POD_NAME=$(kubectl get pods --namespace matrixhub -l app=matrixhub -o jsonpath="{.items[0].metadata.name}")
kubectl port-forward $POD_NAME 9527:9527 --namespace matrixhub
2. NodePortâ
To expose the registry permanently across all Kubernetes worker node IPs:
helm install matrixhub oci://ghcr.io/matrixhub-ai/matrixhub \
--version ${CHART_VERSION} \
--namespace ${NAMESPACE} --create-namespace \
--set apiserver.service.type=NodePort \
--set apiserver.service.nodePort=30001
đĻ Persistent Storage Configurationâ
MatrixHub uses standard PersistentVolumeClaims (PVC) to store cache data, fine-tuned weights, and MySQL database state.
By default, the Helm chart requests the following PVC resources:
| PVC Name | Mount Container Path | Default Size | Purpose |
|---|---|---|---|
<release>-apiserver-data | /data/matrixhub | 50Gi | Model files, artifacts, proxy cache |
<release>-mysql-pv-claim | /var/lib/mysql | 8Gi | Database states (when mysql.builtIn=true) |
Customize Storage Class and Capacitiesâ
To customize PVC claims according to your cloud provider's storage classes, pass overrides to your helm install:
helm install matrixhub oci://ghcr.io/matrixhub-ai/matrixhub \
--version ${CHART_VERSION} \
--namespace ${NAMESPACE} --create-namespace \
--set apiserver.storage.pvc.storageClassName=gp3 \
--set apiserver.storage.pvc.size=500Gi \
--set mysql.persistence.storageClass=gp3 \
--set mysql.persistence.size=50Gi
Use an Existing Pre-Provisioned PVCâ
helm install matrixhub oci://ghcr.io/matrixhub-ai/matrixhub \
--version ${CHART_VERSION} \
--namespace ${NAMESPACE} --create-namespace \
--set apiserver.storage.pvc.existingClaim=my-pre-provisioned-pvc