Skip to content

wrangler containers stop/start/restart/logs #12988

@alexminza

Description

@alexminza

wrangler containers — missing instance lifecycle commands (restart, stop, start, logs, exec)

Problem

wrangler containers currently supports listing and deleting containers/instances, but has no commands for day-to-day instance lifecycle management:

  • No restart — cannot restart a running container instance without deleting and redeploying
  • No stop/start — cannot stop an instance without deleting it
  • No logs — cannot stream or tail container instance logs (must use the dashboard)
  • No exec/ssh — cannot execute commands inside a running instance for debugging

This forces operators to either use the Cloudflare dashboard UI or make raw API calls to Cloudchamber for routine operations like restarting a misbehaving instance or inspecting logs during an incident.

Proposed commands

Command Description
wrangler containers restart <ID> [--instance <INSTANCE_ID>] Restart a specific instance (or all instances) of a container application
wrangler containers stop <ID> [--instance <INSTANCE_ID>] Stop a running instance without deleting the application
wrangler containers start <ID> [--instance <INSTANCE_ID>] Start a previously stopped instance
wrangler containers logs <ID> [--instance <INSTANCE_ID>] Stream/tail logs from a container instance (--follow, --tail N, --since)
wrangler containers exec <ID> --instance <INSTANCE_ID> -- <command> Execute a command inside a running instance
wrangler containers redeploy <ID> Force re-pull image and restart all instances (equivalent to restart with image refresh)

Current state (wrangler 4.76.0)

Existing wrangler containers subcommands:

wrangler containers list             # List containers
wrangler containers info <ID>        # Get container info
wrangler containers instances <ID>   # List instances
wrangler containers delete <ID>      # Delete a container
wrangler containers build <PATH>     # Build an image
wrangler containers push <TAG>       # Push image to CF Registry
wrangler containers registries       # Manage registries
wrangler containers images           # Manage images

The gap: you can create, list, inspect, and destroy — but you cannot operate on running instances.

Workaround

Currently the only way to "restart" a container instance is to delete and redeploy, which causes downtime and requires re-running the full deployment pipeline. For logs, operators must navigate to the Cloudflare dashboard manually.

Use case

Running long-lived services (e.g., AI gateway, bot backends) on Cloudflare Containers that occasionally need restarts due to upstream software bugs, configuration changes, or memory leaks — without triggering a full redeployment cycle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions