MCPcopy Index your code
hub / github.com/distr-sh/distr

github.com/distr-sh/distr @2.25.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.25.0 ↗ · + Follow
3,273 symbols 11,237 edges 604 files 184 documented · 6%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Distr Logo

Distr

Software Distribution Platform

Distr enables software and AI companies to distribute applications to self-managed customers with minimal setup.

WebsiteQuickstartDocumentationBlogCommunity


GitHub Repo stars License Artifact Hub

Deployment Overview


Main features

  • Centralized Management: View & manage all deployments, artifacts, connected agents, self-managed & BYOC customers via the intuitive web UI
  • Deployment Automation: Optional prebuilt Helm and Docker agents manage deployments, collect logs and metrics, and allow remote troubleshooting.
  • White-label customer portal: Let your customers control their deployments or download your artifacts
  • License Management: Distribute specific versions of your application to specific customers
  • Container registry: Distribute OCI-compatible artifacts (Docker images, Helm charts, Terraform modules) with built-in granular access control and analytics.
  • Access the API using our rich SDK
  • Fully Open Source and self-hostable

Check out the hosted version at https://distr.sh/get-started/.

About

Distr is an Open Source software distribution platform that provides a ready-to-use setup with prebuilt components to help software and AI companies distribute applications to customers in complex, self-managed environments.

Use cases include:

  • On-premises, VPC and self-managed software deployments
  • Bring Your Own Cloud (BYOC) automation
  • Edge & Fleet management

Read more about Distr and its core concepts at https://distr.sh/docs/core-concepts/

Architecture overview

architecture-beta
    group ctrl(cloud)[Distr Saas or Your Cloud]
    service hub(server)[Distr Hub] in ctrl
    service db(database)[PostgreSQL] in ctrl
    service oci(database)[Distr OCI Registry] in ctrl
    service s3(disk)[Object Storage] in ctrl
    oci:R -- L:hub
    db:T -- B:hub
    oci:B -- T:s3

    junction customerjunction

    hub:R <-- L:customerjunction
    customerjunction:T -- B:agent
    customerjunction:B -- T:client


    group agentcustomer(cloud)[Customer Cloud]
    service agent(internet)[Distr Agent] in agentcustomer
    service app(server)[Your Application] in agentcustomer
    agent:L --> R:app

    group ocicustomer(cloud)[Fully self managed customer]
    service client(internet)[OCI client] in ocicustomer

Self-hosting

In case you get stuck, have questions, or need help, we're happy to support you, join our community forum.

Docker

The Distr Hub is distributed as a Docker image via ghcr.io. Check out deploy/docker for our example deployment using Docker Compose. To get started quickly, do the following:

mkdir distr && cd distr && curl -fsSL https://github.com/distr-sh/distr/releases/latest/download/deploy-docker.tar.bz2 | tar -jx
# make necessary changes to the .env file
docker-compose up -d

Kubernetes

Distr is also available as a Helm chart distributed via ghcr.io. Check out deploy/charts/distr for our Helm Chart source code. To install Distr in Kubernetes, simply run:

helm upgrade --install --wait --namespace distr --create-namespace \
  distr oci://ghcr.io/distr-sh/charts/distr \
  --set postgresql.enabled=true --set rustfs.enabled=true

For a quick testing setup, you don't have to modify the values. However, if you intend to use distr in production, please revisit all available configuration values and adapt them accordingly. You can find them in the reference values.yaml file.


Register your first account at http://localhost:8080/register

The full self-hosting documentation is at https://distr.sh/docs/self-hosting/

Using Distr agents on macOS? Follow the macOS guide to get started. Using Distr agents on Windows with WSL2? Follow the Windows WSL2 guide to get started.

Building from source

To build Distr Hub from source we recommend that you use mise to install all required dependencies, but you don't have to.

All dependency versions and build tasks can be found in the mise.toml file, for example:

# Build the control plane
mise run build:hub
# Build all docker images
mise run "docker-build:**"

Distr Integrations

Distr offers several ways to integrate with your existing tools and workflows.

Distr API

Distr provides a comprehensive REST API that allows you to manage deployments, artifacts, agents, licenses, and more programmatically. The full API reference is available at https://app.distr.sh/docs.

For further details on authentication and usage, see https://distr.sh/docs/integrations/api/.

Distr SDK

Interact with Distr directly from your application code using our first-party SDK. The Distr SDK is currently available for JavaScript only, but more languages and frameworks are on the roadmap. Let us know what you would like to see!

You can install the Distr SDK for JavaScript from npmjs.org:

npm install --save @distr-sh/distr-sdk

The full SDK documentation is at https://distr.sh/docs/integrations/sdk/

GitHub Action

Automate artifact version creation in your CI/CD pipeline with the official Distr GitHub Action. It is available at https://github.com/distr-sh/distr-create-version-action.

For setup and usage instructions, see https://distr.sh/docs/integrations/gh-action/.

Contributing & Local Development

If you are interested in contributing to Distr or want to modify it for your own needs, check out our contributing guidelines.

License

Distr is licensed under the Apache License 2.0. For a hosted version and Enterprise plans, see https://distr.sh/pricing/.

Extension points exported contracts — how you extend this code

TimeseriesSource (Interface)
(no doc) [6 implementers]
frontend/ui/src/app/components/timeseries-table/timeseries-table.component.ts
BlobHandler (Interface)
BlobHandler represents a minimal blob storage backend, capable of serving blob contents. [4 implementers]
internal/registry/blob/interface.go
EnvFileDataAccessor (Interface)
(no doc) [3 implementers]
internal/deploymentvalues/env.go
DeploymentIDer (Interface)
(no doc) [2 implementers]
internal/deploymentlogs/collector.go
AuthInfoWithOrganization (Interface)
(no doc) [2 implementers]
internal/authn/authinfo/authinfo.go
Server (Interface)
(no doc) [2 implementers]
internal/server/server.go
Syncer (Interface)
(no doc) [2 implementers]
internal/deploymenttargetlogs/interface.go
InitDataSource (Interface)
(no doc) [1 implementers]
internal/prometheus/collector.go

Core symbols most depended-on inside this repo

Error
called by 1481
internal/util/maps.go
With
called by 455
internal/deploymenttargetlogs/core.go
GetLogger
called by 229
internal/svc/logger.go
Query
called by 194
internal/db/queryable/interface.go
Warn
called by 185
internal/jobs/logger.go
Require
called by 152
internal/authn/authentication.go
CurrentOrgID
called by 147
internal/authn/authinfo/authinfo.go
Get
called by 139
internal/registry/blob/interface.go

Shape

Function 1,354
Method 1,071
Class 346
Struct 295
Interface 167
TypeAlias 32
FuncType 8

Languages

Go59%
TypeScript41%

Modules by API surface

internal/env/env.go81 symbols
internal/db/artifacts.go37 symbols
internal/types/types.go36 symbols
frontend/ui/src/app/services/auth.service.ts29 symbols
frontend/ui/src/app/deployments/deployment-target-card/deployment-target-card.component.ts29 symbols
internal/db/user_accounts.go26 symbols
frontend/ui/src/app/applications/application-detail.component.ts26 symbols
frontend/ui/src/app/components/timeseries-table/timeseries-table.component.ts24 symbols
frontend/ui/src/app/services/artifacts.service.ts23 symbols
internal/handlers/deployments.go22 symbols
internal/agentclient/client.go21 symbols
frontend/ui/src/app/directives/required-role.directive.ts21 symbols

Datastores touched

dbDatabase · 1 repos
dbnameDatabase · 1 repos
hello-distrDatabase · 1 repos
myappDatabase · 1 repos

For agents

$ claude mcp add distr \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page