# socialweb-computer-kcp Request and provide VMs on an atproto compute market. One binary, `socialweb-computer`: a requester requests a VM from a bidder, a bidder provides its host's VMs, and both are atproto accounts that vouch for each other. ## Install Linux amd64 or arm64, the current release of channel `stable`: ```sh curl -sfL https://socialweb.computer/install.sh | bash -e echo 'export PATH="$HOME/.local/bin:$PATH"' | tee -a ~/.bashrc ~/.bash_profile ``` Or from a clone (`rc` for the release candidate): ```sh git clone --depth 1 https://knotless.dev/socialweb.computer/socialweb-computer-kcp cd socialweb-computer-kcp ``` ```sh run=gate scripts/install.sh stable export PATH=$HOME/.local/bin:$PATH ``` [scripts/install.sh](scripts/install.sh) reads the channel's record from the releases' account (`did:plc:gmlkrhimoueejcertevr4hl3`), follows it by CID to the version and the manifest, and checks the download against the binary's CID in that manifest before it installs to `${PREFIX:-$HOME/.local}/bin`. You see `installed stable () to ...` and the `version` line. A main commit or a dev build: [docs/bidder.md](docs/bidder.md#binary). ## Request a VM ```sh socialweb-computer run request --name vm1 --atproto-oauth-qr --exec -- id ``` Sign in with the QR code (or the URL under it); you see `uid=0(root) gid=0(root) groups=0(root)` and the VM is released. A bidder serves you only when its operator vouches for you: [docs/quickstart-prod.md](docs/quickstart-prod.md#vouches). Hold a VM, ssh in, sizes, app passwords, the long-lived requester: [docs/quickstart-prod.md](docs/quickstart-prod.md). As your account or as an identity associated to it: [Who you run as](docs/quickstart-prod.md#who-you-run-as). ## Run a bidder ```sh sudo "$(command -v socialweb-computer)" install bidder --handle --bidder-operator-signin ``` Linux with `/dev/kvm`: [docs/bidder.md](docs/bidder.md); an agent of your account or your account itself: [Who you run as](docs/bidder.md#who-you-run-as). ## Try a local market One machine, its own PLC, relay, PDSes and a bidder; nothing leaves it: ```sh S=~/.swc/demo socialweb-computer dev up --instance demo --profile market-network --host-backend proc --state-dir $S socialweb-computer run request --network demo --state-dir $S --name vm1 --exec -- id ``` You see `uid=0(root) ...` again, from a VM of your own bidder. Then: ```sh socialweb-computer dev down --instance demo --state-dir $S ``` More: [docs/quickstart-local.md](docs/quickstart-local.md). ## When it goes wrong - `socialweb-computer check-host -role requester|bidder -state-dir `: each `FAIL` names its fix - logs: `/requests//logs/core.log`, `/dev//logs/core.log`; an installed bidder: `sudo journalctl _SYSTEMD_USER_UNIT=socialweb-computer-bidder@.service` - live state: [docs/inspect.md](docs/inspect.md) `run request --exec` and `run request ssh` read stdin: paste a block with one of them as its last line. ## Docs | doc | what | | --- | --- | | [docs/quickstart-prod.md](docs/quickstart-prod.md) | request from prod bidders: vouches, hold and ssh, sizes, sign-in modes, `run requester` | | [docs/bidder.md](docs/bidder.md) | builds and channels, a bidder in the foreground or as a service, upgrade, self-update | | [docs/quickstart-local.md](docs/quickstart-local.md) | a whole market on one machine | | [docs/gateway.md](docs/gateway.md) | Kubernetes clusters from the gateway | | [docs/how-it-works.md](docs/how-it-works.md) | the protocol: request, bid, accept, receipt | | [docs/README.md](docs/README.md) | every other doc | ## License Unlicense (public domain).