Skip to content

How to run OpenCode in the cloud

OpenCode has no hosted cloud of its own: it runs where you install it, and its remote features connect you to a server you run yourself. So running OpenCode in the cloud means giving it a Linux machine that stays up without your laptop. On Quivvo, every machine has OpenCode installed. You create one, sign in to a model provider, and start OpenCode in a shell or as a background job.

That's as of 29 November 2026, when OpenCode's site and docs described no service that runs the agent for you. Its paid offers are for models, not machines.

Step 1: Create a machine and send your code

command -v quivvo >/dev/null || npm i -g quivvo@latest
quivvo create --name oc
quivvo push ./api oc --include .git

push sends the directory the way git sees it, without .env files or other credentials, and it lands in the machine's home as api. --include .git sends the history too, so OpenCode can use git there. New accounts get $5 of credit with a $1 card check before the first machine, which stays as credit.

Step 2: Sign in to a model provider

quivvo ssh oc -- opencode auth login

Pick a provider and paste its key, or follow the sign-in link it prints. The credentials are saved in ~/.local/share/opencode/auth.json on the machine's disk, so you do this once. If you'd rather keep the key off the machine, pass it with each command, as in step 4.

Step 3: Work in it

quivvo ssh oc --cwd api -- opencode

That opens OpenCode's interface in your terminal, running on the machine. opencode -c continues the last session, and opencode models lists the models your providers offer.

Step 4: Leave it working

opencode run takes a prompt and works without the interface. Start it as a background job and it carries on after you disconnect:

JOB=$(quivvo exec oc --cwd api --env ANTHROPIC_API_KEY --background --timeout 3600 -- 'opencode run --auto "fix the failing test and run the suite"')
quivvo jobs wait oc "$JOB" --timeout 100
quivvo jobs logs oc "$JOB" --tail 50

--env ANTHROPIC_API_KEY sends the key from your own environment for this job only. Leave it out if you signed in on the machine. --auto approves whatever OpenCode would otherwise ask about, which is reasonable on a machine that holds only this checkout. A job runs for up to 24 hours, and keeps the machine awake until it ends. jobs wait exits 124 while the job is still going, so run it again.

To pick up where a job left off, open the interface and continue: quivvo ssh oc --cwd api -- opencode -c.

Step 5: Reach it from your browser

OpenCode can serve its interface over HTTP. Start the server as a job, with a password, and forward the port to your computer:

export OPENCODE_SERVER_PASSWORD="choose-a-password"
quivvo exec oc --cwd api --env OPENCODE_SERVER_PASSWORD --background --timeout 86400 -- "opencode serve --hostname 0.0.0.0 --port 4096"
quivvo port-forward oc 4096

Then open http://localhost:4096 and sign in as opencode with your password. OpenCode on your own computer can attach to the same server with opencode attach http://localhost:4096. The server counts as a running job, so the machine stays awake and bills until you stop it with quivvo jobs kill.

Is it safe to let OpenCode run unattended?

OpenCode has no operating-system sandbox of its own. Its permissions docs say a shell command runs with the host user's file, process and network access, and rules decide only what it asks about first. So the boundary has to be the computer it's on. A Quivvo machine is a Firecracker microVM with its own kernel that holds only what you sent it, which is why --auto is reasonable there and not on your laptop. See how to sandbox an agent harness.

What does it cost?

A 2 vCPU, 4 GiB machine costs $0.054 an hour while it runs. It suspends after 30 idle minutes, or 15 on the Free plan, and then pays for disk only. Used two hours on each working day, that comes to about $5 a month with its disk. The model is separate: you pay your provider.

Which version of OpenCode is on the machine?

Machines come with OpenCode 1.x from the opencode-ai package, and these commands are for it. OpenCode's docs also cover a newer CLI whose commands differ, so if a command here doesn't match what you've read there, run opencode --help on the machine. You're root, so you can install another version beside it.

Can I run it next to Claude Code or Codex?

Yes. They're installed on the same machine, each with its own sign-in. See several harnesses on one machine.

Updated 29 November 2026

Give your agent a computer

npx quivvo@latest sh
Start a machine