Images and networking

Repo snapshots, install commands and sandbox status, plus network egress, port forwarding and SSH key setup for agent machines.

On this page

A cloud sandbox starts from an image: either a snapshot built from one of your repos or a blank Ubuntu 24.04. This page covers how snapshots are built and refreshed, and how machines reach the network and expose ports.

Snapshots and blank images

When you create a sandbox, Start from offers:

OptionWhat you get
A repo snapshot, for example acme/platform snapshotThe repo checked out with dependencies installed and build caches warm. Shows when it was last updated.
Blank Ubuntu 24.04A clean machine. The run installs whatever it needs.

Snapshots include node_modules and build caches, so first runs are fast. Use a blank image for work that must not depend on cached state, such as reproducing a clean-install bug.

Install commands

Each repo in a factory’s Repos tab has sandbox settings:

  • Size: Standard (“Most repos”) or Large (“Monorepos, heavy builds”).
  • Platform: Linux, with macOS and Windows where your plan allows.
  • Install commands: one command per line, run in order when the snapshot is built.
corepack enable
pnpm install --frozen-lockfile
pnpm build --filter @acme/ledger...

Keep install commands deterministic. Anything that reads secrets should read them from environment variables you added in Settings → API keys & secrets; values used while building are not baked into the snapshot.

“Sandboxes are shared across this workspace. Removing a repo here keeps its sandbox.” Another factory using the same repo reuses the same snapshot.

Refresh a snapshot

Snapshots go stale as dependencies change. Choose Refresh snapshot from the repo’s menu to rebuild it from the default branch. Runs in progress keep the snapshot they started on; new runs use the refreshed one.

Sandbox status

StatusMeaning
No sandboxSandbox settings exist but nothing has been built yet. Choose Set up sandbox.
Waiting for a builderQueued behind other builds.
Building sandbox…Running your install commands.
Sandbox readyRuns can start from it.
Sandbox failedAn install command failed. The build log shows which line.
Sandbox cancelledSomeone stopped the build.
Refreshing sandbox…Rebuilding; runs keep using the previous snapshot meanwhile.
Refresh failed · sandbox readyThe rebuild failed, but the previous snapshot still works.

Network egress

Network access is controlled at two levels:

  • The agent’s Network egress tool. When it is off, commands that reach the network beyond Duun’s package caches fail.
  • Commands with network access in Settings → Action approvals. When on, Duun always asks before a command with network access runs, regardless of factory rules.

Package installs from public registries during snapshot builds don’t count as agent egress. During a run, curl, wget, and scripts that open connections do. The Autonomous in sandbox permission mode means a disposable, offline sandbox: no asks, and no network beyond package caches.

To let an agent call one internal service, prefer an integration or MCP server over opening egress: calls are scoped, logged and follow approvals.

Port forwarding

To see what an agent built, such as a dev server or Storybook, forward a port from the machine. Choose Forward a port, enter the port and pick a visibility:

VisibilityWho can open it
PrivateOnly this machine
WorkspaceAnyone signed in to the workspace
Public linkAnyone with the link

“Forwarding is logged and stops when the machine does.” The forwarded URL opens in a new tab and appears in the run’s Preview tab. Use Public link sparingly: anyone with the URL can reach the port until the machine stops.

SSH computers

  1. In Settings → Computers & sandboxes, choose SSH computer.
  2. Enter the Host, User and Port (22 by default).
  3. Copy the public key Duun shows and add it to ~/.ssh/authorized_keys for that user on the machine.
  4. Select Test connection, then save.
# on the SSH computer, as the user Duun will connect as
mkdir -p ~/.ssh && chmod 700 ~/.ssh
echo "ssh-ed25519 AAAA… duun@acme" >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

Use a dedicated, unprivileged user. Duun’s agents run commands as that user with a per-run config; they don’t need sudo, and the default command rules deny it. If the machine sits behind a firewall, allow inbound SSH from Duun’s egress addresses, listed on the machine’s setup screen.

To remove access, delete the machine in Settings, which revokes Duun’s key, or remove the key line from authorized_keys yourself.

    Type to search the docs, help center and blog.