Docker Container Access Webserver from local Network

Hello,
i have a problem to acces a docker webpacge from my local network.
I use docker compose at my ubuntu server installation
firewall is disabled
At the server i can access the webpage via localhost:8090 oder ip:8090 or 127.0.0.1:8090
Trying to access it from another machine in my network, the connection does not work.
At the same machine i have a unifi server running at 8060/8061 grafana at 3000 mosquitto at 2883 etc. etc. there are no port confilcts and all other applications are running and are accessible from local network except this one docker container
The docker compose is the following

version: "3.3"
services:
  homepage:
    image: ghcr.io/gethomepage/homepage:latest
    container_name: homepage
    ports:
      - 8090:3000
    volumes:
      - /home/user/docker:/app/config # Make sure your local config directory exists
      - /var/run/docker.sock:/var/run/docker.sock:ro # optional, for docker integrations
    restart: unless-stopped
    networks:
      - default

iptable is the following at ubuntu server

 sudo iptables -t nat -L
[sudo] password for user:
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
DOCKER     all  --  anywhere             anywhere             ADDRTYPE match dst-type LOCAL

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
DOCKER     all  --  anywhere            !localhost/8          ADDRTYPE match dst-type LOCAL

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  172.18.0.0/16        anywhere
MASQUERADE  all  --  172.17.0.0/16        anywhere
MASQUERADE  tcp  --  172.18.0.2           172.18.0.2           tcp dpt:3000

Chain DOCKER (2 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere
RETURN     all  --  anywhere             anywhere
DNAT       tcp  --  anywhere             anywhere             tcp dpt:8090 to:172.18.0.2:3000

Thank you

Please, share, how you installed docker exactly and what version.

By default, Docker’s port forwardings forward requests from all ip addresses, including the LAN/WAN IP.

You are aware that only ip:8090 should work from another machine, right?

What is docker ps telling you about ports?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.