Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tools:mosquitto [2024/08/29 08:26] – [Setup] darron | tools:mosquitto [2024/09/01 10:03] (current) – [Test] darron | ||
---|---|---|---|
Line 22: | Line 22: | ||
==Private LAN== | ==Private LAN== | ||
+ | Create and edit local config | ||
- | / | + | < |
+ | vi / | ||
+ | </ | ||
+ | |||
+ | Add the following | ||
< | < | ||
Line 38: | Line 43: | ||
mosquitto_passwd -b / | mosquitto_passwd -b / | ||
</ | </ | ||
+ | |||
+ | Create and edit local config | ||
< | < | ||
- | TODO | + | vi / |
+ | </ | ||
+ | |||
+ | Add the following | ||
+ | |||
+ | < | ||
+ | listener 8883 | ||
+ | allow_anonymous false | ||
+ | password_file / | ||
+ | |||
+ | certfile / | ||
+ | cafile | ||
+ | keyfile | ||
</ | </ | ||
Line 49: | Line 68: | ||
sleep 1 | sleep 1 | ||
+ | #LOG | ||
+ | exec 2>&1 | ||
+ | ulimit -l unlimited | ||
+ | ulimit -i unlimited | ||
+ | ulimit -q unlimited | ||
+ | ulimit -n 8192 | ||
+ | ulimit -aH | ||
+ | |||
+ | #RUN | ||
mkdir -p / | mkdir -p / | ||
chown -R mosquitto: | chown -R mosquitto: | ||
- | |||
mkdir -p / | mkdir -p / | ||
chown -R mosquitto: | chown -R mosquitto: | ||
- | |||
mkdir -p / | mkdir -p / | ||
chown -R mosquitto: | chown -R mosquitto: | ||
- | + | exec / | |
- | exec / | + | |
</ | </ | ||
===Test=== | ===Test=== | ||
- | MQTT host is listening at 192.168.0.13 | + | ==Private LAN== |
< | < | ||
mosquitto_sub -h 192.168.0.13 -t '#' | mosquitto_sub -h 192.168.0.13 -t '#' | ||
</ | </ | ||
+ | |||
+ | ==Public WAN== | ||
+ | |||
+ | < | ||
+ | mosquitto_sub -v -h hostname.example.com -p 8883 -u username -P password -t '#' | ||
+ | </ | ||
+ | |||
+ | The hostname must match the name in the TLS certificate. |