What is debug mode?
Debug mode lets you deploy a separate instance of your container with SSH access and logging enabled. This gives you a way to inspect the enclave runtime, troubleshoot startup issues, and test configuration changes — without affecting your production container.When to use debug mode
- Container startup failures: SSH in to check why your application isn’t starting
- Configuration issues: Verify that environment variables and secrets are set correctly
- Runtime debugging: Inspect processes, network, and filesystem inside the enclave
- Testing changes: Validate a new config or image is working as expected before deploying to production
How it works
Debug containers are fully independent instances. They run on a separate domain and have their own lifecycle, so you can deploy, update, and delete them without touching production instances.
A container named
api can have both a production and a debug instance running simultaneously.
Deploying a debug container
- In the All Containers tab, click New Container
- Toggle Debug Mode on
- Select one or more SSH keys from your organization’s key list (see below)
- Configure the rest of the container as normal
- Click Deploy Container
Managing SSH keys
Before deploying a debug container, add your SSH public keys to the organization.Adding keys
- Go to the SSH Keys tab in the Containers section
- Click Add SSH Key
- Paste your public key
Connecting via SSH
Once your debug container is running, the dashboard shows the SSH connection command on the container’s card. It looks like:Using the debug toolbox
The toolbox workflow below is available with CVM image
0.11.0 and later.README.md, with a concise
command reference, and AGENTS.md, with instructions for coding agents. Both
vi and vim are available for editing files.
Start by checking the deployment and its containers:
sh, use bash. Omit -it when running
a noninteractive command.
Add a temporary SSH key from the toolbox
After connecting with an existing authorized key, you can grant another developer temporary access without restarting the toolbox. Add their public key to the toolbox’sauthorized_keys file:
Try a configuration change
The initial deployment configuration is copied to~/tinfoil-config.debug.yml. Edit that file, then boot the debug runtime again:
tindbg boot replaces and restarts the workload containers. Expect a brief
interruption to the debug instance. The toolbox remains available so you can
fix the configuration and retry if the boot fails.
To discard your edits and restore the configuration used to create the debug
instance:
Run additional diagnostic tools
The toolbox itself is read-only and does not supportapt install. Run a
disposable container instead. Its container layer is writable, so you can
install packages and experiment without modifying the toolbox:
--rm flag deletes the diagnostic container and all installed packages when
you exit. Omit --rm and add --name debug-tools if you want to stop and resume
the same temporary environment:
Promoting to production
Once you’ve finished testing with a debug container, you can deploy it as a production enclave directly from the dashboard:- On the debug container, click Update
- In the modal, select Deploy to prod
- The container deploys as a production enclave with the same configuration but with debug access and logging disabled
Using the CLI
The Tinfoil CLI handles the SSH key registry and the debug-mode deploy:--debug-mode selects the debug container. You can also use its UUID.
