Trying to connect to other Docker environments
I see that there should be away to connect Homarr to additional Docker environments per this page:
https://homarr.dev/docs/advanced/environment-variables/
I am unable to figure out how to make this work. I have Homarr installed and shows the docker containers that run in the same LXC container that runs Homarr. I have another LXC (192.168.10.101) that has several other docker containers. I would like to see them in Homarr.
Per the docs linked above, it requires two environmental variables added:
DOCKER_HOSTNAMES: Is this the IP address (192.168.10.101)?
DOCKER_PORTS: What ports are these supposed to be? The individual docker containers on that LXC? Most of them do not have ports assigned to them.
Really confused.
Environment variables | Homarr documentation
Homarr offers a Docker Container, which can be run on any compatible system, such as Unraid, Kubernetes and many more systems! Our Docker container is based on the
22.12.0-alpine image and serves per standard on the port 7575
.11 Replies
Thank you for submitting a support request.
Depending on the volume of requests, our team should get in contact with you shortly.
⚠️ Please include the following details in your post or we may reject your request without further comment: - Log (See https://homarr.dev/docs/community/faq#how-do-i-open-the-console--log) - Operating system (Unraid, TrueNAS, Ubuntu, ...) - Exact Homarr version (eg. 0.15.0, not latest) - Configuration (eg. docker-compose, screenshot or similar. Use ``your-text`` to format) - Other relevant information (eg. your devices, your browser, ...)
Frequently Asked Questions | Homarr documentation
Can I install Homarr on a Raspberry Pi?
ports are the ports of the docker socket exposed, so not the individual containers
OK. Thanks. So unless I have done anything different it should be 2375, right? How about the DOCKER_HOSTNAMES value? It has the name of "npm". I have added those two variables in the Portainer stack editor and restarted Homarr. Should I be seeing the additional containers in Homarr?
It is the ip address / hostname of your sockets
comma separated
Thank you. Can you explain how I can obtain that? I know that the container name is "NPM" and it's IP address is 192.168.10.101".
I would guess that this should work then with
DOCKER_HOSTNAMES=192.168.10.101
or DOCKER_HOSTNAMES=NPM
Thank you. I am still getting errors. I did add the npm hostname to the .etc/hosts file and can confirm that I can ping the other container.



Hmm okay, does it work with just one of them? Can you try both alone?
It's not nice that we only show that it did not work instead of the actual error, we definielty have to change that
Same results with just including the "portainer" hostname which is the LXC container where Homarr is running.
Okay, I'll need to improve the logging for it so we see what the error is. Tonight I don't have the time to work on this, but I'll get back to you tomorrow
Thanks for your help!