Prerequisites
Set up your account, cluster, data stores, and network access before installing.Account and cluster
Prepare the account and infrastructure for the deployment.- A CostGraph account with an active self-hosted license.
- A deployment API key from Settings > API keys.
- A Kubernetes cluster,
kubectl, and Helm 3 or later. - A dashboard hostname, an ingress controller, and a TLS certificate.
costgraph-tls in the costgraph namespace.
Data stores
Use the following services for production. For an evaluation, the chart can run them inside the cluster.Network access
Allow outbound HTTPS on port 443 to the hosts your deployment uses.Outbound hosts
Outbound hosts
Mirror the public images to avoid the Docker Hub hosts. External inbound access is only required for Slack webhook mode.
Install CostGraph
Use Helm to preserve the deployment’s generated credentials across upgrades.Add the Helm repository
Add the repository and refresh its chart index.Configure the deployment
Save one of these configurations asmy-values.yaml. Replace the example key, endpoints, hostname, and TLS Secret with your own values.
- Existing services
- Bundled evaluation
Use the PostgreSQL, Redis-compatible, and VictoriaMetrics services you operate.Create the namespace if it does not exist.Store the full database connection URL in a Secret. URL-encode reserved characters in the password before adding it to the URL.Reference the Secret in
my-values.yaml.global.appBaseURL explicitly if TLS terminates before the ingress or you expose the services yourself. Its hostname must match the ingress when enabled.
Store production credentials
Reference Secrets you manage to keep production credentials out of Helm release history.Secret keys and registry access
Secret keys and registry access
Create these Secrets in the release namespace and reference them through the corresponding setting.
global.controlPlane.existingSecretreferences a Secret containingcontrol-plane-api-keyandpricing-api-key.global.postgres.existingSecretreferences a Secret containingpostgres-url, including the password.global.redis.existingSecretreferences a Secret containingredis-url.
global.controlPlane.existingSecret, create a registry pull Secret with the same deployment API key. Reference it through global.imagePullSecrets and each component’s deployment.imagePullSecrets. Follow Using your own registry credentials for the command and component configuration.Deploy the chart
Install the release in thecostgraph namespace.
Verify the installation
Wait for the backend rollout, then check database health. The doctor checks the database without making an outbound request.Create the first account
Open your dashboard URL, such ashttps://costgraph.internal.example.com, and select Create an account. Creating the first account also creates the organization and assigns you the owner role. Invite other members from Settings.
You do not need to configure sign-in. Accounts belong to this deployment, so you can reuse an email from another CostGraph account.
Connect your data
Choose the sources you want CostGraph to report on.Provider integrations
Connect cloud, database, AI, and developer-tool accounts.
Kubernetes clusters
Collect cluster costs and usage with the CostGraph Operator.
Virtual machines
Monitor virtual machines and bare metal with the CostGraph Agent.
Custom cost data
Push FOCUS data from other sources to your API.
Configure collector endpoints
Use your deployment’s hostname for collectors and API clients. Follow the URL format for each collector.- Kubernetes
- Virtual machines
- API clients
Install the operator in each cluster you want to monitor. Both URLs use the base address without For the cluster running CostGraph, you can instead enable the bundled operator. It uses the deployment’s internal service addresses.
/api/v1.Connect with OAuth
Register your own OAuth app for DigitalOcean, Akamai Cloud, Convex, or PlanetScale. Providers without configured OAuth credentials use the token form.Register an app and configure credentials
Register an app and configure credentials
- Create the app in the provider’s developer settings.
- Set its redirect URL to
https://costgraph.internal.example.com/integrations/oauth/callback, using your dashboard hostname. - Set
OAUTH_<SLUG>_CLIENT_IDandOAUTH_<SLUG>_CLIENT_SECRETon the backend. UseDIGITALOCEAN,LINODE,CONVEX, orPLANETSCALEas the slug. - Set
OAUTH_STATE_SECRETto a base64 value that decodes to at least 32 bytes.
my-values.yaml and upgrade the release.read_organizations, read_invoices, read_databases, read_branches, and read_metrics_endpoints. Reconnect existing PlanetScale connections after changing scopes.Connect GitHub for AutoPilot for CI
AutoPilot for CI needs a GitHub App that belongs to your deployment. GitHub sends workflow events to the webhook URL of the app itself, so the hosted CostGraph GitHub App cannot reach your deployment.Create the GitHub App and configure credentials
Create the GitHub App and configure credentials
- In your GitHub organization settings, create a GitHub App.
- Set its callback URL to
https://costgraph.internal.example.com/api/v1/automation/github/callbackand its webhook URL tohttps://costgraph.internal.example.com/api/v1/webhooks/github, using your dashboard hostname. Set a webhook secret. - Grant the repository permissions Actions (read and write), Administration (read), Pull requests (read), and Metadata (read). Grant the organization permission Administration (read). Grant Self-hosted runners (read and write) too when AutoPilot runs jobs on your cluster.
- Subscribe the app to the Workflow job event.
- Generate a private key and a client secret, and store the app’s settings in a Secret in the release namespace.
- Name the Secret in
my-values.yamland upgrade the release.
- Connect the organization on Settings > Integrations > GitHub.
- Set
api-urlto your dashboard address in each workflow that uses the CostGraph action, as described in AutoPilot for CI.
Price hardware you own
Register a rate and assign its pricing ID to hardware you own. Without a rate, CostGraph measures usage but cannot calculate its cost. Cloud resources use published provider rates. Follow Pricing IDs for rate registration, operator labels, agent configuration, and inheritance rules.Maintain the deployment
Keep the database and encryption keys backed up before making release changes.Back up the database and keys
Include the generated Secret in your database backups. Restore them as a pair so CostGraph can decrypt stored credentials. Export the Secret to your secure backup location.Upgrade CostGraph
Back up the database and generated Secret before upgrading. Migrations are not reversible, andhelm rollback does not restore the previous schema.
Refresh the chart index and upgrade the existing release in the same namespace.
Troubleshoot startup
Check licensing if the deployment cannot initialize or users cannot sign in. Collect diagnostics if the issue persists.License and sign-in errors
Check the hosted organization’s active plan if the backend reportsno active license for this organization. Use the organization that issued the deployment API key.
Auth UserPool not configured can mean the backend has not retrieved its signed configuration. Check the license and connection to the control plane. You do not need to supply Cognito settings.
Collect diagnostics
Run the doctor to collect version, schema, health, and redacted configuration details. The bundle excludes secrets and cost data.Next steps
Configure the components you need for your deployment.Values reference
Configure credentials, images, storage, and component resources.
Graph AI
Connect a model provider for your self-hosted assistant.
Workflows
Set up automation and execution environments.
Slack
Connect your deployment to your team’s workspace.