From 7a3e25c3eeb0a755a2126b6fad573e612c88b213 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Mon, 9 Nov 2026 10:10:54 +0000 Subject: [PATCH] getting-started: host a site on c0mpute and point a Moshpit name at it Publish, the /s// URL on any gateway, moshcode name c0mpute, custom domains by TXT, paid hosting through d1sks, and running a public gateway, with alt.2600 (site ea0e1f5afde44477e71d, edge.c0mpute.com) as the live example. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/app/getting-started/page.tsx | 85 +++++++++++++++++++++++ docs/hosting.md | 4 +- 2 files changed, 88 insertions(+), 1 deletion(-) diff --git a/apps/web/src/app/getting-started/page.tsx b/apps/web/src/app/getting-started/page.tsx index fe3ba628..47291e30 100644 --- a/apps/web/src/app/getting-started/page.tsx +++ b/apps/web/src/app/getting-started/page.tsx @@ -64,6 +64,91 @@ $ c0mpute uninstall --purge # also remove ~/.config/c0mpute`}
{`$ c0mpute doctor`}
+ +
+

+ Publish a directory of static files once. Hosting nodes keep three + copies, replace any copy whose node disappears, and every c0mpute + gateway serves it. Live example:{" "} + alt.2600 is site{" "} + ea0e1f5afde44477e71d, also at{" "} + + gateway.c0mpute.com/s/ea0e1f5afde44477e71d/ + {" "} + and, for browsers without Moshpit DNS,{" "} + alt.2600.pit.world. +

+ +

publish (after step 1):

+ {`$ c0mpute hosting publish ./public --name mysite +site: ea0e1f5afde44477e71d +version: 1 +copies: 3/3 +path: /s/ea0e1f5afde44477e71d/ (on any c0mpute gateway, e.g. http://:7777/s/ea0e1f5afde44477e71d/) + +$ c0mpute hosting ls # sites a gateway knows, with live copy counts`} +

+ The site is signed with this machine's key, so only this machine + can publish new versions: run the same command with the same{" "} + --name to update it. Any gateway serves it at{" "} + /s/<site_id>/, for example{" "} + https://gateway.c0mpute.com/s/<site_id>/. Limits: + 256 MiB and 10,000 files per site. +

+ +

point a Moshpit name at it (free to register):

+ {`$ moshcode name c0mpute alt.2600 ea0e1f5afde44477e71d +$ moshcode dns resolve alt.2600 +alt.2600 → edge.c0mpute.com + +$ moshcode name c0mpute alt.2600 off # stop serving it from c0mpute`} +

+ The registry now answers the name with the c0mpute edge + (edge.c0mpute.com). The edge holds a Moshpit CA certificate for the + name and fetches /s/<site_id>/ from whichever + gateway is healthy, so https://alt.2600 works for anyone + on Moshpit DNS (moshcode dns enable installs the root) + and http://alt.2600 works without the root. Pointing + the name at a server again takes it off c0mpute. +

+ +

or a domain you own:

+ {`$ c0mpute hosting publish ./public --name mysite --domain blog.example.org +# DNS: +# TXT _c0mpute-hosting.blog.example.org "site=" +# A/AAAA blog.example.org -> one or more gateways (TLS in front of :7777)`} +

+ A gateway serves the domain only when both agree: the signed site + record lists it and its TXT names the site. +

+ +

pay hosting nodes to keep it (d1sks marketplace):

+ {`$ c0mpute hosting disks --country DE,FI # what --disks auto would pick +$ c0mpute hosting publish ./public --name mysite --disks auto +$ c0mpute hosting publish ./public --name mysite --disks auto --max-price 0.01 --copies 3`} +

+ Picks preferred hosts from{" "} + d1sks, + cheapest first. Keep a node running on the publishing machine: it + challenges the holders and settles, as a dry run until{" "} + [payments] is enabled. Free copies stay free. +

+ +

run your own public gateway:

+ {`# ~/.config/c0mpute/config.toml (gateway and hosting are default roles) +[gateway] +bind = "0.0.0.0:7777" +announce = "https://gw.example.org" # TLS in front of :7777`} +

+ An announced gateway is listed as gateway on{" "} + /api/nodes, where the Moshpit edge and other clients find + gateways to fetch sites from. More in{" "} + + docs/hosting.md + + . +

+
); } diff --git a/docs/hosting.md b/docs/hosting.md index 27c385ab..c6dfea54 100644 --- a/docs/hosting.md +++ b/docs/hosting.md @@ -58,7 +58,9 @@ cached for 10 minutes (2 minutes for a miss). site. The Moshpit registry resolves it to a c0mpute edge (moshpit-proxy `bin/moshpit-c0mpute-edge.ts`) that holds a Moshpit CA certificate for the name and fetches `/s//` from any healthy gateway, so no DNS check on the gateway is -involved. +involved. The public edge is `edge.c0mpute.com`; live example: `alt.2600` is site +`ea0e1f5afde44477e71d` (`http://alt.2600`, `https://alt.2600` with the Moshpit root +installed, `https://alt.2600.pit.world` from the regular web). ## Finding gateways