Installing MQTT Broker(Mosquitto) and Pi-Hole on AML-S905X-CC (Le Potato)
by suriono in Circuits > Raspberry Pi
100 Views, 0 Favorites, 0 Comments
Installing MQTT Broker(Mosquitto) and Pi-Hole on AML-S905X-CC (Le Potato)

This guide demonstrates how to install MQTT and Pi-Hole on a Debian-based AML-S905X-CC (Le Potato) single-board computer.
MQTT can be installed on other operating systems like Debian Raspberry Pi, Ubuntu, macOS, and Windows, but this guide focuses on the Le Potato.
MQTT resources: mqtt.org
Install Pi-Hole
Use this link below to install Pi-Hole on AML-S905X-CC (Le Potato)
SSH to the Pi-Hole

- Obtain the IP address of the Pi-Hole, in my case it is 192.168.0.122.
- Open a command or a terminal window from any computer in the house with a connection to the home network.
- ssh to the Pi-Hole IP address, in my case:
- ssh <username>@192.168.0.122, where <username> is the username of the Pi-Hole, and 192.168.0.122 is an example IP address of my Pi-Hole.
- When prompt: "Are you sure you want to continue connecting (yes/no/[fingerprint])?", type "yes"
- When prompt for password, enter the password to the Pi-Hole.
- Run the following lines on the terminal window:
- sudo apt update && sudo apt upgrade
- sudo apt install -y mosquitto mosquito-clients
- sudo systemctl enable mosquitto.service
- sudo mosquitto_passwd -c /etc/mosquitto/passwd <MQTT USERNAME>
- Assign a new < MQTT USERNAME>, this the username for MQTT projects.
- When prompt for a password, enter a new MQTT password for MQTT projects.
- Edit the /etc/mosquitto/mosquitto.conf file:
- Add the following line at the top of the file:
- per_listener_settings true
- Add the following lines at the bottom of the file:
- allow_anonymous false
- listener 1883
- password_file /etc/mosquito/passwd
- Run the following lines on the terminal window:
- sudo systemctl restart mosquito
Now the Pi-Hole server also serves as the home MQTT Broker server, which both are lightweights.
Remember the IP address, MQTT username, and MQTT password. They will be used for all MQTT projects.
MQTT Internet Access
To allow your MQTT Broker server accessible via internet, the Port Forwarding needs to be enable:
- Go to your router settings.
- Go to the Internet section to find your home IP address or obtained from https://whatismyipaddress.com/
- Go to the Port Forwarding, more likely inside the NAT Forwarding section.
- Use step no. 2 to enter the Port Forwarding IP address
- Set the service name to MQTT
- Set the external Port to 1883
- Set the internal Port to 1883
- Set the Protocol to TCP
- Check the Enable this entry if this checkbox is available
- Click Save.
Now you can access your home MQTT Broker server from the internet using the IP address from the step no.2 with port number 1883.
MQTT Projects
Explore my MQTT projects, or browse other MQTT projects online.