- using the CLI
- manually using the SDK
CLI
You can use the E2B CLI to create a new template.Install the E2B CLI
Install the latest version of the E2B CLI
Manual
Install the packages
Requires the E2B SDK version at least 2.3.0
.env file
Create a new template file
Create a template file with the following name and contentCreate a development build script
Create a production build script
Build the template
Build the development templateCreate a new Sandbox from the Template
The template name is the identifier that can be used to create a new Sandbox.
Build limits
Template builds are subject to the following limits:- Max build duration: Builds can run for up to 1 hour. If a build exceeds this, it will be terminated.
- Max vCPUs per build: 8 on Hobby, 8+ on Pro, custom on Enterprise.
- Max memory per build: 8 GB on Hobby, 8+ GB on Pro, custom on Enterprise.
- Max disk size per build: 10 GB on Hobby, 20+ GB on Pro, custom on Enterprise.
- Concurrent builds: 20 on Hobby and Pro, custom on Enterprise.