Welcome to Headwind MDM Q&A, where you can ask questions and receive answers from other members of the community.

Please do not post bug reports, missing feature requests, or demo inquiries. If you have such an inquiry, submit a contact form.

0 votes
I followed the instruction https://github.com/h-mdm/hmdm-docker/ and installed Headwind MDM in a Docker container using Docker Compose.

Everything is working well but when I click the QR code icon, the QR code is not displayed.
by (36.8k points)

1 Answer

0 votes

When the admin requests a QR code, Headwind MDM server tries to download the APK using its URL which is usually pointed to an external IP address. The external IP may be unavailable from the Docker container (especially if your server is behind the NAT).

Here's the possible solution:

1. Determine the internal IP address (not the Docker IP address which usually starts with 172.*!) by using the command 

ip addr show

2. Attach to the container by using the command

docker exec -it mdm_hmdm_1 bash

(check the container name by the command 'docker ps')

3. Run the commands

cp /etc/hosts /etc/hosts.backup

echo "x.x.x.x mdm.mycompany.com" >> /etc/hosts

(replace x.x.x.x with the internal IP address and mdm.mycompany.com with your Headwind MDM domain name)

This should resolve the issue. 

See also: https://qa.h-mdm.com/1/

by (36.8k points)
Instead of manually editing the /etc/hosts in the container, you can now set the LOCAL_IP variable (available in version 0.1.3 and above).
...