Skip to content

Configuration

The backend is configured via environment variables set in the Kubernetes Deployment manifest, with additional options for ingress, RBAC, and TLS.

The backend is configured via environment variables, typically set in the Kubernetes Deployment manifest.

VariableRequiredDefaultDescription
PORTNo8080HTTP server listen port
NAMESPACEYes—Platform namespace (e.g., ftn-ai)
APPS_NAMESPACEYes—Workloads namespace (e.g., apps)
JWT_SECRETYes—Secret for JWT signing
DB_HOSTYes—PostgreSQL host
DB_PORTNo5432PostgreSQL port
DB_NAMEYes—Database name
DB_USERYes—Database user
DB_PASSWORDYes—Database password
ADMIN_EMAILYes—Initial admin email
ADMIN_PASSWORDYes—Initial admin password
DOMAINYes—Base domain for generating workload URLs
VariableRequiredDescription
NEXT_PUBLIC_API_URLNoBackend API base URL (defaults to /api via proxy)

All workloads use Traefik ingress with the following URL patterns:

ResourceURL Pattern
Platform UIhttps://<DOMAIN>
Jupyter Notebookhttps://<DOMAIN>/jupyter/<name>/
MCP Serverhttps://<DOMAIN>/mcp/<name>/
Ollama APIhttps://<DOMAIN>/ollama/

Traefik uses priority annotations to ensure specific routes take precedence over wildcard routes. The platform automatically sets appropriate priorities when creating ingress resources.

The backend service account requires the following permissions:

rules:
- apiGroups: ["apps"]
resources: ["deployments", "statefulsets"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: [""]
resources: ["pods", "services", "persistentvolumeclaims", "nodes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: ["networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: ["metrics.k8s.io"]
resources: ["nodes", "pods"]
verbs: ["get", "list"]

cert-manager is recommended for automatic TLS certificate management. Configure a ClusterIssuer pointing to Let’s Encrypt and annotate ingress resources with:

cert-manager.io/cluster-issuer: letsencrypt-prod

For local development, use letsencrypt-staging or a self-signed issuer.