Templates
A template sets the system, files and size of a sandbox. Use a ready one, or build your own from a Dockerfile.
Ready templates
With no name, Sandbox.create() and fdtn create use base.
| Template | Size | Free disk | Price | What is inside |
|---|---|---|---|---|
base | 2 vCPU, 512 MiB | 5 GiB | $0.039/h | Debian 12, Python 3.11, Node.js 20, git, curl |
small | 2 vCPU, 512 MiB | 5 GiB | $0.039/h | Ubuntu 24.04, Python 3.12, git |
claude | 2 vCPU, 2 GiB | 20 GiB | $0.048/h | Debian, Node.js 24, Python 3, Claude Code, git, ripgrep. Runs on our own machines. Coding agents |
Coding agents also come in larger sizes: claude, codex and opencode with -2vcpu-4gib, -4vcpu-8gib or -8vcpu-16gib (for example claude-4vcpu-8gib). Every coding-agent template has 20 GiB of disk. Only plain claude stays on our own computers; for a sized one, add --trusted or metadata fdtn_own_fleet_only=1. The Templates page in the portal shows the current list.
Install more tools at run time with pip, npm or apt-get (as root). For large installs, build a template with more memory.
An unknown template name fails with 404. fdtn template ls lists your templates.
A build is free. At a spending limit, new builds stop (Limits). You do not need Docker.
1Write a Dockerfile
Save as Dockerfile in an empty folder:
FROM python:3.13-slim-bookworm RUN pip install --no-cache-dir pandas WORKDIR /app
fdtnreadsfdtn.Dockerfilefirst, thenDockerfile.FROMimages come from docker.io, ghcr.io or quay.io.- Use an image with an arm64 build, such as the official Python, Node.js, Debian and Ubuntu images.
2Build the template
$ fdtn template create my-app
Using ./Dockerfile
Building template my-app...
...
Template my-app is ready.
Start a sandbox from it with: fdtn create my-appThe first build takes a minute or more. Later builds cache unchanged steps. If a step fails, fix it and run again (errors).
| Option | What it does |
|---|---|
-d | Dockerfile path |
--cpu-count | vCPU, default 2 |
--memory-mb | Memory, default 1024 |
--cmd, --ready-cmd | Start command and its ready check |
An existing name rebuilds that template. All options
$ fdtn template create web --cmd "node /app/server.js" --ready-cmd "curl -sf http://localhost:3000"
Names: lowercase letters, numbers, dashes and underscores, up to 128 characters. After Ctrl-C, the build can still finish.
3Check the template
$ fdtn template listStart sandboxes only when the build is ready.
4Start a sandbox from it
Python · TypeScript · CLI
from fdtn import Sandbox sbx = Sandbox.create("my-app", request_timeout=120) print(sbx.commands.run("python -c 'import pandas; print(pandas.__version__)'").stdout) sbx.kill()
import { Sandbox } from '@fdtn/sdk' const sbx = await Sandbox.create('my-app', { requestTimeoutMs: 120_000 }) console.log((await sbx.commands.run("python -c 'import pandas; print(pandas.__version__)'")).stdout) await sbx.kill()
$ fdtn create my-appThe first start on a computer can take up to a minute. Later starts take less than 500 ms.
Sizes
For another size, build another template.
| Resource | Choices | Default |
|---|---|---|
| vCPU | 1 to 16 | 2 |
| Memory | Up to 32 GiB, in 512 MiB blocks | 1 GiB |
| Disk | Free. 5 GiB up to 512 MiB memory, 10 GiB up to 2 GiB, else 20 GiB. | 10 GiB |
Prices: Pricing. A large size can wait in the queue until a computer has its memory free.
Build from code
from fdtn import Template template = ( Template() .from_image("python:3.13-slim-bookworm") .run_cmd("pip install --no-cache-dir pandas") ) Template.build(template, "my-app", cpu_count=2, memory_mb=4096)
import { Template } from '@fdtn/sdk' const template = Template() .fromImage('python:3.13-slim-bookworm') .runCmd('pip install --no-cache-dir pandas') await Template.build(template, 'my-app', { cpuCount: 2, memoryMB: 4096 })
fdtn template init -n my-app -l python-sync makes a starter folder with build scripts. Run the commands it prints; fdtn template create reads only Dockerfiles.
Delete a template
$ fdtn template delete my-app # asks first $ fdtn template delete a b --yes # no question, for scripts
Limits
COPYuploads: 1 GiB each (413), 10 GiB per workspace per UTC day (429). Download large files in aRUNstep.- Build logs:
fdtn template build logs <template-id> <build-id>.fdtn template createprints both IDs.