Skip to content

[Feature]: Make bind address configurable for local servers #6355

@khiconit

Description

@khiconit

What area(s) will this request affect?

Running your code locally

What type of change do you want to see?

Substantial change to existing feature

Overview

Context:

Recent changes in the CLI enforce binding local development servers to localhost for security reasons. While this is a sensible default, it causes issues in containerized environments like Docker.

Problem:

When running the CLI inside a Docker container, forwarded ports from the host machine are only accessible if the server binds to 0.0.0.0. Binding to localhost makes the server unreachable from outside the container, breaking the development workflow.

Proposal:

Introduce a configuration option (e.g. environment variable or CLI flag) that allows developers to override the default bind address. For example:

SHOPIFY_CLI_BIND_ADDRESS=0.0.0.0 yarn dev
This would preserve the secure default (localhost) while enabling flexibility for containerized setups.

Benefits:

Supports Docker and other container environments

Avoids the need for custom patches or forks

Maintains security for most users while offering configurability

Thank you for your work on improving the CLI! Happy to help test or contribute if needed.

Motivation

I’m running the app inside a Docker container. When forwarding ports from the host to the container, Docker only allows binding to 0.0.0.0, not localhost. This means the development server becomes inaccessible unless it listens on all interfaces.

Would it be possible to make the bind address configurable—perhaps via an environment variable or CLI flag—so developers can choose between localhost and 0.0.0.0 depending on their setup?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions