Signed Contract Quickstart
Both paths below assume you already have an AT Protocol identity, meaning a DID and a PDS to hold your records.
The socialweb-computer binary runs the whole flow in one process and is the fastest way to start. Use run request if you need compute, or install bidder if you have machines to provide.
Contents
Install
Linux amd64 or arm64, the current release of channel stable:
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):
git clone --depth 1 https://knotless.dev/socialweb.computer/socialweb-computer-kcp
cd socialweb-computer-kcp
scripts/install.sh stable
export PATH=$HOME/.local/bin:$PATH
scripts/install.sh reads the channel record from the releases account (did:plc:gmlkrhimoueejcertevr4hl3), follows it by CID to the version and manifest, and verifies the download against the binary's CID in that manifest before installing to ${PREFIX:-$HOME/.local}/bin.
It prints installed stable <version> (<sha256>) to ... and the version line. For a main commit or dev build, see docs/bidder.md.
Requesting Compute
Running the Requester
One command handles steps 1-4 below and is the recommended way to request compute. It writes the VM record and RFP, collects bids, signs the accept, waits for the guest, runs your command (or drops you into a shell), and releases the VM.
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. Hold a VM, ssh in, sizes, app passwords, the long-lived
requester: docs/quickstart-prod.md. As your account or as an identity associated to it:
Who you run as.
See quickstart-prod.md for sign-in modes (QR code, browser, app password), holding a VM, ssh, sizes, and the long-lived requester.
Step 1: Describe the Machine
Define a compute.vm record with cpus, mem, disk, network, a role, and cloud-init user data:
$type: com.publicdomainrelay.temp.compute.vm
cpus: 2
mem: 4G
disk: 40G
role: ml-inference-worker
Step 2: Publish the RFP
Publish a market.rfp with a strong reference to the VM record. It goes to every bidder discovered through the relays:
$type: com.publicdomainrelay.temp.market.rfp
payload: {uri: at://did:plc:you/com.publicdomainrelay.temp.compute.vm/3mm3d, cid: bafyrei...vm}
Step 3: Wait, Score, and Accept
The bid window runs and the policy picks a winner: the first allowed free bid, or the lowest-cost bid otherwise. A signed market.accept goes to the winning provider's submitAccept.
Step 4: Get the Receipt
The provider provisions the machine and mints a market.receipt that anchors the whole chain. To verify that the contract happened (see security), check:
- The NSID
- The author DID
- That the CIDs bind straight through
Providing Compute
Running a Bidder
The automated bidder service handles steps 1-4 below and is the recommended way to provide machines. It subscribes to the relays, takes RFPs, places bids, takes accepts, and provisions VMs.
sudo "$(command -v socialweb-computer)" install bidder --handle <your handle> --bidder-operator-signin <your handle>
Linux with /dev/kvm: docs/bidder.md; an agent of your account or your account itself:
Who you run as.
See bidder.md for builds and channels, who it serves, upgrade, and self-update.
Step 1: Pick a Policy and Watch the Market
Choose who is allowed to reach you. The default policy is bidder-tangled-vouch, with bidder-only-me and bidder-mutuals also available. Then take market.rfp records from submitRfp and from the relays (see trust & policy).
Step 2: Place a Bid
Publish a market.bids.free payload, then publish a market.bid that binds it to the RFP.
Step 3: Verify the Accept
Before provisioning anything, verify that:
- The accept references your bid's exact uri and cid
- It comes from the RFP's author
- You still have room
Step 4: Provision and Mint the Receipt
Provision the VM and sign a market.receipt that anchors the rfp, bid, and accept.
References
Every record type and validation rule is documented in the spec. You can also try a whole market on one machine.