Skip to content

Instantly share code, notes, and snippets.

@tim-minter
Created September 17, 2021 09:37
Show Gist options
  • Save tim-minter/e82e63c0578a0bf152d051fbfbc707f2 to your computer and use it in GitHub Desktop.
Save tim-minter/e82e63c0578a0bf152d051fbfbc707f2 to your computer and use it in GitHub Desktop.
sudo apt-get update
sudo apt-get install mosquitto
sudo mosquitto_passwd -c /etc/mosquitto/passwd [usernamehere]
sudo nano /etc/mosquitto/conf.d/default.conf
Add to this file:
allow_anonymous false
password_file /etc/mosquitto/passwd
listener 1883
sudo systemctl restart mosquitto
sudo ufw allow 1883/tcp
sudo systemctl restart mosquitto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment