Using sandboxes

You can use Sandboxes in the Developer area to create and manage your sandboxes in the studio.

311cb1a Click sandboxes in the developer area

Once open, you'll see any sandboxes you've already created first, followed by the sandboxes that've been created by others in your project (by default this is collapsed).

5a48ab7 Sandbox management

Use the search to look for a particular sandbox (it's based on the name of the sandbox).

889bcc1 Use search to search for a sandbox label

For how to work with sandboxes, see the sandboxes article.

Creating a sandbox

To create a sandbox, follow the steps below.

  1. Click Add sandbox.

f186074 Click add sandbox to add new sandbox

  1. Input a Label (must only contain lowercase letters, numbers, and dashes).

5985274 Sandbox label

  1. Input the Branch which has the desired backend features you want to work on (it'll default to your master branch if left empty).

222dbf9 Input a branch

Information icon

The Add public DNS option is automatically selected. You can't clear this.

  1. Click Create.

f38d7ed Click create

Your sandbox will then be brought up. This will take less than 10 minutes.

Halting a sandbox

Once you've finished working, you can Halt or Destroy your sandbox using the corresponding buttons:

95bdb6b Halting or destroying a sandbox

If you halt your sandbox, you can bring it up again when you want to by clicking the Bring up button:

d5bf09a Bring up a halted sandbox

Information icon

You should regularly destroy your sandbox and then create a new one. It's actually a good idea to destroy the sandbox when you finish work and create a new one the next day to avoid issues.

Public sandbox

All sandboxes are created with public DNS enabled. This allows you to access the projects running on the sandbox directly from any web browser without the need for local developer tooling, such as CLI. This can be useful to:

  • Show a certain feature (which only exists in a branch) to non-technical users
  • Work with code that strictly requires HTTPS connection (such as payment extensions)
  • Preview a certain production build without deploying it to your staging environment
  • Run automated tests towards a certain state of your code

Once a sandbox is running, you can click the See public URLs button to access the list of URLs for your sandbox.

79f473b Click see public urls

You can then click the open icon to open the URL. Or the copy icon to copy the URL for you to share with your team.

e6dd4fb Click the copy button or the open link

Sandbox statuses

A sandbox can have the following 5 statuses:

  • Transient — appears grayed out, the sandbox is being brought up, and you can't use it for development yet.
  • Running — everything is working correctly and you can use this sandbox for your development.
  • Halted — the sandbox was halted by clicking Halt, you can use it again by clicking Bring up.
  • Debuggable — the sandbox encountered an error and you can't use it for development. You can use the sandbox to find what triggered the error.
  • Errored — the sandbox encountered an error and you can't use it.

For both the Debuggable and Errored states, you'll see a bug icon like the below:

Sandbox debug button

If you click this icon, you'll open the logs where you can look into the components that failed to initialize. The failed components should already be expanded, or you can use the + icon to expand a component section and look into the issues.

Sandbox debug logs

Sandbox notifications

We recommend destroying your sandbox once you've finished work for the day. And then bring up a new one the next day. This is because out-of-date sandboxes can cause a lot of issues. Because of this, you'll see a warning notification when your sandbox is more than 3 days old:

Sandbox notification

You can continue working on this sandbox if you want to, but if you run into any errors, you should destroy the sandbox and create a new one to see if the issue still occurs.