kpostekk / homebridge-docker

Show your Docker containers as switches in Homebridge
Apache License 2.0
2 stars 0 forks source link

Which port? #2

Open TeraJaQ opened 2 years ago

TeraJaQ commented 2 years ago

Hi, I have installed the plug-in but I can't get it to work (I can't see the container switches in the homebridge). In the Host field I have entered the ip address of the docker server, all other fields I have left blank.

Which port should I enter to make it see the containers? hb

kpostekk commented 2 years ago

Port 2375 is for unencrypted communication, have you tried 2376?

TeraJaQ commented 2 years ago

i've try to put 2376 but in the log i see "Error: connect ECONNREFUSED 192.168.1.99:2376 hb_log "

kpostekk commented 2 years ago

Huh, maybe firewall rule? Tbh, I haven't tested this feature on my server

TeraJaQ commented 2 years ago

Hi, I finally solved my problem by editing 2 files on my Docker server (Raspberry Pi). I made the first change inside file /lib/systemd/system/docker.service change: ExecStart=/usr/bin/dockerd fd:// with ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 and a second modification inside file /etc/init.d/docker change: DOCKER_OPTS= with DOCKER_OPTS="-H **tcp://0.0.0.0:2375" after that i just had to restart the docker service through these two commands: sudo systemctl stop docker sudo systemctl daeamon-reload or the alternative just restart the server sudo reboot now**

daywalkeraut commented 2 weeks ago

@TeraJaQ

Thanks for your solution. Now it works, but I have a trouble with Portainer will not start now. Maybe you know what the problem is?? For your changes 0.0.0.0 I used the ip from my Raspberry Pi.

docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce

I am grateful for any help, tips

kpostekk commented 1 week ago

As far i remember, this plugin interacts with docker daemon directly, so there is no need in running portrainer. Exposing dockerd might be necessary.

According to docs:

It is conventional to use port 2375 for un-encrypted, and port 2376 for encrypted communication with the daemon.

daywalkeraut commented 1 week ago

@kpostekk thank you for your Information.

This Plugin is Running with the Changes from @TeraJaQ

Before the Changes Portainer was Running and reachable at Port :9000 After the Changes Portainer is not reachable at Port :9000 i don’t know if Portainer is Running or not.

I really like Portainer to create Containers and so on. Because I don’t have experiences with dockers so it is very easy with Portainer.