Delete = archive¶
DELETE /sandboxes/:name never discards data. It:
- stops the sandbox;
- writes every Docker volume of the sandbox's compose project to
opt/archive/<owner>/<name>-<timestamp>/volumes/<volume>.tar.gz(the DinD data volume holds all inner images, containers and volumes); - copies
opt/sandboxes/<owner>/<name>/(compose files, certs, credentials) to.../config/and writesmanifest.json(with the owner); - only then removes the containers, the volumes and
opt/sandboxes/<owner>/<name>/(and the owner's directory once it is empty). If any archive step fails nothing is removed and the call returns 500.
Afterwards the name is free again and the sandbox URL returns 404. Archives are never pruned automatically; expect a few hundred MB per sandbox, more with large images.
Restoring by hand:
A=opt/archive/alice@example.com/p7y-alice-2026-09-26T21-47-01-401Z
mkdir -p opt/sandboxes/alice@example.com
cp -r $A/config opt/sandboxes/alice@example.com/p7y-alice
for f in $A/volumes/*.tar.gz; do
v=$(basename $f .tar.gz)
docker volume create --label com.docker.compose.project=p7y-alice $v
docker run --rm -v $v:/data -v "$PWD/$A/volumes":/archive alpine tar xzf /archive/$v.tar.gz -C /data
done
docker compose -f opt/sandboxes/alice@example.com/p7y-alice/docker-compose.yml up -d