Skip to main content

Sandboxes

This guide walks you through creating, connecting to, and managing your first Targon Sandbox.

Automating sandboxes? See the Sandboxes API reference for endpoints, request bodies, WebSocket access, and error responses.

What is a Sandbox?​

A Sandbox is a short-lived, isolated Linux environment for development, testing, previews, and agent workloads.

Think of it as a disposable computer. It has its own files, resources, and network access, but it is designed to be created, copied, paused, and deleted more quickly than a traditional virtual machine.

Sandboxes are ideal when you need:

  • A clean environment for trying code
  • An isolated workspace for an agent
  • A browser-based terminal or Linux desktop
  • Several independent copies of the same setup
  • Automatic pause and deletion controls
  • A configured environment you can reuse as a template

Use a Virtual Machine instead when you need long-lived infrastructure or reserved capacity.

Preview: Sandboxes are currently in beta. Available controls may vary by template and organization.

Before you begin​

You need access to a Targon organization.

An SSH key is optional. You only need one if you plan to connect from your own terminal. The browser terminal and desktop do not require your personal SSH key.

Creating a Sandbox​

  1. Open Sandboxes:

    • Go to the Dashboard, select your organization, and open Sandboxes.
  2. Start creation:

    • Click Create sandbox.
  3. Choose a name:

    • Use lowercase letters, numbers, and hyphens.
    • For example: website-preview, agent-test-1, or python-scratch.
  4. Choose a template:

    • Use the size filter to narrow the list.
    • Compare the CPU, memory, and hourly prices.
    • Select a template that is ready.
    • If you need a graphical desktop, choose a template with desktop support.
  5. Set the lifecycle:

    • Turn on Idle timeout to pause the sandbox after a period without activity.
    • Turn on Delete timeout to permanently delete it after a fixed period.
    • Both values are entered in seconds.
  6. Add an SSH key (optional):

    • Choose an existing organization key or add a new one.
  7. Create the sandbox:

    • Click Create Sandbox.

Targon opens the new sandbox automatically. Its status normally changes from Provisioning to Running when it is ready.

Sandbox statuses​

  • Registered: Created but not started
  • Provisioning: Targon is preparing the environment
  • Running: Ready to use
  • Paused: Suspended until you resume it
  • Deleted: Removed manually or by an automatic timeout
  • Error: The sandbox could not start or encountered a failure

Status updates may take a few seconds.

Connecting to a Sandbox​

Open a running sandbox and choose the connection method that fits your work.

Browser terminal​

Open the Terminal tab for an interactive command line.

Targon creates a terminal session and connects it in the browser. If the connection drops, use the reconnect control. You can create another session when you need a separate shell.

Browser desktop​

Open the Desktop tab for a graphical Linux environment.

The desktop may take a little longer to start than the sandbox. Use Reconnect if the viewer disconnects or Full screen when you need more room.

SSH​

Copy the SSH command from the Overview tab and run it in your local terminal. SSH works only when the sandbox has one of your organization's keys attached.

Finding a Sandbox​

Return to Sandboxes to see all environments in your organization.

Use the search box to find a sandbox by name, template, workload ID, or parent. Use the filters to focus on Running, Paused, or Deleted sandboxes.

Related parents and child forks appear together as a family. Click Open to view a sandbox.

Managing a Sandbox​

Pause and resume​

Pause a running sandbox when you want to keep its environment without leaving it fully active. Use the pause control from the sandbox list or detail page.

Use the play control to resume it. The idle timeout can also pause a sandbox automatically after inactivity.

Fork a sandbox​

Forking creates an independent child from the current environment:

  1. Click the fork icon beside the sandbox.
  2. Enter a name for the copy.
  3. Confirm the fork.
  4. Wait for the child to start.

The child appears beneath its parent. It has its own workload ID and can be changed or deleted independently.

Use forks for parallel experiments, separate agent tasks, or risky changes you do not want to make in the original.

Expose an application​

If an application listens on a port:

  1. Open the sandbox.
  2. Select Manage.
  3. Find Exposed Ports.
  4. Add the port and choose TCP or UDP.
  5. Save the changes.

Port 22 is reserved for SSH. Available addresses appear under Service Ports on the Overview tab.

Rename a sandbox​

Open Manage, find General, enter the new name, and save it.

Renaming a sandbox does not change its workload ID.

Update lifecycle settings​

Open Manage and find Lifecycle.

  • Idle timeout sets the number of inactive seconds before pausing.
  • Delete timeout sets the number of seconds before permanent deletion.

You can enable or disable either timer. If both are enabled, the idle timeout must happen before the delete timeout.

Update SSH keys​

Open Manage and find SSH Keys. Select the organization keys that should have access, then update the sandbox.

Create additional keys from Settings → SSH Keys.

Publish a template​

Publish a configured sandbox when you want to reuse its setup:

  1. Open Manage.
  2. Find General.
  3. Enter a template name.
  4. Click Publish.

Publishing may take a short time. Open Templates → My templates to check its status and use it for another sandbox.

Delete a sandbox​

Use the delete control on the sandbox list or detail page, then confirm the action.

Deletion is permanent. Deleting a parent does not automatically delete its child forks.

Understanding the Sandbox page​

  • Overview shows status, resources, prices, template, ports, lifecycle settings, SSH details, and parent information.
  • Terminal opens an interactive command line.
  • Desktop opens the graphical environment.
  • Manage contains settings you can change.

The page refreshes status and workload details automatically.

Templates​

Open Templates from the sandbox sidebar:

  • Platform contains templates maintained by Targon.
  • My templates contains templates published by your organization.

Only ready templates can create a sandbox.

Billing​

Open Billing to review sandbox hours, costs, usage trends, and recent activity.

The Overview tab shows the running and paused hourly prices for an individual sandbox.

Get help​

Click Get support from the Sandboxes page. Choose the affected sandbox so the support request includes the correct context.

API access​

To automate sandbox creation, lifecycle actions, terminal sessions, files, and desktop connections, see the Sandboxes API reference.