SSH to a VM
ssh <handle>@ssh.socialweb.computer rents a VM from the market under your account and runs your command (or opens a shell) as root. The VM stays running when the session ends, so reconnect using its accept URI and release it when you're done.
Contents
Setup
Before connecting, set up your account and vouches:
- Sign in with your atproto handle at https://ssh.socialweb.computer and add your ssh public key.
- Exchange vouches with a bidder operator so they vouch for you and you vouch for them (Vouches).
Usage
Run a command on a newly rented VM:
ssh <handle>@ssh.socialweb.computer 'uname -a; nproc'
stdout contains only your command's output, while stderr prints the URIs to reconnect to the VM and the command to release it:
vm kept: accept at://did:plc:.../com.publicdomainrelay.temp.market.accept/... receipt at://did:plc:.../com.publicdomainrelay.temp.market.receipt/...
release: ssh -o SetEnv="LC_ACCEPT=at://did:plc:.../com.publicdomainrelay.temp.market.accept/... LC_RELEASE=1" <handle>@ssh.socialweb.computer
Every plain ssh command rents a new VM. Pass options as LC_* variables in a single -o SetEnv="A=1 B=2" flag, since ssh only honors the first SetEnv option.
To release the VM automatically when the session ends (one-shot mode), set LC_KEEP_VM=0:
ssh -o SetEnv=LC_KEEP_VM=0 <handle>@ssh.socialweb.computer 'uname -a'
To open a shell instead of running a command, connect without a command:
ssh <handle>@ssh.socialweb.computer
VM Sizing
VMs default to 2 vCPU, 4G memory, and 50G disk. Bidders that can't serve the requested size won't bid. Pass LC_CPUS and LC_MEM to request a different size:
ssh -o SetEnv="LC_CPUS=4 LC_MEM=8G" <handle>@ssh.socialweb.computer 'nproc; free -g'
Reconnecting and Named Sessions
Reconnect using the accept URI printed to stderr or read it from inside the guest:
A=$(ssh <handle>@ssh.socialweb.computer 'jq -r .accept.uri /root/secrets/publicdomainrelay.com/market/accept.json')
ssh -o SetEnv=LC_ACCEPT=$A <handle>@ssh.socialweb.computer 'uptime'
LC_RECEIPT=<receipt URI> (also printed to stderr) works the same way. You can only reconnect to your own VMs, because the gateway looks up the URI among your contracts.
If you want a named VM instead of tracking URIs, LC_SESSION=<name> rents a VM on the first connection and reconnects to that same VM on later calls:
ssh -o SetEnv=LC_SESSION=work <handle>@ssh.socialweb.computer
Releasing a VM
Pass LC_RELEASE=1 with LC_ACCEPT or LC_SESSION to release a VM:
ssh -o SetEnv="LC_ACCEPT=$A LC_RELEASE=1" <handle>@ssh.socialweb.computer
ssh -o SetEnv="LC_SESSION=work LC_RELEASE=1" <handle>@ssh.socialweb.computer
Each command prints released <vm name> and stops any active session in that VM first. Running poweroff inside the guest also ends the contract.
atirc Agents
Run an atirc agent that joins as <name>.<handle> under a matching guest user and reads its config from stdin:
ssh <handle>@ssh.socialweb.computer atirc agent run <name> < agent-config
co/core Inference
Pair a co/core account once from the gateway page (4. co/core inference -> Pair, then approve the code at cocore.dev). Every VM rented afterward gets your key and pi preconfigured for co/core:
ssh <handle>@ssh.socialweb.computer pi -p "hello"
The key is stored at /root/.pi/agent/cocore-config.json (fetched from the gateway over iroh, never placed in cloud-init), and inference is billed to your paired co/core account. pi installs at boot (about 20 s), and your first pi call waits until it finishes. The default model is mlx-community/Qwen2.5-7B-Instruct-4bit, which you can override per call with pi --model <id> -p "..." or by setting defaultModel in /root/.pi/agent/settings.json. Live models are listed at https://cocore.dev/v1/models.
VMs rented before pairing don't have the key or pi, so rent a new VM instead. Set LC_COCORE=0 to rent a VM without the key or pi. To revoke or switch accounts, revoke the key at cocore.dev or use Pair another account on the gateway page for future VMs.
Browser Shell
All VMs on the gateway are listed at app.socialweb.computer. Click Open shell to open a browser shell over the guest's shell and sshd WebRTC tunnels.
Environment Variables
Pass these variables in a single -o SetEnv="..." flag:
| Variable | Description |
|---|---|
LC_KEEP_VM=0 | Release the VM when the session ends (one-shot mode). |
LC_CPUS=<n>, LC_MEM=<size> | vCPUs and memory (for example 8G, 512M) for a newly rented VM. |
LC_ACCEPT=<at:// accept>, LC_RECEIPT=<at:// receipt> | Reconnect to the VM for one of your contracts. |
LC_SESSION=<name> | Rent a named VM on first use and reuse it on later connections. |
LC_RELEASE=1 | Release the VM identified by LC_ACCEPT, LC_RECEIPT, or LC_SESSION. |
LC_VM_NAME=<dns label> | Custom name for the VM. |
LC_POLICY=<name>, LC_POLICY_ARGS=<args> | Requester policy used to pick the bid. |
LC_ATIRC=1 | Include an atirc token in the session (atirc ... commands get one automatically). |
LC_COCORE=0 | Omit the co/core key and pi from a newly rented VM. |
Limits
Sessions and kept VMs have a few limits:
- Connections drop after 1 h, though the VM stays running.
- Only one session can run in a VM at a time. A second connection waits for the first to finish.
- Kept VMs stay running until you release them or power them off, though a bidder can still end a VM under its own policy.
- Only session channels are served. Port forwarding (
open failed: unknown channel type: only session channels are served) and sftp or scp (subsystem request failed) aren't supported. - Passing
LC_CPUSorLC_MEMwhen reconnecting doesn't resize the VM. You'll getthe VM keeps its size (2 vCPU, 4G): LC_CPUS and LC_MEM apply when a VM is rented.
Errors
Common errors and how to fix them:
| Error | Fix |
|---|---|
Permission denied (publickey) | Add your ssh public key at https://ssh.socialweb.computer. |
sign in at https://ssh.socialweb.computer first: ... | Sign in at the URL shown. |
this account was not admitted (on the gateway page) | No operator vouches for you. See Vouches. |
provisioning failed: the guest did not report onNetwork and hostKeys in time (after 7.5 min) | No bidder placed a bid. Check your vouches (verdicts are cached 5 min) or request a smaller LC_CPUS / LC_MEM. |
provisioning failed: LC_CPUS: cpus "x" is not a vCPU count | Pass a numeric vCPU count. |
provisioning failed: LC_MEM: mem "x" is not a memory size such as 8G | Pass a memory size such as 8G. |
reconnect failed: no VM of yours has the accept at://... | The URI belongs to another account or its contract is gone. |
reconnect failed: the VM of accept at://... has ended: <reason> | The VM was released (released, deleted_on_request), powered off (guest_poweroff, vmm_exited), or ended by the bidder. Rent a new VM. |
reconnect failed: LC_ACCEPT "x" is not an at:// URI of a com.publicdomainrelay.temp.market.accept record | Pass the exact accept URI as printed. |
release failed: LC_RELEASE needs LC_ACCEPT, LC_RECEIPT or LC_SESSION to name the VM | Specify which VM to release. |