# Installing the Domotz Agent – OpenWrt (x86-64)

The currently supported method to run the agent directly from a router running OpenWRT is using a Docker image, on this example we are using the Docker.

## Installing Docker

Connect via SSH to the OpenWRT router (**root**user is the default user):

```
ssh root@192.168.1
```

Run the following to install the docker daemon and the Luci app ( to get a control panel for docker containers in Luci):

```
opkg update
opkg install dockerd luci-app-dockerman
```

All dependencies should be resolved automatically.

## Installing the Domotz Pro Agent Container

While still connected to the router via SSH, run the following command to download the image and deploy the Domotz Pro agent container.

```
docker run --name domotz_agent --restart always --network=host --cap-add NET_ADMIN -d domotz/domotzpro-agent-amd64
```

The container will then be installed with the name **domotz_agent** and it will always start with the system.

Docker Containers Management Interface.

1. View a list of Docker containers, including columns for ID, Container Name, Status, Network, Ports, Image, and Command.
2. Identify a specific container with ID beginning "69cba7732ba7" and name "domotz_agent," shown as 'Up 15 minutes.'
3. Use the "Edit" button on the right to modify the container’s settings.
4. Utilize action buttons at the bottom for container management: Add, Start, Restart, Stop, Kill, and Remove.

domotz_agent Docker container - OpenWRT administration Page

## Activating the Domotz Pro Agent

To activate the Domotz Pro Agent, access the router on port 3000 through a browser from a computer connected to the local LAN (e.g. http://192.168.1.1:3000). A page requesting your Domotz account credentials will be loaded, proceed with the login to finish the activation process.
