Skip to content

Deploying apps

A deployment is your app, built from a Git branch and kept running in its own sandbox. Its port opens at an HTTPS address. When nothing has used it for five minutes the sandbox sleeps, and the next request wakes it. While it’s asleep you pay only for its disk.

In a Git checkout whose branch is pushed:

Terminal window
stillbox deploy

Stillbox reads the checkout’s origin remote and current branch, works out how to build and start the app, and waits until it answers. It prints the address when it does. Only pushed commits are deployed: Stillbox warns you about uncommitted changes and unpushed commits.

Your project has Build Start Port
A Procfile with a web: line the install for its language the web: command 8080
package.json with a start script npm ci && npm run build (pnpm and Yarn too) npm run start 3000
A Mastra app (@mastra/core) npx mastra build node .mastra/output/index.mjs 4111
FastAPI (app = FastAPI() in main.py, app.py …) a virtual environment and pip install uvicorn main:app 8000
Flask the same gunicorn, or flask run 8000
Django (manage.py) the same manage.py runserver 8000

Your app must listen on the port in $PORT, on all addresses (0.0.0.0). Flags change anything Stillbox worked out:

Terminal window
stillbox deploy --build "make" --start "./bin/server" --port 9000 --health /healthz
stillbox deploy web/ # a folder inside the repository: it builds and runs there
stillbox deploy --name shop-staging --branch staging
stillbox deploy --private # only your API key opens the address
stillbox deploy -e LOG_LEVEL=debug # an environment variable

Your app’s code comes from public repositories, or from the code hosts your organization allows for repository links (GitHub and GitLab unless it changed them). For private repositories, and for secrets, use an environment: stillbox deploy --environment <id> gives the app the environment’s repositories, variables and secrets. As in every sandbox, real keys stay outside: the app sees placeholders that Stillbox swaps on the way out.

stillbox init writes a small web app for an agent framework, ready to deploy:

Terminal window
stillbox init langgraph # or crewai, openai-agents, adk
cd langgraph-agent
git init && git add . && git commit -m "LangGraph agent" # then push it to GitHub or GitLab
stillbox deploy --health /health

Each template serves its agent over HTTP with a /health check, pins its requirements, and calls models through the sandbox’s model settings: Stillbox’s model or your organization key, so no key goes in the code. The LangGraph template keeps each thread’s conversation, in your own Postgres when you set DATABASE_URL.

Run stillbox deploy again, or:

Terminal window
stillbox deployments redeploy shop # pull the branch's latest commits, build, restart
stillbox deployments redeploy shop --no-pull

The new version builds while the current one keeps serving. If the build fails, the current version stays and stillbox deployments status says why. A sandbox that was asleep or away during a redeploy runs the new version when it next starts: what the platform has recorded is what runs.

Terminal window
stillbox deployments ls
stillbox deployments status shop # building, starting, running, crashed or failed; restarts; the commit
stillbox deployments logs shop -n 100
stillbox deployments rm shop # deletes the app and its sandbox

If your app stops by itself it starts again after a pause that grows from one second to thirty. The logs keep the build’s and the app’s output, up to 8 MB; the oldest is dropped first.

POST /v1/deployments with name, repository (or environment), start and port, and optionally branch, dir, build, health_path, visibility, env, vcpus, memory_mb and auto_sleep_seconds. The API reference lists every field. API keys with the create level may deploy and delete; use may redeploy.

  • Building from a Dockerfile. Until then, give a build and start command.
  • Your own domain for an app.
  • LangGraph: serve your graph from FastAPI, with your own Postgres keeping its state.
  • CrewAI: start your crew from a small web app.
  • Mastra: your own Mastra app deploys as it is (the table above).