← demoshell.com

DemoShell docs

Everything you need to put a live demo of your software on your site or README. Questions this page doesn't answer: use the contact form or email konstantin@goncharuk.info.

Quickstart Build scripts Sharing Embedding What fits Plans

Quickstart

A demo is a saved Linux machine ("VM") that visitors boot in their own browser tab — no servers involved. From zero to a shareable demo:

  1. Create a free account. You get a starter project named demo.
  2. Click the verification link we email you. You can look around before that, but building, saving, publishing and embedding stay locked until the address is verified — and accounts that are never verified are deleted after 30 days.
  3. Open the project and press ▶ Build your first demo. You land in the studio's build form.
  4. Pick a template or write a short build script (see below), then press Build snapshot. The build boots a base Linux image right in your browser, runs your script, and saves the result. Keep the tab open until it finishes.
  5. Done — the share panel gives you a hosted demo link, a README badge, and an embed snippet.

Try it once with the built-in mc template before wiring in your own app — a working example is the fastest way to learn the shape.

Build scripts

A demo is described by a base image plus a shell script. The build boots the base image, runs the script in the VM as root, and saves the machine state when the script exits with code 0. The script is stored with the VM, so the same demo can be rebuilt any time.

Base images

BaseWhat's in it
Alpine (minimal)Small Alpine Linux with networking and apk. The right default for terminal apps, binaries, and servers.
Alpine with DockerSame, plus a working Docker daemon — for demos that docker pull your published image.

Rules that matter

Example: your own binary

# fetch your arm64 linux binary and put it on PATH
apk add curl
curl -fLo /usr/local/bin/yourapp https://example.com/yourapp-linux-arm64
chmod +x /usr/local/bin/yourapp

with Start app set to yourapp.

Automatic rebuilds on release

On paid and open-source plans, add a version watch to the VM: GitHub releases or Docker Hub tags. When a new release appears, the demo is rebuilt from its script automatically. Scripts can pin the watched version with a placeholder:

apk add docker={{versions.docker}}

where docker is the watch's name. If a rebuild fails, the live demo stays unchanged and you get an email with the build log.

Sharing your demo

Every built demo has a share panel with three artifacts, easiest first:

Public and private demos

Demos are public by default: anyone with the link can run them, and embeds work from any site. A private demo needs the project's embed key, and embeds only work on domains you allow for that key — the admin's share panel handles both for you. Keys are publishable (safe to appear in page source); the allowed-domains list is what restricts private demos.

Embedding on your site

The share panel gives you a snippet like:

<div id="demoshell" style="height: 420px"></div>
<script type="module">
  import DemoShell from 'https://build.demoshell.com/embed/demoshell-embed.js';
  DemoShell.mount('#demoshell', {
    snapshot: "you/project:demo",
    server: "https://build.demoshell.com",
  });
</script>

The demo boots inline — inside your page — when the page is cross-origin isolated, which requires two response headers on your page:

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

These headers also affect your page's other third-party content (every subresource must allow being embedded), so check your page still works after adding them. On a static host where you can't set headers (GitHub Pages and similar), the coi-serviceworker shim can add isolation from a service worker.

Without isolation nothing breaks: the same snippet renders a "Launch demo" card that opens the hosted full-page demo — visitors always get the demo, never a blank box. Phones get the card too; the inline VM is a desktop experience.

What software fits

Plans

The free plan is one project with one demo, unlimited sessions (fair use limits apply). A demo's internet access is relayed by us and metered per visitor address — 100 MB per 24 h, which is far more than a demo needs; loading the demo itself does not count against it, only what the machine downloads while it runs. Paid plans add more demos and automatic rebuilds on release; the open-source plan (free, on request) has the paid features for OSS projects. See pricing — plans are switched for you on request, via the form.