Skip to content

Accessing rmf-web Docker Dashboard from another PC - RMF_SERVER_URL seems to be ignored #1070

@ccalvobaigo

Description

@ccalvobaigo

Hello,

I'm trying to set up rmf-web so I can access the demo dashboard from a different computer on my local network. I'm running both the API server and the dashboard in Docker.

My Setup
I'm using --network host and the following docker run commands on my host machine (let's say its IP is 192.168.1.100):

API Server:
docker run --network host -it --rm ghcr.io/open-rmf/rmf-web/api-server:latest

Dashboard:

docker run --network host -it --rm \
  -e RMF_SERVER_URL=http://localhost:8000 \
  -e TRAJECTORY_SERVER_URL=ws://localhost:8006 \
  ghcr.io/open-rmf/rmf-web/demo-dashboard:latest

This setup works perfectly when I access the dashboard from the host machine at http://localhost:3000.

The Problem
When I try to access the dashboard from another computer on the network (e.g., http://192.168.1.100:3000), the dashboard page loads, but it reamains in the login page as it cannot connect to the API server.

Using my browser's developer tools, I can see that the dashboard is still making network requests to http://localhost:8000, which fails because localhost on the remote computer is not where the API server is running.

What I've Tried
My first thought was to change the environment variables to point to the host's IP address:

docker run --network host -it --rm \
  -e RMF_SERVER_URL=http://192.168.1.100:8000 \
  -e TRAJECTORY_SERVER_URL=ws://192.168.1.100:8006 \
  ghcr.io/open-rmf/rmf-web/demo-dashboard:latest

Surprisingly, this had no effect. The dashboard's network requests continue to target localhost:8000 regardless of what I set for RMF_SERVER_URL.

I also noticed that in the demo source code on GitHub (line 66 and 67) the configuration for the servers might not be directly using these environment variables at runtime.

My Question
Is there a proper way to configure the API and Trajectory server URLs for the demo-dashboard Docker image so that it can be accessed correctly from other machines on the network?

I would prefer to continue using the pre-built Docker image rather than building it from the source if possible. Any help would be greatly appreciated!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions