SSH Access to Container Instances
Cloudflare Containers now supports SSH access to running instances, enabling developers to debug, inspect processes, and execute one-off commands directly within their containerized applications. This capability is particularly useful for troubleshooting production issues and interactive testing without needing to redeploy.
Configuration
To enable SSH support, update your Container configuration in either wrangler.jsonc or wrangler.toml:
- Set
wrangler_ssh.enabledtotrue - Add your SSH public key (ed25519 format) to the
authorized_keysarray with a descriptive name
Usage
Once configured, connect to a running instance using the Wrangler CLI:
wrangler containers ssh <INSTANCE_ID>
For non-interactive execution, pass a command directly:
wrangler containers ssh <INSTANCE_ID> -- ls -al
Locate your instance ID using wrangler containers instances <APPLICATION>.
Developer Impact
This feature eliminates the friction of remote debugging by providing direct shell access to production containers. Developers can now inspect running processes, check logs, and test fixes interactively without rebuilding and redeploying. Refer to the SSH documentation for detailed setup instructions and best practices.