# Sandbox Settings

> The sandbox of an API Maker account - how many processes run your code, the npm packages they get, the Docker image they run in, the origins allowed to call the APIs from a browser, and the automatic restart.

Source: https://docs.apimaker.dev/v1/docs/settings/sandboxSettings.html

Your code runs in sandbox processes : containers built for the account, with the npm packages you choose. This page shapes them.

| | |
|---|---|
| Page | `Utility → Sandbox Settings` |
| Sandbox count | How many sandbox processes run at once. Each one runs the [process initializers](https://docs.apimaker.dev/v1/docs/features/process-initializers.html). |
| Dependencies | The npm packages available to every custom API, hook, event, scheduler and utility class, with their versions and sub dependencies. |
| Docker file | The image of the sandbox : a base file, an extended base and the final file, each editable and resettable, with the build logs and the final `package.json`. |
| Allowed origins | The web origins allowed to call the APIs from a browser : a name and a domain per row. Empty : every origin. |
| Auto restart | Restart the sandboxes every N seconds, for code which leaks. |

## Dependencies

1. Add a package with its name and version. The build installs it and lists its sub dependencies.
2. `import * as dayjs from 'dayjs'` in your code, like any npm package.
3. A package which needs a system library goes in the Docker file : install Python, ImageMagick or a client library there.

- Private registries are not supported.
- The schema generation runs once, without your packages : keep computations out of it.

## Allowed origins

- With one origin listed, a browser request from any other origin is refused with `403` before anything runs. Add the origins of your web apps, and keep the list empty while developing locally if you prefer.

## Related

- [Process initializers](https://docs.apimaker.dev/v1/docs/features/process-initializers.html) · [Security features](https://docs.apimaker.dev/v1/docs/features/security-features.html#allowed-origins) · [Custom APIs](https://docs.apimaker.dev/v1/docs/apis-all/custom-apis/user-created-custom-api.html)
