Skip to content

SSH

Anyone with write access to a Container can SSH into it with Wrangler as long as SSH is enabled.

Configure SSH

SSH can be configured in your Container's configuration with the wrangler_ssh and authorized_keys properties. Only the ssh-ed25519 key type is supported.

The wrangler_ssh.enabled property only controls whether you can SSH into a Container through Wrangler. If wrangler_ssh.enabled is false but keys are still present in authorized_keys, the SSH service will still be started on the Container.

Connect with Wrangler

To SSH into a Container with Wrangler, you must first enable Wrangler SSH. The following example shows a basic configuration:

JSONC
{
"containers": [
{
// other options here...
"wrangler_ssh": {
"enabled": true
},
"authorized_keys": [
{
"name": "<NAME>",
"public_key": "<YOUR_PUBLIC_KEY_HERE>"
}
]
}
]
}

For more information on configuring SSH, refer to Wrangler SSH configuration.

Find the instance ID for your Container by running wrangler containers instances or in the Cloudflare dashboard ↗. The instance you want to SSH into must be running. SSH will not start a stopped Container, and an active SSH connection alone will not keep a Container alive.

Once SSH is configured and the Container is running, open the SSH connection with:

Terminal window
wrangler containers ssh <INSTANCE_ID>

Process visibility

Without the containers_pid_namespace compatibility flag, all processes inside the VM are visible when you connect to your Container through SSH. This flag is turned on by default for Workers with a compatibility date of 2026-04-01 or later.