Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I configure the bridge network to be accessible from other machines? #865

Open
Sheng2216 opened this issue Mar 6, 2024 · 1 comment

Comments

@Sheng2216
Copy link

Hello everyone, I am new to podman-compose. I need to host a service called Zigbee2MQTT on my Debian host machine. However, I am having trouble accessing the web UI of the service from another machine on the same local area network(I can access from the host machine only). How can I address this issue? I have learned that by using sudo (which I need to access the Zigbee dongle attached to my host machine), a bridge network is created. However, this bridge network is isolated, and no one except the host machine can access it.

I also tried adding network_mode=host to the .yml file, but I received an error message stating that I cannot use multiple networks. Error: cannot set multiple networks without bridge network mode, selected mode host: invalid argument
I apologize if this seems like a dumb question. Any help would be greatly appreciated!

Here is my docker-compose.yml file:

services:
  mqtt:
    container_name: mosquitto
    image: eclipse-mosquitto:2.0
    restart: unless-stopped
    volumes:
      - "./mosquitto-data:/mosquitto"
    ports:
      - "1883:1883"
      - "9001:9001"
    command: "mosquitto -c /mosquitto-no-auth.conf"
    #network_mode: host

  zigbee2mqtt:
    container_name: zigbee2mqtt
    restart: unless-stopped
    image: koenkk/zigbee2mqtt:1.32.2
    volumes:
      - ./zigbee2mqtt-data:/app/data
      - /run/udev:/run/udev:ro
    ports:
      - "8080:8080"
    environment:
      - TZ=Asian/Hong_Kong
    devices:
      - /dev/ttyUSB6:/dev/ttyUSB6
    #network_mode: host
@Sheng2216
Copy link
Author

I noticed that when running Podman in a clean environment without Docker installed, it functions as expected. However, if Docker is pre-installed, it causes conflicts and only Docker works properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant