Docs

Run code in sandboxes

Use sandboxes to give application or agent code an isolated execution environment. The application controls sandbox creation, task execution, and cleanup through the SDK.

Requirements

You will need the following to get started:

  • Access to Sandboxes and the credentials required by the selected setup guide
  • An image and command for the code that the sandbox will execute
  • A decision about network access, credentials, and data that the code can use

1. Choose the deployment location

Use Northflank cloud or your cloud. Complete the selected setup before starting the application integration.

Retain the access and capacity requirements from that guide. For your cloud, prepare the required cluster resources first.

2. Create a sandbox and execute a task

Use the SDK quickstart. Start with a representative task and the image that the application will use.

Provide only the credentials and connections required by that task. Make sure that the sandbox starts and the command produces the expected result.

3. Handle the application lifecycle

Use the sandbox management guide to handle task completion and cleanup. Define application behavior for a task error, an unavailable sandbox, and a task that exceeds its expected duration.

Copy or store required results before removing the environment. Make sure that the application handles its result and cleanup paths, not only a successful command.

Choose the related workflow

For a scheduled container task, read Run background tasks. For a cloud development environment used by a coding agent, read Use a cloud coding agent.

© 2026 Northflank Ltd. All rights reserved.

northflank.com / Terms / Privacy / feedback@northflank.com