Primary navigation

Cloud environments

Build, tune, and share reusable environments that ZeroTwo Cloud tasks run in

A cloud environment is a saved setup that Code tasks start from when they run on ZeroTwo's servers instead of your computer. It records which GitHub repositories to clone, what to install, how to start the project, which variables and secrets to supply, and which hosts the sandbox may reach. Cloud tasks keep running on the server while your computer sleeps. Each task gets its own sandbox, so one task's edits never alter the environment.

Everything lives under Settings > Code Cloud, which has two tabs: Environments and Personal vault. On the web, cloud is the only place Code tasks can run. On the desktop app you opt in per task through the environment pill, as described in Environments.

Environments are private. The Who can use setting is fixed to Only me, and there is no way to share one with teammates.

Start a task in a cloud environment

In a new Code task, choose Cloud from the environment pill (desktop), then open the Choose environment pill and pick a published environment. The pill lists only published ones. If you have none, use Create environment in the same menu, or Manage environments to jump to Settings > Code Cloud. Cloud tasks need a GitHub-connected repository, and the menu offers Connect GitHub when you have not linked one yet.

Create and publish an environment

  1. Open the dialog

    Choose Create environment from the Choose environment pill, or from Settings > Code Cloud > Environments. The Create a cloud environment dialog opens.

  2. Pick repositories

    Under Select repositories, tick one or more repositories from your GitHub connection. You can search and filter by owner.

  3. Get started

    ZeroTwo opens a setup thread, works out what the repositories need, installs it, and tests the result. Answer its questions or tell it which versions, commands or services you want.

  4. Review

    Open the environment to check the draft, then select Save draft or Publish.

  5. Run

    When the badge reads Published, the composer pill shows Environment published · Start a task.

Saving a draft stores the configuration, while publishing also snapshots the machine ZeroTwo prepared during setup so later tasks start from it. If that machine has already been reclaimed, publishing still succeeds as configuration only, and new tasks clone and install from scratch. A row without a published version shows Unpublished, and edits after publishing show Unpublished changes. In the row's … menu, Continue setup reopens an unfinished setup thread and Start a task begins one in a published environment.

Customize installation and startup

The Setup section of the editor holds two fields. The Install script is a shell script, up to 64 KB, that installs dependencies and prepares the project. The Start skill is up to 16 KB of instructions that ZeroTwo reads when a task begins, covering how to run, test and check the project. ZeroTwo usually drafts both during setup, and while a field differs from the published version the editor notes whether ZeroTwo or you last changed it.

Reuse and update saved state

Each publish creates a new numbered version. New tasks restore the latest published snapshot, so cloned repositories and installed dependencies are already in place, while tasks already running keep the state they started with. To change an environment, open it from Settings > Code Cloud > Environments, edit it, and choose Republish (it reads Save & republish when there are unsaved edits). Only tasks started afterwards see the change.

Environment variables and secrets

The editor has an Environment variables section (up to 100) and a Secrets section (up to 50). Both are delivered to the shells the agent opens, as ordinary environment variables. Secret values are write-only: ZeroTwo never shows them again, keeps them out of published snapshots, and loads them only when a shell starts.

  • Names must be upper snake case, up to 128 characters, and values run from 1 to 8,192 characters.
  • PATH, HOME, SHELL, USER, BASH_ENV, ENV and PROMPT_COMMAND are reserved, as are names starting with LD_, GIT_, E2B_ or ZEROTWO_.
  • Each secret can list Allowed domains, which are added to the sandbox's network allowlist.

Supply personal values

The Personal vault tab holds values that belong to you rather than to an environment. Select Add, then choose a Type (Environment variable or Network secret), a Key, a Value, optional Allowed domains for a network secret, and Applies to: All environments or one environment. On desktop, Import lets you choose variables from your local login shell and save them to the vault.

A vault entry only reaches a task when the environment asks for that key. The editor then shows the key as supplied from your vault rather than missing. A value set inside the environment wins over the vault entry for that environment, which wins over the entry for all environments.

Internet access

Under Internet access, the switch Allow ZeroTwo to access the internet turns outbound access on or off, and Allow domains picks a preset:

  • Package managers, the default, allows common package registries and download hosts.
  • Custom domains only allows just the hosts you list under Additional allowed domains.
  • All (unrestricted) removes the limit.

With access switched off, nothing leaves the sandbox. During setup the sandbox can also reach GitHub so it can clone your repositories. Entries can be a hostname, a *.hostname wildcard, an IPv4 address or a CIDR range, with no scheme, path or port, and at most 100 across the list and every secret. ZeroTwo can propose domains for the list; the editor shows them as ZeroTwo suggests allowing these domains for you to accept or dismiss. Allowing a host grants no credentials.

Troubleshoot setup and runtime access

Setup fails or a required tool is missing

Open the setup thread (Continue setup in the row's … menu) and ask ZeroTwo to diagnose the failing command and run it again. Fix source files, manifests or lockfiles in a normal task first, then republish.

A package download or HTTPS request fails

Confirm that the exact host, including any separate download host, is allowed under Internet access, and that a secret's Allowed domains include the host it is sent to. Save and republish, then try again in a new task.

A required value is missing

Use Environment variables for plain settings and Secrets for credentials. For personal values, make the vault Key match the name the environment requests, and check that Applies to covers this environment.

An environment or its updates aren't available for a task

Look for an Unpublished or Unpublished changes badge in the environment list, then publish or republish and start a new task. Tasks that were already running keep their old state.