filmov
tv
Mosquitto Broker in Docker !!!

Показать описание
If you like what you see..... buy me a coffee!
This video is a tutorial on how to install mosquitto mqtt broker in docker!
Here are a few links to get you started....
(0:00) Intro
(1:56) Start by creating local volume on the docker host..
mkdir mosquitto
(2:33) Now we are ready to install mosquitto in a docker container.
mqtt:
container_name: mqtt
image: eclipse-mosquitto
restart: always
volumes:
- /home/adrian/mosquitto/config: /mosquitto/config
- /home/adrian/mosquitto/data: /mosquitto/data
- /home/adrian/mosquitto/log: /mosquitto/log
ports:
- 1883:1883
- 9001:9001
Onces thats done, save the file and...
sudo docker-compose up -d
Now we are ready to get the config file from eclipse-mosquitto repo...
cd eclipse-mosquitto
Once all that is done, jump over to portainer and reboot the mqtt container.
(6:22) Now we are ready to create a username and password for mosquitto.
sudo docker exec -it mqtt sh
mosquitto_passwd -c /mosquitto/config/pwfile hass
password_file /mosquitto/config/pwfile
Save it and then jump over to restart the mqtt container for the changes to take.
Thats pretty much it.
If you like the video, please subscribe to my channel. If you have any questions or comments, hit me up in the comments below. As always, if there are any videos out there you would like to see, let me know in the comments as well and I will see what i can do.
This video is a tutorial on how to install mosquitto mqtt broker in docker!
Here are a few links to get you started....
(0:00) Intro
(1:56) Start by creating local volume on the docker host..
mkdir mosquitto
(2:33) Now we are ready to install mosquitto in a docker container.
mqtt:
container_name: mqtt
image: eclipse-mosquitto
restart: always
volumes:
- /home/adrian/mosquitto/config: /mosquitto/config
- /home/adrian/mosquitto/data: /mosquitto/data
- /home/adrian/mosquitto/log: /mosquitto/log
ports:
- 1883:1883
- 9001:9001
Onces thats done, save the file and...
sudo docker-compose up -d
Now we are ready to get the config file from eclipse-mosquitto repo...
cd eclipse-mosquitto
Once all that is done, jump over to portainer and reboot the mqtt container.
(6:22) Now we are ready to create a username and password for mosquitto.
sudo docker exec -it mqtt sh
mosquitto_passwd -c /mosquitto/config/pwfile hass
password_file /mosquitto/config/pwfile
Save it and then jump over to restart the mqtt container for the changes to take.
Thats pretty much it.
If you like the video, please subscribe to my channel. If you have any questions or comments, hit me up in the comments below. As always, if there are any videos out there you would like to see, let me know in the comments as well and I will see what i can do.
Комментарии