Create & Share

Apps

Publish an HTML file, Board, standalone file, static directory, or Sandbox port from a Space as a versioned Cohub App with permissions, promotion links, and an optional custom domain.

This page explains how to publish a file, .board canvas, static directory, or running Sandbox port from a Space as a versioned Cohub App, manage visibility and permissions, track campaigns with promotion links, and bind a custom domain.

What an App is

An App is a published, versioned entry point created from a Space. Each App belongs to one Space and records:

Field Meaning
Slug Public name in the URL (a-z, 0-9, -, _, up to 80 characters)
Status published or disabled
Visibility public (Anyone with the link) or space (Use space access)
Target type file, directory, or port
Target ref Workspace path (or uploaded local path) or Sandbox port number
App scopes Space permissions granted directly to the App runtime at publish time

Public URL format:

/:username/:spaceSlug/w/:appSlug

To form a public URL, the Space owner must have a username and the Space must have a slug. If either is missing, the web publish dialog prompts you to set it before publishing.

Choose a publish target

Apps support three target types (file, directory, port), covering four primary publish modes plus arbitrary standalone files:

Mode Target type Best for Limits & requirements
HTML file file Single HTML document (.html / .htm) 1 byte – 1 GiB; up to 8 local companion icon/image files (≤ 2 MiB each, total ≤ 1 GiB)
Board file file Interactive .board canvas (Board App) Valid .board file; up to 1,000 referenced assets, total ≤ 1 GiB; script modules ≤ 2 MB each
Directory directory Multi-file static site Must contain index.html; 1–1,000 files; 1 byte – 1 GiB total; no symlinks
Sandbox port port Live server running in the Space's Sandbox Process must listen on a supported public Sandbox port: 3000 or 5173
Other single file file Any non-HTML, non-.board workspace file 1 byte – 1 GiB; no symlinks

Pick the simplest mode that matches your output.

Publish from the web UI

  1. Prepare the .html/.htm file, .board file, standalone file, static directory, or listening Sandbox port (3000 or 5173) in your Space.
  2. Open its preview and select Publish.
  3. Confirm the Space slug (if not set yet) and enter the App slug.
  4. Choose visibility: Anyone with the link (public) or Use space access (space, requiring viewers to hold access to the Space).
  5. Under App can, select the runtime scopes granted directly to the App. For static HTML with no Cohub SDK calls, leave scopes unchecked.
  6. Optionally enable Hide Cohub bar to remove the Cohub footer bar on the public page (included with Pro and Max plans).
  7. Publish and open the resulting URL.

Published Apps appear in the Space sidebar under Apps (Published).

Manage an App and versions

Apps are versioned snapshots of the chosen target. Treat publishing a version as an explicit release action rather than an autosave:

  • Editing the target path or port changes the source for the next version only.
  • The public page changes only when you publish a new version.
  • Switching status to Disabled removes the App from public by-slug access without deleting it or its version history.

From the App management page in the Space, you can:

  • Preview the App inside the workspace beside the management page (deep-linkable via ?window=app:<appId>), or open the public URL in a New tab.
  • Copy the App ID or public URL.
  • Edit slug, target type and reference, status (published / disabled), visibility (public / space), Hide Cohub bar, and App can scopes.
  • Publish a new version from the current target and inspect version history.
  • Disable or delete the App (Space editors/hosts can delete any App; builders can delete Apps they published).

Open an App from an Agent or desktop CLI

The workspace preview tab shares the workspace tab budget with file, Board, and port previews. An Agent in the Space can open an App in the desktop that originated the current Chat and invoke methods the App registers via client.app.surface.handle():

cohub desktop open <app> --call selection.get
cohub desktop open <app> --call board.focus --data '{"nodeId":"n1"}'

Use --as window (default) or --as overlay to pick the surface role. If the originating desktop does not respond within 10 seconds, cohub desktop open fails fast with no_active_client.

Board Apps

Publishing a .board file creates a Board App (see Boards for authoring items, animations, and scripts):

  • Visitors interact immediately: drag unlocked items to move them, drag empty canvas to pan, and scripts receive pointer input. Clicking ✏️ unfolds the full editing tools.
  • Visitor edits stay on the visitor's own device and are saved per App version. Publishing a new version starts visitors fresh; Reset restores the published Board.
  • Mark items as locked if visitors should not move them.
  • Signed-in visitors on the same version see each other's cursors, clicks, reactions, and script effects shared via broadcast(). Your own account on a second device counts as another visitor.

Board Apps cannot be downloaded with cohub apps download and cannot bind a custom domain.

Permissions and runtime

An App's effective permissions are the union of publisher-granted App scopes (App can / --app-scope) and viewer grants. Available publisher scopes are space.view, session.view, file.view, file.edit, taskrun.view, session.prompt.readonly, session.prompt.fullaccess, and command.execute.

The full permission model, viewer grant rules, and API-to-scope map are documented in App development. Decide scopes there, then set them at publish time.

context(), viewer authorization, and commerce APIs only work inside a published App runtime hosted by Cohub — not from a raw static asset URL or an unhosted local preview.

Publish and manage from the CLI

cohub apps publish auto-detects --source from your runtime: local CLI runs upload from the local filesystem (local), while runs inside a Cohub Sandbox publish directly from Space workspace paths (workspace). Pass --source workspace or --source local to override (--source applies only to --file and --dir, not --port).

cohub -s <space> apps publish demo --file ./dist/index.html
cohub -s <space> apps publish canvas --file ./scene.board
cohub -s <space> apps publish site --dir ./dist
cohub -s <space> apps publish site --source workspace --dir dist
cohub -s <space> apps publish app --port 5173

Common management and inspection commands (accepting <appId|url|username/space/app> where <app> is shown):

cohub -s <space> apps ls --json
cohub apps get <appId|url|username/space/app> --json
cohub apps stats <appId|url|username/space/app>
cohub apps like <appId|url|username/space/app>
cohub apps unlike <appId|url|username/space/app>
cohub apps download <appId|url|username/space/app> --output <path>
cohub apps versions <appId>
cohub apps update <appId> --visibility space
cohub apps publish-version <appId>
cohub apps resolve <appSlug> --owner <username> --space-slug <spaceSlug>
cohub apps rm <appId> --yes
  • apps download restores published file and directory artifacts directly from the CDN and verifies SHA-256 checksums. HTML files with companion assets restore as a directory bundle. Board and port Apps are not downloadable.
  • apps like and apps unlike update your like on an App; apps get returns the public like count.
  • Pass --hide-cohub-bar or --show-cohub-bar on apps publish or apps update to control the Cohub footer bar (Pro and Max plans).

Promotion links generate an immutable campaign URL and per-link analytics for a published App. Manage them in the App management page under Promotions (Space editors) or via CLI:

cohub apps promotions create <app> --name "Launch video A" --provider meta \
  --utm-source instagram --utm-medium paid_social --utm-campaign launch_2026
cohub apps promotions list <app>
cohub apps promotions stats <app> <promotionId>
  • generic (default) records local landing and readiness analytics without loading third-party scripts.
  • meta additionally forwards App ready, first registration, checkout-start, and purchase-confirmation events to the deployment-configured Meta Pixel and Conversions API.
  • Attribution is stored per App in browser localStorage for 30 days so sign-in and checkout redirects preserve it. Cohub does not retain visitor-level promotion records.

Custom domain

A published, public HTML file, static directory, or port App can serve on your own domain such as app.example.com. Each App supports one custom domain at a time (remove the current domain before adding another).

Billing

  • Each domain binding costs $5, charged once when the domain first becomes Live (active).
  • Payment is deducted in full from the Space wallet if its balance covers $5; otherwise the full $5 is deducted from the user who added the domain (charges are never split).
  • Balance is pre-checked when you add the domain and before certificate provisioning. If verification or certificate issuance never completes, nothing is charged.
  • Re-checking a failed domain or recovering DNS on the same binding does not charge again. Removing a domain does not refund the fee; re-adding a removed domain or moving it to another App creates a new binding and charges again.

Connect a domain

  1. Open the App management page, expand Custom domain, enter a hostname such as app.example.com, and select Add · $5 — or run:
cohub apps domains add <app> app.example.com --yes

(--yes confirms the one-time $5 charge and is required in non-interactive terminals.)

  1. Add both DNS records shown at your DNS provider:
Type Name Value Read by
CNAME app.example.com cname.cohub.live Cloudflare, to route traffic and issue the TLS certificate
TXT _cohub-challenge.app.example.com cohub-verify=<token> Cohub only, to prove domain ownership
  1. Cohub checks DNS automatically. Once the certificate is issued, status turns Live (usually within minutes), and you can delete the TXT record.

Manage domains from the CLI:

cohub apps domains list <app>
cohub apps domains check <app> app.example.com
cohub apps domains rm <app> app.example.com --yes

Domain rules and security notes

  • Use a subdomain such as app.example.com. Apex domains work only if your DNS provider supports CNAME flattening. Wildcards (*.example.com) and Cohub-reserved domains are not supported.
  • If your domain publishes CAA records, allow Let's Encrypt and Google Trust Services.
  • Code running on a subdomain can set cookies for its parent domain. Bind subdomains only under sites that trust the App, and keep parent-site authentication cookies prefixed with __Host-.
  • Port Apps behind a custom domain do not receive the visitor's real IP address. Build absolute URLs and OAuth callback URLs from the custom domain rather than forwarded host headers.
  • TXT verification expires after 7 days (verification_expired). Select Check now (or run cohub apps domains check) to issue a new TXT token and restart validation.
  • A live domain that stops pointing to cname.cohub.live for 72 hours is automatically released.

Boundaries and common errors

Symptom or error Cause and fix
Public URL cannot be formed (apps require an owner username and a space slug) Set a username for the Space owner and a slug for the Space before publishing.
File or directory publish fails (file_too_large, directory_too_many_files, symlink_not_supported) Single files must be 1 byte – 1 GiB; directories must include index.html, 1–1,000 files, and ≤ 1 GiB total; Board Apps allow ≤ 1,000 referenced assets, ≤ 1 GiB total, and script modules ≤ 2 MB; symlinks are rejected.
Port publish fails (port is invalid) Only supported Sandbox public ports (3000 and 5173) can be published.
Custom domain returns app_not_eligible Custom domains require status = published, visibility = public, and an HTML file, static directory, or port App (not space-visibility, Board, or non-HTML file Apps).
Custom domain returns app_domain_exists or domain_in_use Each App holds one domain at a time (remove the existing one first). Moving a domain from another App requires removing that App's TXT record first.
Custom domain returns insufficient_balance Ensure either the Space wallet or your personal balance covers $5, then click Check now or retry apps domains add.
Custom domain shows verification_expired or dns_moved TXT verification must succeed within 7 days (re-check to get a new token); a live CNAME pointing away from cname.cohub.live for 72 hours releases the domain.
App opens, but Cohub SDK calls return 403 or fail Confirm the App runs inside the published Cohub App runtime, verify appScopes and context().permissions, confirm the viewer holds every requested Space permission, and request account user.* scopes separately.
cohub apps download refuses to download Only published file and directory Apps are downloadable; Board and port Apps are not downloadable.
cohub desktop open returns no_active_client The desktop that originated the Chat did not respond within 10 seconds (closed, asleep, or offline).

Next steps

  • App development — SDK runtime APIs, permission scopes, realtime rooms, and commerce
  • Boards — author .board canvases, animations, scripts, and exports
  • Public files — share direct CDN URLs for static assets without publishing an App
  • Files & Sandbox — prepare workspace files and run Sandbox ports
  • Saves — capture immutable workspace milestones before major releases
  • CLI — complete command reference
  • SDK — manage Apps programmatically