Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
docs: selfhosting and licensing
Sidwebworks7ad943f8c7df
diff --git a/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json b/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.jsonindex cc6abe41fb..bd1ec79d47 100644--- a/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json+++ b/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json@@ -1,6 +1,6 @@{- "generated": "2026-06-20T04:19:09.766Z",- "totalTools": 1208,+ "generated": "2026-06-21T22:03:32.744Z",+ "totalTools": 1209,"modules": 15,"tools": [{diff --git a/docs/app/docs/layout.tsx b/docs/app/docs/layout.tsxindex 580c538de0..46f24f8f2a 100644--- a/docs/app/docs/layout.tsx+++ b/docs/app/docs/layout.tsx@@ -3,6 +3,7 @@ import { DocsNav, type DocsNavNode } from "@/components/api/docs-nav";import { TableOfContents } from "@/components/api/toc";import { MainHeader } from "@/components/main-header";import { NavScrollChevron } from "@/components/nav-scroll-chevron";+import { PlanBannerBar } from "@/components/plan-banner-bar";import { ScrollHints } from "@/components/scroll-hints";import { source } from "@/lib/source";import "../reference.css";@@ -95,6 +96,13 @@ export default function ReferenceLayout({ children }: { children: ReactNode }) {toNav((source.getPageTree().children as TreeNode[]) ?? []));+ // url → plan for plan-gated pages, so the client banner bar can match the active path.+ const planByUrl = Object.fromEntries(+ source+ .getPages()+ .flatMap((p) => (p.data.plan ? [[p.url, p.data.plan as string]] : []))+ );+return (<div className="min-h-screen w-full bg-ed-paper"><MainHeader active="reference" mobileNav={<DocsNav tree={tree} />} />@@ -104,12 +112,17 @@ export default function ReferenceLayout({ children }: { children: ReactNode }) {<DocsNav tree={tree} /><NavScrollChevron /></aside>- <main className="min-w-0 flex-1 px-6 pb-35 pt-10 lg:px-14">- {children}- </main>- <aside className="hidden w-58 shrink-0 px-7 pt-10 xl:block">- <TableOfContents />- </aside>+ <div className="flex min-w-0 flex-1 flex-col">+ <PlanBannerBar plans={planByUrl} />+ <div className="flex min-w-0">+ <main className="min-w-0 flex-1 px-6 pb-35 pt-10 lg:px-14">+ {children}+ </main>+ <aside className="hidden w-58 shrink-0 px-7 pt-10 xl:block">+ <TableOfContents />+ </aside>+ </div>+ </div></div><ScrollHints />diff --git a/docs/app/mcp/page.tsx b/docs/app/mcp/page.tsxindex 66f623e0d2..870ce9394f 100644--- a/docs/app/mcp/page.tsx+++ b/docs/app/mcp/page.tsx@@ -68,7 +68,7 @@ const FAQ: FaqEntry[] = [},{q: "Is MCP available on my plan?",- a: "On Carbon Cloud, API and MCP access is a Business-plan feature — Starter keys are rejected with 403. Self-hosted instances aren't gated."+ a: "On Carbon Cloud, API and MCP access is a Business-plan feature — Starter keys are rejected with 403. Self-hosted, it's part of the Enterprise feature set and requires a commercial license. See Licensing for the full picture."},{q: "Is there a rate limit?",diff --git a/docs/components/editorial/reference-components.tsx b/docs/components/editorial/reference-components.tsxindex 17edd4c7ea..f96fd7fac9 100644--- a/docs/components/editorial/reference-components.tsx+++ b/docs/components/editorial/reference-components.tsx@@ -64,7 +64,7 @@ export function PlanBadge({ plan = "Business", className = "" }: { plan?: string<rect x="2.6" y="6.3" width="8.8" height="5.6" rx="1.4" stroke="currentColor" strokeWidth="1.3" /><path d="M4.5 6.3V4.7a2.5 2.5 0 0 1 5 0v1.6" stroke="currentColor" strokeWidth="1.3" /></svg>- {plan} plan+ Paid</span>);}diff --git a/docs/components/plan-banner-bar.tsx b/docs/components/plan-banner-bar.tsxnew file mode 100644index 0000000000..4aac9b57a9--- /dev/null+++ b/docs/components/plan-banner-bar.tsx@@ -0,0 +1,46 @@+"use client";++import { usePathname } from "next/navigation";++/* Full-width sticky announcement bar for plan-gated pages. The docs layout builds a+ * url→plan map from `plan` frontmatter and passes it in; this matches the current path+ * and, when the page is gated, renders the bar across the whole content area (everything+ * to the right of the left nav). Pinned just under the fixed 64px header. */+export function PlanBannerBar({ plans }: { plans: Record<string, string> }) {+ const pathname = usePathname();+ const plan = plans[pathname] ?? plans[pathname.replace(/\/$/, "")];+ if (!plan) return null;++ return (+ <div className="sticky top-16 z-40 flex flex-wrap items-center gap-x-2 gap-y-1 border-b border-[#e0c389] bg-[#fbe7b8] px-6 py-3 text-ed-14 leading-[150%] text-[#6b4a1d] lg:px-14">+ <svg+ width="14"+ height="14"+ viewBox="0 0 14 14"+ fill="none"+ aria-hidden="true"+ className="shrink-0"+ >+ <rect x="2.6" y="6.3" width="8.8" height="5.6" rx="1.4" stroke="currentColor" strokeWidth="1.4" />+ <path d="M4.5 6.3V4.7a2.5 2.5 0 0 1 5 0v1.6" stroke="currentColor" strokeWidth="1.4" />+ </svg>+ <span className="font-semi text-[#4a3211]">Enterprise feature</span>+ <span className="font-book">+ — included with the {plan} and Partner plans on{" "}+ <a+ href="https://app.carbon.ms"+ className="font-semi text-[#4a3211] underline underline-offset-2 transition-opacity hover:opacity-70"+ >+ Carbon Cloud+ </a>+ . Self-hosted, it needs a commercial license.+ </span>+ <a+ href="/docs/platform/licensing"+ className="ml-1 font-semi text-[#4a3211] underline underline-offset-2 transition-opacity hover:opacity-70"+ >+ Licensing →+ </a>+ </div>+ );+}diff --git a/docs/content/docs/platform/local-development.mdx b/docs/content/docs/building/local-development.mdxsimilarity index 96%rename from docs/content/docs/platform/local-development.mdxrename to docs/content/docs/building/local-development.mdxindex f25003295c..d921ab63a4 100644--- a/docs/content/docs/platform/local-development.mdx+++ b/docs/content/docs/building/local-development.mdx@@ -94,4 +94,4 @@ A fresh worktree doesn't carry your gitignored local files. Pull them across fro## Configuration-Your local settings live in the generated `.env.local`. See [Environment variables](/docs/platform/self-hosting/environment-variables) for the full configuration surface, and [Deployment](/docs/platform/deployment) to self-host on AWS.+Your local settings live in the generated `.env.local`. See [Environment variables](/docs/platform/self-hosting/environment-variables) for the full configuration surface, and [Self-hosting](/docs/platform/self-hosting) to run Carbon on your own infrastructure.diff --git a/docs/content/docs/building/meta.json b/docs/content/docs/building/meta.jsonindex 2329b5e62a..6f97226d61 100644--- a/docs/content/docs/building/meta.json+++ b/docs/content/docs/building/meta.json@@ -1,5 +1,5 @@{"title": "Building","defaultOpen": true,- "pages": ["webhooks"]+ "pages": ["webhooks", "local-development"]}diff --git a/docs/content/docs/index.mdx b/docs/content/docs/index.mdxindex bcdf3b49e2..173061e327 100644--- a/docs/content/docs/index.mdx+++ b/docs/content/docs/index.mdx@@ -16,8 +16,8 @@ Come here when you already know the noun you need and want the precise detail be<Card title="Architecture" href="/docs/platform/architecture">How Carbon is built — apps, packages, database, events, jobs, and auth.</Card>- <Card title="Deployment" href="/docs/platform/deployment">- Self-host Carbon on AWS with SST, plus the local development setup.+ <Card title="Self-hosting" href="/docs/platform/self-hosting">+ Run Carbon on your own infrastructure — a single VPS with Docker, or your own AWS account with SST.</Card><Card title="Environment variables" href="/docs/platform/self-hosting/environment-variables">Every variable that configures a Carbon instance, grouped by concern.diff --git a/docs/content/docs/integrations/index.mdx b/docs/content/docs/integrations/index.mdxindex 61b69d692e..984f056b6c 100644--- a/docs/content/docs/integrations/index.mdx+++ b/docs/content/docs/integrations/index.mdx@@ -6,9 +6,10 @@ description: Connect Carbon to your accounting, CAD, project-management, estimatCarbon ships a set of first-party **integrations** to third-party apps. Each one is enabled per companyunder **Settings → Integrations**, where you flip it on and supply its credentials or settings.-Integrations are an **Enterprise** capability — on Carbon Cloud they're available on the **Business** and-**Partner** plans, except **Email** and **Exchange Rates**, which are on every plan. Self-hosted instances-aren't plan-gated.+Integrations are an **Enterprise** capability. On [Carbon Cloud](https://app.carbon.ms) they're included+with the **Business** and **Partner** plans; self-hosted, they require a commercial (Enterprise) license —+see [Licensing](/docs/platform/licensing). **Email** and **Exchange Rates** are the exceptions, available on+every edition and plan.## How a connection worksdiff --git a/docs/content/docs/platform/architecture.mdx b/docs/content/docs/platform/architecture.mdxindex da9d07af01..801b0c9890 100644--- a/docs/content/docs/platform/architecture.mdx+++ b/docs/content/docs/platform/architecture.mdx@@ -61,8 +61,8 @@ header), and a full **OAuth 2.0 server** backs the Claude remote connector.## Related<Cards>- <Card title="Deployment" href="/docs/platform/deployment">- Provision and run the apps on AWS.+ <Card title="Self-hosting" href="/docs/platform/self-hosting">+ Run the apps on your own infrastructure — Docker on a VPS, or AWS with SST.</Card><Card title="Environment variables" href="/docs/platform/self-hosting/environment-variables">The full configuration surface.diff --git a/docs/content/docs/platform/licensing.mdx b/docs/content/docs/platform/licensing.mdxnew file mode 100644index 0000000000..4da09df48b--- /dev/null+++ b/docs/content/docs/platform/licensing.mdx@@ -0,0 +1,55 @@+---+title: Licensing+description: Carbon is dual-licensed — AGPLv3 for the open core, a commercial license for Enterprise features and for production or hosted use.+---++Carbon's source is public, but using it isn't unconditional. Two licenses govern the code, and which one applies depends on **what you run and how you run it**. This page is the map; the [LICENSE](https://github.com/crbnos/carbon/blob/main/LICENSE) file is the contract.++## Editions++| Edition | What it is | License |+| --- | --- | --- |+| **Community** | The open core — ERP + MES — self-hosted on your own infrastructure. | AGPLv3 |+| **Enterprise** | Self-hosted Carbon with a commercial license: unlocks Enterprise features and lifts the AGPL copyleft obligation. | Commercial |+| **Cloud** | Carbon run for you at [app.carbon.ms](https://app.carbon.ms) — billed on the Starter, Business, and Partner plans. | Commercial |++Self-hosting (the [Docker + Caddy recipe](/docs/platform/self-hosting/docker-caddy)) runs the **Community** edition by default. A commercial license turns the same hardware into the **Enterprise** edition.++## Open core vs. Enterprise++Most of the repository is the **open core**, licensed under AGPLv3. A defined slice is not.++<Callout type="warn" title="Enterprise code requires a commercial license">+Everything under `packages/ee` and every file whose name contains `.ee` is Enterprise code. From the LICENSE: *"All content that resides under [...]/packages/ee and all files that contains a `.ee` in this repository require the purchase of a commercial license."*+</Callout>++That slice is the first-party **integrations** (Slack, Jira, Linear, Xero, OnShape, Zapier) plus other Enterprise features — API keys, webhooks, the audit log, customer portals, storage rules, and email notifications. **Email** and **Exchange Rates** are the exceptions: they're available on every edition. See [Integrations](/docs/integrations) for the catalog.++## The AGPL obligation++AGPLv3 is a **network copyleft** license: modify Carbon, make it available to users over a network, and you must offer those users your complete modified source under the same license. Carbon's license goes one step further than stock AGPL.++<Callout type="note" title="Internal production use still triggers it">+From the LICENSE: *"any use of this software for internal production use is strictly prohibited unless the modifications are made open-source in accordance with the 'AGPLv3' license or a commercial license is obtained."* Running Carbon in production is fine — but unless you hold a commercial license, your changes have to be published under AGPLv3.+</Callout>++## You can't resell Carbon as a service++<Callout type="warn" title="Hosting Carbon for others needs a commercial license">+From the LICENSE: *"Any use of this software to sell Carbon source code as a hosted service is strictly prohibited without obtaining a commercial license."*+</Callout>++## When you need a commercial license++[Get a commercial license](mailto:[email protected]) — or just use [Carbon Cloud](https://app.carbon.ms) — if you want to:++- **Keep your modifications private** instead of publishing them under AGPLv3.+- **Use Enterprise features** — the EE integrations and the capabilities listed above.+- **Run Carbon in production** without open-sourcing your changes.+- **Offer Carbon to others** as a hosted service.++Cloud is the managed path; an Enterprise (commercial) license is the self-hosted path. Either one lifts the copyleft obligation and unlocks the full feature set.++<Callout type="info" title="Orientation, not legal advice">+This page summarizes the terms so you can find the right path quickly. The [LICENSE](https://github.com/crbnos/carbon/blob/main/LICENSE) file is what actually governs — read it in full, and [email us](mailto:[email protected]) if you're unsure which edition fits.+</Callout>diff --git a/docs/content/docs/platform/meta.json b/docs/content/docs/platform/meta.jsonindex d2cfc1695f..aad6f8013c 100644--- a/docs/content/docs/platform/meta.json+++ b/docs/content/docs/platform/meta.json@@ -1,5 +1,5 @@{"title": "Platform","defaultOpen": true,- "pages": ["architecture", "deployment", "self-hosting", "local-development"]+ "pages": ["architecture", "self-hosting", "licensing"]}diff --git a/docs/content/docs/platform/deployment.mdx b/docs/content/docs/platform/self-hosting/aws-sst.mdxsimilarity index 52%rename from docs/content/docs/platform/deployment.mdxrename to docs/content/docs/platform/self-hosting/aws-sst.mdxindex 3fa2c9a306..5b6ab65df7 100644--- a/docs/content/docs/platform/deployment.mdx+++ b/docs/content/docs/platform/self-hosting/aws-sst.mdx@@ -1,9 +1,13 @@----title: Deployment-description: Deploy Carbon on AWS with SST, or run it locally with the crbn CLI.+title: AWS with SST+description: Deploy the Carbon stack to your own AWS account with SST — ECS Fargate, ECR, and a WAF.----Carbon deploys to **AWS** with **SST**. The two apps — ERP and MES — run as containers on **ECS Fargate** behind load balancers, defined in `sst.config.ts` (app `carbon`, home `aws`). To run Carbon on your own hardware instead, see [Self-hosting](/docs/platform/self-hosting).+One of the [self-hosting](/docs/platform/self-hosting) recipes: deploy Carbon to **AWS** with **SST**. The two apps — ERP and MES — run as containers on **ECS Fargate** behind load balancers, defined in `sst.config.ts` (app `carbon`, home `aws`). For a single-box setup instead, see [Docker with Caddy](/docs/platform/self-hosting/docker-caddy).++<Callout type="tip" title="Don't want to run any of this?">+[Carbon Cloud](https://app.carbon.ms) is the hosted edition — we run the whole stack for you, with scaling, backups, upgrades, and uptime handled. Sign up and you're in: no servers to provision, no Supabase to run, no infrastructure to babysit. Self-host only if you specifically need Carbon on your own hardware.+</Callout>## What gets provisioned@@ -29,4 +33,4 @@ Container images are pulled from **ECR** (`carbon/erp` and `carbon/mes`), builtThe WAF web ACL must be **manually associated** with the application load balancer after the first deploy — SST creates it but does not attach it.</Callout>-See [Environment variables](/docs/platform/self-hosting/environment-variables) for the full configuration surface, or [Local development](/docs/platform/local-development) to run Carbon locally with the `crbn` CLI.+See [Environment variables](/docs/platform/self-hosting/environment-variables) for the full configuration surface, the [Docker with Caddy](/docs/platform/self-hosting/docker-caddy) recipe for a single VPS, or [Local development](/docs/building/local-development) to run Carbon locally with the `crbn` CLI.diff --git a/docs/content/docs/platform/self-hosting/docker-caddy.mdx b/docs/content/docs/platform/self-hosting/docker-caddy.mdxindex 86d45a3075..faa33ae438 100644--- a/docs/content/docs/platform/self-hosting/docker-caddy.mdx+++ b/docs/content/docs/platform/self-hosting/docker-caddy.mdx@@ -7,6 +7,10 @@ Run all of Carbon on **one Linux VPS**: a single-node [Docker Swarm](https://docEverything for this recipe lives in [`contrib/deploying/simple-docker-caddy`](https://github.com/crbnos/carbon/tree/main/contrib/deploying/simple-docker-caddy). The `deploy.sh` script wraps the whole lifecycle.+<Callout type="tip" title="Don't want to run any of this?">+[Carbon Cloud](https://app.carbon.ms) is the hosted edition — we run the whole stack for you, with scaling, backups, upgrades, and uptime handled. Sign up and you're in: no servers to provision, no Supabase to run, no infrastructure to babysit. Self-host only if you specifically need Carbon on your own hardware.+</Callout>+## What runs| Service | Role |@@ -142,4 +146,4 @@ A local backup on the same VPS is not a backup. Schedule `backup.sh` and ship it- Backups scheduled and shipped offsite.- Studio not publicly exposed (or behind basic-auth).-See [Environment variables](/docs/platform/self-hosting/environment-variables) for the full configuration surface, or the managed [AWS deployment](/docs/platform/deployment) for the cloud path.+See [Environment variables](/docs/platform/self-hosting/environment-variables) for the full configuration surface, or [AWS with SST](/docs/platform/self-hosting/aws-sst) for an AWS setup.diff --git a/docs/content/docs/platform/self-hosting/index.mdx b/docs/content/docs/platform/self-hosting/index.mdxindex c2ddbf3f4c..5ab4394533 100644--- a/docs/content/docs/platform/self-hosting/index.mdx+++ b/docs/content/docs/platform/self-hosting/index.mdx@@ -1,18 +1,21 @@---title: Self-hosting-description: Run the whole Carbon stack on your own infrastructure instead of the managed AWS cloud.+description: Run the whole Carbon stack on your own infrastructure — a single VPS or your own AWS account — instead of Carbon Cloud.----Carbon can run entirely on hardware you control — the ERP and MES apps plus everything they need: the Supabase data plane (Postgres, Auth, REST, Realtime, Storage, Edge Functions), Redis, and Inngest. This is the alternative to the managed [AWS deployment](/docs/platform/deployment).+Carbon can run entirely on hardware you control — the ERP and MES apps plus everything they need: the Supabase data plane (Postgres, Auth, REST, Realtime, Storage, Edge Functions), Redis, and Inngest. This is the alternative to [Carbon Cloud](https://app.carbon.ms), where Carbon runs the whole stack for you.## Recipes<Cards><Card title="Docker with Caddy" href="/docs/platform/self-hosting/docker-caddy">- The whole stack on a single Linux VPS — a single-node Docker Swarm behind an automatic-HTTPS Caddy reverse proxy. The simplest way to self-host.+ The whole stack on a single Linux VPS — a single-node Docker Swarm behind an automatic-HTTPS Caddy reverse proxy.+ </Card>+ <Card title="AWS with SST" href="/docs/platform/self-hosting/aws-sst">+ The two apps on ECS Fargate, provisioned with SST — for teams that need Carbon inside their own AWS account.</Card></Cards>-<Callout type="info">-Self-hosted Carbon is **not plan-gated** — the Business/Partner tiers only apply to Carbon Cloud. See [Environment variables](/docs/platform/self-hosting/environment-variables) for the full configuration surface.+<Callout type="warn" title="Self-hosting runs the Community edition">+Self-hosted Carbon runs under **AGPLv3**: run a modified copy over a network and you have to publish your changes. Keeping modifications private, using Enterprise features, running in production without open-sourcing your changes, or offering Carbon as a hosted service requires a commercial license. See [Licensing](/docs/platform/licensing).</Callout>diff --git a/docs/content/docs/platform/self-hosting/meta.json b/docs/content/docs/platform/self-hosting/meta.jsonindex 0dd2d0382e..4a99a0fbdc 100644--- a/docs/content/docs/platform/self-hosting/meta.json+++ b/docs/content/docs/platform/self-hosting/meta.json@@ -1,5 +1,5 @@{"title": "Self-hosting","defaultOpen": true,- "pages": ["docker-caddy", "environment-variables"]+ "pages": ["docker-caddy", "aws-sst", "environment-variables"]}diff --git a/docs/next.config.mjs b/docs/next.config.mjsindex 50e6e086bc..6f1faebc8c 100644--- a/docs/next.config.mjs+++ b/docs/next.config.mjs@@ -18,6 +18,7 @@ const config = {// internals (RSC navigation, HMR) unless the tunnel origin is whitelisted,// which otherwise breaks client-side navigation while SSR still renders.allowedDevOrigins: [+ 'protozoan-user-outline.ngrok-free.dev',"*.ngrok-free.app","*.ngrok.app","*.ngrok.io",@@ -30,6 +31,17 @@ const config = {beforeFiles: [{ source: "/", destination: "/guides/order" }],};},+ // Deployment moved under Self-hosting as the "AWS with SST" recipe; keep the old+ // URL alive by sending it to the Self-hosting overview.+ async redirects() {+ return [+ {+ source: "/docs/platform/deployment",+ destination: "/docs/platform/self-hosting",+ permanent: true,+ },+ ];+ },};export default withMDX(config);