Requirements
- A Business or Enterprise license
- A full Docker Compose deployment of Onyx 4.0.6 or later
- Docker Engine with Compose
- A host with capacity for the Onyx stack and active sandbox containers
- An Onyx API base URL that sandboxes can reach (the overlay sets a working default)
New deployment
Run the Onyx CLI installer with the Craft overlay:docker-compose.craft.yml, enables Craft, selects the Docker sandbox backend,
creates the sandbox bridge network and proxy CA volume, pulls the sandbox image, and starts the deployment.
Craft works with the default Onyx URL. To use a public URL instead, see Set the Onyx URL.
The examples below use the CLI’s default deployment directory.
For a deployment created by an older version of the
install.sh script,
replace ~/.config/onyx with your onyx_data directory (e.g. onyx_data/deployment/.env).Existing deployment
Rerun the installer with the Craft flag:.env with:
ENABLE_CRAFT=true without the overlay is not sufficient. The overlay mounts the Docker socket,
starts the sandbox proxy, and attaches the API server and background worker to the sandbox network.
Set the Onyx URL
ONYX_SERVER_URL is the complete API base URL that sandboxes use to call Onyx, path prefix included.
The overlay defaults to http://onyx-craft-api:8080, an alias of the API server on the sandbox bridge network.
This default needs no change for most deployments.
To route sandbox calls through your public endpoint instead,
set the public HTTPS URL with its /api prefix in ~/.config/onyx/deployment/.env:
api_server and nginx do not resolve from the isolated sandbox bridge.
A public URL without its /api prefix fails at sandbox provisioning. The error names the corrected value.
Trust private CA certificates
For MCP servers or OAuth endpoints with private certificates, mount a PEM CA bundle into thesandbox-proxy container.
Include both public roots and your organization’s private CA certificates in the bundle.
Before configuring the proxy, ensure api_server also trusts the private CA.
MCP setup and OAuth discovery make outbound requests from api_server, independently of the sandbox proxy.
Mount the bundle into api_server, set its SSL_CERT_FILE to that path, and recreate the service if needed.
The proxy configuration below does not change API server trust.
Create docker-compose.craft-ca.yml in your deployment directory:
SSL_CERT_FILE configures OAuth HTTP requests.
SANDBOX_PROXY_SSL_VERIFY_UPSTREAM_TRUSTED_CA configures forwarded HTTPS traffic.
The proxy falls back to SSL_CERT_FILE when its upstream CA setting is unset or blank.
The explicit upstream CA setting takes precedence.
Set both as shown for compatibility with releases without this fallback.
Setting REQUESTS_CA_BUNDLE alone does not configure forwarded HTTPS traffic.
Place your bundle at certs/upstream-ca-bundle.crt, then recreate the proxy:
Plan host capacity
Docker sandboxes default to one CPU and 2 GB of memory each:SANDBOX_IDLE_TIMEOUT_SECONDS when faster cleanup or longer-lived sandboxes are required.
The sandbox image follows IMAGE_TAG. Keep the Onyx backend and sandbox on the same release.
Normal deployments should not set SANDBOX_CONTAINER_IMAGE separately.
docker compose pull with the Craft overlay also pulls the sandbox image,
so the first sandbox does not wait for the download.
Build Craft from source
docker compose up --build builds the Onyx services declared in the Compose files.
It does not build the Craft sandbox image because sandboxes are created dynamically by the API server rather than
running as a Compose service.
From the root of an Onyx source checkout, build the sandbox image separately with a local, non-mutable tag:
.env used by your source checkout:
IMAGE_TAG does not build the corresponding onyxdotapp/sandbox:${IMAGE_TAG} image.
Either build that sandbox tag separately or set SANDBOX_CONTAINER_IMAGE explicitly.
Recreate api_server and background after changing the setting.
Existing sandbox-* containers continue using the image with which they were created and must be terminated and
provisioned again to use the new image.
If you instead launch from a staged directory such as onyx_data/deployment,
copy the setting into that directory’s .env.
Staged deployment directories do not contain the source checkout expected by the Compose build contexts,
so use already-built or published images with --no-build.
Verify the deployment
Confirm the core services and proxy are running:background service includes the worker used for Scheduled Task runs; no separate Compose service is required.
Network and host security
Sandbox containers join only the externalonyx_craft_sandbox bridge. They cannot resolve PostgreSQL, Redis,
object storage, or the API server by Compose service name.
Their outbound HTTP and HTTPS traffic passes through sandbox-proxy,
which enforces App policies and injects credentials after a request is approved.
See Craft Architecture for the complete trust and network model.
Troubleshooting
Craft does not appear after changing the environment
Craft does not appear after changing the environment
Confirm
ENABLE_CRAFT=true and SANDBOX_BACKEND=docker, then recreate the API server and web application.
Include both docker-compose.yml and docker-compose.craft.yml in the Compose command.Sandbox provisioning rejects ONYX_SERVER_URL
Sandbox provisioning rejects ONYX_SERVER_URL
Set a complete API base URL in the deployment directory’s
.env, or remove the line to use the default.
Then recreate the API server, background worker, and sandbox proxy with the Craft overlay.The configured Onyx URL uses a Compose hostname
The configured Onyx URL uses a Compose hostname
Replace
api_server, nginx,
or another Compose-only hostname with http://onyx-craft-api:8080 or the public Onyx API URL.The sandbox proxy is unhealthy
The sandbox proxy is unhealthy
Run
docker compose -f docker-compose.yml -f docker-compose.craft.yml logs sandbox-proxy. Check ONYX_SERVER_URL,
PostgreSQL and Redis availability, the sandbox_proxy_ca volume, and access to the Docker socket.The sandbox network or CA volume is missing
The sandbox network or CA volume is missing
Rerun
onyx-cli deploy install --include-craft. If automatic creation fails,
create the resources and restart the deployment:A sandbox exits or is killed during larger jobs
A sandbox exits or is killed during larger jobs
Inspect the sandbox container logs and host memory pressure.
Increase
SANDBOX_DOCKER_MEMORY_LIMIT or SANDBOX_DOCKER_CPU_LIMIT only when the host has enough capacity for
every concurrent sandbox.Craft deployment overview
Compare the Docker Compose and Kubernetes paths.
Managing Craft
Configure models and user access after deployment.