Use discovery on a Docker installation
Configure a Linux Docker installation so SIA Connect can discover devices and instances through the host network.
Configure a SIA Connect Docker installation so Connectors can scan the network interfaces of the Linux host and discover supported devices.
This guide explains the required Docker Compose settings, host-port checks, interface verification, and how to run discovery from the Edge Portal.
Before you begin
- Use a Linux host with Docker Engine and Docker Compose.
- Make sure you can edit the Compose file and recreate the SIA Connect container.
- Record the current Compose configuration before changing it.
- Identify the physical network interface connected to the device network.
This procedure is intended for a SIA Connect Docker installation running on a Linux host. A normal Docker bridge network isolates the container from the host network interfaces. Network discovery therefore requires the container to use the host network and have permission to use raw Ethernet and manage network interfaces.
Host networking removes the network separation between the container and the Docker host. Services in the container bind directly to ports on the host. Review the change with the person responsible for the host network and firewall before continuing.
Change the Compose configuration
Update the siaconnect service in your Compose file as shown below. Keep any additional settings that your installation requires.
services:
siaconnect:
image: siaconnect/siaconnect:latest
network_mode: host
cap_add:
- NET_RAW
- NET_ADMIN
environment:
- SIA_CONNECT_PASSWORD=${SIA_CONNECT_PASSWORD:-SIACONNECT_ADMIN_PASSWORD}
- APP_CONTAINER_HUB_PORT=${APP_CONTAINER_HUB_PORT:-8100}
- DOCKER_HOST_GATEWAY=127.0.0.1
volumes:
- siaconnect_data:/opt/SIA/plugins
- /var/run/docker.sock:/var/run/docker.sock
restart: alwaysThe settings provide the following access:
-
network_mode: hostgives the container access to the host network interfaces. -
NET_RAWpermits raw and packet sockets used by network discovery. -
NET_ADMINpermits operations that interact with the network interfaces. -
DOCKER_HOST_GATEWAY=127.0.0.1directs services that must reach the Docker host, including the App Hub and dashboard proxy, back to the local machine.
Remove ports and the service-level networks setting from the siaconnect service. Port mappings cannot be used together with host networking. Remove top-level network definitions only when no other service uses them.
For more information about this Docker behavior, see Host network driver in the Docker documentation.
Check for port conflicts
Host networking makes the ports used by SIA Connect available directly on the Linux host. Another service must not already be listening on the same address and port.
Check the ports before recreating the container:
ss -ltn | grep -E ':(80|1883|3306|48010|4840)\b'No output means that none of these TCP ports is currently listening. If a port is listed, identify the service using it and stop or reconfigure that service before continuing.
MariaDB in the SIA Connect image listens on 127.0.0.1:3306. Another MySQL or MariaDB service using that port prevents the SIA Connect database from starting. The Edge Portal can then report that the connection to the device was lost, while the API reports Database connection error 2002.
The same conflict check applies to other ports used by the installed SIA Connect services, including 80, 48010, 1883, and 4840.
Recreate and verify the container
- Save the Compose file.
- Recreate the container:
docker compose up -d --force-recreate - Confirm that the container can see the IPv4 interfaces on the Docker host:
docker exec siaconnect ip -4 addr
If your container has another name, replace siaconnect in the command. The output should include the physical network interface connected to the device network, such as eth0 or enp6s0.
Run discovery from Docker
- Open Discover instances as described below.
- Select the required Connector.
- If the Connector provides a Network interface parameter, select the physical interface connected to the device network.
- Alternatively, select All IPv4 interfaces when that option is available and you want to scan all eligible IPv4 interfaces.
- Review the remaining discovery parameters and start the search.
- Review the returned candidates and add the required instances.
When a Connector provides All IPv4 interfaces, it scans eligible IPv4 subnets containing 256 addresses or fewer. Larger subnets and Docker bridge networks are skipped. Select the physical interface directly when you want to limit the search to the plant network.
The discovery duration is defined by the selected Connector. For example, the Siemens S7 Plus discovery window defaults to 60 seconds. Increase the duration when the search cannot complete within the default window.
Troubleshoot Docker discovery
| Condition | What to do |
|---|---|
The physical network interface is missing from docker exec siaconnect ip -4 addr. |
Confirm that network_mode: host is applied and recreate the container with --force-recreate. |
| The Edge Portal loses its connection after the container starts. | Check whether another service is using port 3306. Also check the other ports bound by the installed SIA Connect services. |
| Discovery starts but returns no devices. | Select the physical device-network interface, confirm that the target is in an eligible subnet, and check that NET_RAW and NET_ADMIN are present. |
| The Edge Portal cannot open after enabling host networking. | Check whether another service is using port 80. Remove the conflict and recreate the container. |
| A large network is not scanned by All IPv4 interfaces. | The automatic scan skips IPv4 subnets containing more than 256 addresses. Use a Connector-specific interface or range option when available, or reduce the subnet searched. |