← Back
Cloudflare
Cloudflare Containers adds SSH support for live debugging via Wrangler

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:

  1. Enable SSH support in your wrangler.jsonc or wrangler.toml by adding the wrangler_ssh configuration with enabled: true
  2. Add authorized SSH keys by providing ssh-ed25519 public keys in the authorized_keys array 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.