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
NAMESPACEYesPlatform namespace (e.g., ftn-ai)
APPS_NAMESPACEYesWorkloads namespace (e.g., apps)
JWT_SECRETYesSecret for JWT signing
DB_HOSTYesPostgreSQL host
DB_PORTNo5432PostgreSQL port
DB_NAMEYesDatabase name
DB_USERYesDatabase user
DB_PASSWORDYesDatabase password
ADMIN_EMAILYesInitial admin email
ADMIN_PASSWORDYesInitial admin password
DOMAINYesBase 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.