n8n-sandbox-api ghcr.io/n8n-io/n8n-sandbox-service-api:stable https://github.com/n8n-io/n8n-sandbox-service/pkgs/container/n8n-sandbox-service-api n8n-sandbox sh false https://github.com/benjaminmue/unraid/issues https://github.com/n8n-io/n8n-sandbox-service Code sandbox for the n8n Assistant and n8n Agents, self-hosted on Unraid. Only useful together with an existing n8n container: this is not n8n itself, it is the isolated environment n8n uses to run AI-generated code and work with files. n8n stays where it is; you only point it at this service. The sandbox is two containers and both are needed: n8n-sandbox-api (this one, the control plane n8n talks to) and n8n-sandbox-runner (privileged Docker-in-Docker that starts one throwaway container per sandbox). They talk to each other over mutual TLS. This container creates the certificates on its first start, so there is nothing to generate by hand. Setup: 1. Settings - Docker: set "Preserve user defined networks" to Yes, otherwise Unraid deletes the network below on every Docker restart. 2. Create the network once in the Unraid terminal: docker network create n8n-sandbox 3. Install this container. Fill in the three keys with long random values, for example from: openssl rand -hex 32 4. Install n8n-sandbox-runner with the same registration token and runner key. 5. In n8n open Settings - n8n Assistant (or Agents) - Add a code sandbox, choose n8n Sandbox and enter the service URL and the API key. Service URL: http://n8n-sandbox-api:8080 if n8n is attached to the n8n-sandbox network, otherwise http://UNRAID-IP:3200 (the host port below). Check: http://UNRAID-IP:3200/healthz answers {"status":"ok"}, and the log of this container shows "runner registered". On its first start the runner first brings up its own Docker engine and only then registers. Until it has, the connection test in n8n fails with "no sandbox runners are registered or available": wait a moment and test again. Image tag :stable follows the latest stable release of the n8n sandbox service. API and runner are released together and only supported in the same version, so update both containers at the same time. Security: LAN only. Never forward port 3200 to the internet. The runner is privileged and equivalent to root on the host. Unofficial template, maintained by benjaminmue. The images are published by n8n (n8n-io/n8n-sandbox-service). AI: Tools:Utilities: https://raw.githubusercontent.com/benjaminmue/unraid/main/templates/n8n-sandbox-api.xml https://cdn.jsdelivr.net/gh/selfhst/icons/png/n8n.png --network-alias=n8n-sandbox-api --user=0:0 --entrypoint=/bin/sh -c 'bootstrap-mtls.sh --out-dir /tls --api-san n8n-sandbox-api --control-san-prefix n8n-sandbox-runner --runners 1 && chown -R sandbox-api:sandbox-api /tls/api /data && exec su sandbox-api -s /bin/sh -c "exec /sbin/tini -- /usr/local/bin/sandbox-api"' Self-hosted code sandbox (control plane) for the n8n Assistant and n8n Agents. Requires an existing n8n container and the n8n-sandbox-runner container. Creates its mutual TLS certificates on first start. 3200 /mnt/user/appdata/n8n-sandbox/tls /mnt/user/appdata/n8n-sandbox/api n8n-sandbox-runner-1 /data /tls/api/grpc-server.crt /tls/api/grpc-server.key /tls/api/ca.crt /tls/api/ca.crt /tls/api/control-grpc-api-client.crt /tls/api/control-grpc-api-client.key