Skip to content

How do I customize the HTTP port? #825

@jameslamb

Description

@jameslamb

Description

The docs in the README say the following:

   --http_address value Address specification for the HTTP server listener,
      formatted either as [host]:port for TCP or unix://path.sock for Unix
      domain sockets. [$BAZEL_REMOTE_HTTP_ADDRESS]

   --host value DEPRECATED. Use --http_address to specify the HTTP server
      listener. [$BAZEL_REMOTE_HOST]

   --port value DEPRECATED. Use --http_address to specify the HTTP server
      listener. (default: 8080) [$BAZEL_REMOTE_PORT]

(docs link)

So I tried something like this with the latest release as of this writing:

docker run \
    --rm \
    --env BAZEL_REMOTE_HTTP_ADDRESS=":9090" \
    --env BAZEL_REMOTE_MAX_SIZE=100 \
    -p 9090:9090 \
    quay.io/bazel-remote/bazel-remote:v2.5.1@sha256:37c9bf6a9c1763b0301882f2cb20a9d4cf54b46164e621cf6645bdbcc445acd4

I'd expected to see the HTTP server running on port 9090 in the container, but see this in logs:

2025/06/05 14:06:03 Starting HTTP server on address :8080

And sure enough, the service is not available on :9090.

curl --fail http://127.0.0.1:9090/status
# curl: (56) Recv failure: Connection reset by peer

If I switch to hitting port 8080 on the container, the service is available there, so that's not just a misleading log message.

docker run \
    --rm \
    --env BAZEL_REMOTE_HTTP_ADDRESS=":9090" \
    --env BAZEL_REMOTE_MAX_SIZE=100 \
    -p 8080:8080 \
    quay.io/bazel-remote/bazel-remote:v2.5.1@sha256:37c9bf6a9c1763b0301882f2cb20a9d4cf54b46164e621cf6645bdbcc445acd4

curl --fail http://127.0.0.1:8080/status
{
 "CurrSize": 0,
 "UncompressedSize": 0,
 "ReservedSize": 0,
 "MaxSize": 107374182400,
 "NumFiles": 0,
 "ServerTime": 1749132479,
 "GitCommit": "d0f166cdd973342ec4aa8a51228cfd3a7a205414",
 "NumGoroutines": 9
}

How do I customize the HTTP address when running a container with quay.io/bazel-remote/bazel-remote?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions