Every machine with the control token gets the same workspace passwords. A second laptop can use the same Worker and the same workspaces.
Steps
Copy the control token
Copy
~/.cf-opencode/control-tokenfrom the first machine to the same path on the second machine. Keep file mode 600.You can set
CF_OPENCODE_CONTROL_TOKENinstead of the file.Record the Worker
On the second machine, run
initwith the Worker URL:cf-opencode init --url https://cf-opencode.example.workers.devThis deploys nothing. It checks that the Worker accepts the control token and saves the URL.
Connect
cf-opencode connect my-repo
Both machines now work on the same workspace and the same session at the same time.
Notes
init --urlaccepts only aworkers.devURL.- With
--url,initdoes not set up GitHub. It reportsno GitHub token on the Workeronly if the Worker has none. Usecf-opencode git-tokenon a machine with a Cloudflare login. - Commands that change the deploy (
upgrade,uninstall,git-token) need a Cloudflare login on that machine.init --urldoes not record an account. - A workspace made before password derivation moves to it on its next
connect. OpenCode restarts once.