SSH Access to Container Instances
Cloudflare has added SSH support for running Container instances, enabling developers to remotely connect and debug applications in production. This addresses a critical need for troubleshooting and real-time inspection of containerized workloads.
Configuration
To enable SSH access, update your Container configuration with two steps:
- Enable SSH support in your
wrangler.jsoncorwrangler.tomlby adding thewrangler_sshconfiguration withenabled: true - Add authorized SSH keys by providing
ssh-ed25519public keys in theauthorized_keysarray with a descriptive name for each key
Usage
Once configured, connect to a running Container instance using:
wrangler containers ssh <INSTANCE_ID>
For interactive debugging, run commands directly without opening a shell:
wrangler containers ssh <INSTANCE_ID> -- ls -al
Use wrangler containers instances <APPLICATION> to list available instance IDs.
Developer Impact
This feature streamlines the debugging workflow for containerized applications, eliminating the need for alternative debugging mechanisms. Developers can now inspect running processes, check logs, and execute diagnostics directly within their Container environment.