├── Zigbee2MQTT_Configuration.yaml ├── compose_install.sh ├── HA_Configuration.yaml ├── docker-compose.yaml ├── README.md ├── LICENSE └── mosquitto.conf /Zigbee2MQTT_Configuration.yaml: -------------------------------------------------------------------------------- 1 | # Home Assistant integration (MQTT discovery) 2 | homeassistant: true 3 | 4 | # Enable Web GUI, can just be "frontend: true" 5 | frontend: 6 | # Optional, default 8080 7 | port: 8080 8 | # Optional, default 0.0.0.0 9 | host: 0.0.0.0 10 | 11 | # allow new devices to join 12 | permit_join: true 13 | 14 | # Serial settings 15 | serial: 16 | # Location of CC2531 USB sniffer 17 | port: /dev/ttyACM0 18 | -------------------------------------------------------------------------------- /compose_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -o errexit 4 | set -o nounset 5 | 6 | IFS=$(printf '\n\t') 7 | 8 | # Docker Compose Install (https://docs.docker.com/compose/install/linux/#install-the-plugin-manually) 9 | sudo wget --output-document=/usr/local/bin/docker-compose "https://github.com/docker/compose/releases/download/$(wget --quiet --output-document=- https://api.github.com/repos/docker/compose/releases/latest | grep --perl-regexp --only-matching '"tag_name": "\K.*?(?=")')/run.sh" 10 | sudo chmod +x /usr/local/bin/docker-compose 11 | sudo wget --output-document=/etc/bash_completion.d/docker-compose "https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose" 12 | printf '\nDocker Compose installed successfully\n\n' 13 | -------------------------------------------------------------------------------- /HA_Configuration.yaml: -------------------------------------------------------------------------------- 1 | # Configure a default setup of Home Assistant (frontend, api, etc) 2 | default_config: 3 | 4 | # Text to speech 5 | tts: 6 | - platform: google_translate 7 | 8 | #homeassistant: 9 | # packages: !include_dir_named packages 10 | 11 | intent: 12 | 13 | automation: !include automations.yaml 14 | script: !include scripts.yaml 15 | scene: !include scenes.yaml 16 | 17 | panel_iframe: 18 | portainer: 19 | title: "Portainer" 20 | url: "http://0.0.0.0:9000" 21 | icon: mdi:docker 22 | vscode: 23 | title: "VSCode" 24 | url: "http://0.0.0.0:8443/" 25 | icon: mdi:microsoft-visual-studio-code 26 | esphome: 27 | title: "ESPHome" 28 | url: "http://0.0.0.0:6052" 29 | icon: mdi:chip 30 | zigbee2mqtt: 31 | title: "Zigbee2MQTT" 32 | url: "http://0.0.0.0:8080" 33 | icon: mdi:zigbee 34 | appdaemon: 35 | title: "appdaemon" 36 | url: "http://0.0.0.0:5050" 37 | icon: mdi:language-python 38 | rhasspy: 39 | title: "Rhasspy" 40 | url: "http://0.0.0.0:12101" 41 | icon: mdi:account-voice 42 | -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | homeassistant: 4 | container_name: homeassistant 5 | image: "homeassistant/home-assistant:latest" 6 | volumes: 7 | - /PATH_TO_YOUR_CONFIG:/config 8 | - /etc/localtime:/etc/localtime:ro 9 | restart: unless-stopped 10 | privileged: true 11 | ports: 12 | - "8123:8123" 13 | 14 | #VSCode 15 | vscode: 16 | container_name: vscode 17 | image: codercom/code-server 18 | volumes: 19 | # Set to the directory you want to open in VS Code. 20 | - /PATH_TO_YOUR_CONFIG:/config 21 | # should point to a local dir where vs code stores its data. 22 | - /PATH_TO_YOUR_CONFIG:/home/coder/.local/share/code-server 23 | ports: 24 | - "8443:8080" 25 | command: code-server --auth none --disable-telemetry /config 26 | restart: unless-stopped 27 | 28 | #Mosquitto 29 | mosquitto: 30 | container_name: mqtt 31 | image: eclipse-mosquitto 32 | ports: 33 | - "1883:1883" 34 | # This port is for Webhooks 35 | - "9001:9001" 36 | volumes: 37 | - /PATH_TO_YOUR_CONFIG:/mosquitto/config 38 | - /PATH_TO_YOUR_DATA:/mosquitto/data 39 | - /PATH_TO_YOUR_LOG:/mosquitto/log 40 | 41 | #ESPHome 42 | esphome: 43 | container_name: esphome 44 | image: esphome/esphome 45 | ports: 46 | - "6052:6052" 47 | volumes: 48 | # Update PATH_TO_YOUR_CONFIG, the :rw gives the container Read/Write access 49 | - /PATH_TO_YOUR_CONFIG:/config:rw 50 | # Use local time for logging timestamps 51 | - /etc/localtime:/etc/localtime:ro 52 | # You do have to map a serial port here. Determine your port and uncomment. 53 | #devices: 54 | # - /dev/ttyAMC0:/dev/ttyAMC0 55 | restart: always 56 | 57 | #Zigbee2MQTT 58 | zigbee2mqtt: 59 | container_name: zigbee2mqtt 60 | depends_on: 61 | - mosquitto 62 | image: koenkk/zigbee2mqtt 63 | volumes: 64 | - /PATH_TO_YOUR_DATA:/app/data 65 | - /run/udev:/run/udev:ro 66 | ports: 67 | # Frontend port 68 | - 8080:8080 69 | deploy: 70 | resources: 71 | limits: 72 | memory: 100M 73 | restart: always 74 | privileged: true 75 | 76 | #Rhasspy 77 | rhasspy: 78 | image: "rhasspy/rhasspy" 79 | container_name: rhasspy 80 | restart: unless-stopped 81 | volumes: 82 | - "$HOME/.config/rhasspy/profiles:/profiles" 83 | - "/etc/localtime:/etc/localtime:ro" 84 | ports: 85 | - "12101:12101" 86 | devices: 87 | - "/dev/snd:/dev/snd" 88 | command: --user-profiles /profiles --profile en 89 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HA-Docker-Files 2 | Home Assistant Docker Compose files for container install 3 | 4 | Welcome to the "Home Assistant Docker Compose Files" repository! This is a home for all the YAML configurations and Docker scripts created for the awesome community on [BinaryTechLabs](https://www.youtube.com/@BinaryTechLabs). Here, you'll find a collection of files that can help you set up and enhance your Home Assistant environment using Docker. 5 | 6 | ## About Home Assistant 7 | 8 | [Home Assistant](https://www.home-assistant.io/) is an open-source platform for smart home automation that runs on Python. It allows you to control all your devices from a single, mobile-friendly interface, making home automation accessible and fun. 9 | 10 | ## Repository Contents 11 | 12 | This repository contains YAML configuration files and Docker scripts that I've created and curated for various Home Assistant integrations, addons, and components. The goal is to make it easy for you to deploy these configurations in a Dockerized environment. 13 | 14 | ## How to Download the Repository 15 | 16 | This really doesn't need to be done, but if you want a local copy, 17 | 18 | 1. **Clone the Repository:** 19 | ```bash 20 | git clone https://github.com/yourusername/HA-Docker-Files.git 21 | cd HA-Docker-Files 22 | 23 | ## How to Use 24 | 25 | ### Navigate to the Configuration or Docker Script You Need: 26 | Explore the repository to find the specific YAML configuration or Docker script you are interested in. 27 | 28 | ### Copy the Configuration: 29 | Copy the YAML configuration or Docker script content. 30 | 31 | ### Docker Scripts 32 | Official Docker install script 33 | 34 | curl -fsSL https://get.docker.com -o get-docker.sh 35 | sh get-docker.sh 36 | 37 | #### Docker Compose Script Usage 38 | 39 | 1. `sh compose_install.sh` 40 | 2. log out 41 | 3. log back in 42 | 43 | ### Integrate with Your Home Assistant Setup: 44 | Paste the configuration into the appropriate file in your Home Assistant setup. 45 | 46 | ### Restart Home Assistant: 47 | Restart your Home Assistant instance to apply the changes. 48 | 49 | ## Contributions 50 | Feel free to contribute by submitting pull requests or opening issues. If you have a specific Home Assistant integration or setup that you'd like to share, your contributions are more than welcome! 51 | 52 | ## Support 53 | For video tutorials and in-depth explanations, check out [BinaryTechLabs](https://www.youtube.com/@BinaryTechLabs). If you have questions or need assistance, feel free to leave a comment on the related video or open an issue here on GitHub. 54 | 55 | ## Disclaimer 56 | These configurations are provided as-is. While I strive to ensure their correctness and security, use them at your own risk. Always back up your Home Assistant configuration before making changes. 57 | 58 | Happy automating! 🏡✨ 59 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /mosquitto.conf: -------------------------------------------------------------------------------- 1 | # Config file for mosquitto 2 | # 3 | # See mosquitto.conf(5) for more information. 4 | # 5 | # Default values are shown, uncomment to change. 6 | # 7 | # Use the # character to indicate a comment, but only if it is the 8 | # very first character on the line. 9 | 10 | # ================================================================= 11 | # General configuration 12 | # ================================================================= 13 | 14 | # Use per listener security settings. 15 | # 16 | # It is recommended this option be set before any other options. 17 | # 18 | # If this option is set to true, then all authentication and access control 19 | # options are controlled on a per listener basis. The following options are 20 | # affected: 21 | # 22 | # acl_file 23 | # allow_anonymous 24 | # allow_zero_length_clientid 25 | # auto_id_prefix 26 | # password_file 27 | # plugin 28 | # plugin_opt_* 29 | # psk_file 30 | # 31 | # Note that if set to true, then a durable client (i.e. with clean session set 32 | # to false) that has disconnected will use the ACL settings defined for the 33 | # listener that it was most recently connected to. 34 | # 35 | # The default behaviour is for this to be set to false, which maintains the 36 | # setting behaviour from previous versions of mosquitto. 37 | #per_listener_settings false 38 | 39 | 40 | # This option controls whether a client is allowed to connect with a zero 41 | # length client id or not. This option only affects clients using MQTT v3.1.1 42 | # and later. If set to false, clients connecting with a zero length client id 43 | # are disconnected. If set to true, clients will be allocated a client id by 44 | # the broker. This means it is only useful for clients with clean session set 45 | # to true. 46 | #allow_zero_length_clientid true 47 | 48 | # If allow_zero_length_clientid is true, this option allows you to set a prefix 49 | # to automatically generated client ids to aid visibility in logs. 50 | # Defaults to 'auto-' 51 | #auto_id_prefix auto- 52 | 53 | # This option affects the scenario when a client subscribes to a topic that has 54 | # retained messages. It is possible that the client that published the retained 55 | # message to the topic had access at the time they published, but that access 56 | # has been subsequently removed. If check_retain_source is set to true, the 57 | # default, the source of a retained message will be checked for access rights 58 | # before it is republished. When set to false, no check will be made and the 59 | # retained message will always be published. This affects all listeners. 60 | #check_retain_source true 61 | 62 | # QoS 1 and 2 messages will be allowed inflight per client until this limit 63 | # is exceeded. Defaults to 0. (No maximum) 64 | # See also max_inflight_messages 65 | #max_inflight_bytes 0 66 | 67 | # The maximum number of QoS 1 and 2 messages currently inflight per 68 | # client. 69 | # This includes messages that are partway through handshakes and 70 | # those that are being retried. Defaults to 20. Set to 0 for no 71 | # maximum. Setting to 1 will guarantee in-order delivery of QoS 1 72 | # and 2 messages. 73 | #max_inflight_messages 20 74 | 75 | # For MQTT v5 clients, it is possible to have the server send a "server 76 | # keepalive" value that will override the keepalive value set by the client. 77 | # This is intended to be used as a mechanism to say that the server will 78 | # disconnect the client earlier than it anticipated, and that the client should 79 | # use the new keepalive value. The max_keepalive option allows you to specify 80 | # that clients may only connect with keepalive less than or equal to this 81 | # value, otherwise they will be sent a server keepalive telling them to use 82 | # max_keepalive. This only applies to MQTT v5 clients. The default, and maximum 83 | # value allowable, is 65535. 84 | # 85 | # Set to 0 to allow clients to set keepalive = 0, which means no keepalive 86 | # checks are made and the client will never be disconnected by the broker if no 87 | # messages are received. You should be very sure this is the behaviour that you 88 | # want. 89 | # 90 | # For MQTT v3.1.1 and v3.1 clients, there is no mechanism to tell the client 91 | # what keepalive value they should use. If an MQTT v3.1.1 or v3.1 client 92 | # specifies a keepalive time greater than max_keepalive they will be sent a 93 | # CONNACK message with the "identifier rejected" reason code, and disconnected. 94 | # 95 | #max_keepalive 65535 96 | 97 | # For MQTT v5 clients, it is possible to have the server send a "maximum packet 98 | # size" value that will instruct the client it will not accept MQTT packets 99 | # with size greater than max_packet_size bytes. This applies to the full MQTT 100 | # packet, not just the payload. Setting this option to a positive value will 101 | # set the maximum packet size to that number of bytes. If a client sends a 102 | # packet which is larger than this value, it will be disconnected. This applies 103 | # to all clients regardless of the protocol version they are using, but v3.1.1 104 | # and earlier clients will of course not have received the maximum packet size 105 | # information. Defaults to no limit. Setting below 20 bytes is forbidden 106 | # because it is likely to interfere with ordinary client operation, even with 107 | # very small payloads. 108 | #max_packet_size 0 109 | 110 | # QoS 1 and 2 messages above those currently in-flight will be queued per 111 | # client until this limit is exceeded. Defaults to 0. (No maximum) 112 | # See also max_queued_messages. 113 | # If both max_queued_messages and max_queued_bytes are specified, packets will 114 | # be queued until the first limit is reached. 115 | #max_queued_bytes 0 116 | 117 | # Set the maximum QoS supported. Clients publishing at a QoS higher than 118 | # specified here will be disconnected. 119 | #max_qos 2 120 | 121 | # The maximum number of QoS 1 and 2 messages to hold in a queue per client 122 | # above those that are currently in-flight. Defaults to 1000. Set 123 | # to 0 for no maximum (not recommended). 124 | # See also queue_qos0_messages. 125 | # See also max_queued_bytes. 126 | #max_queued_messages 1000 127 | # 128 | # This option sets the maximum number of heap memory bytes that the broker will 129 | # allocate, and hence sets a hard limit on memory use by the broker. Memory 130 | # requests that exceed this value will be denied. The effect will vary 131 | # depending on what has been denied. If an incoming message is being processed, 132 | # then the message will be dropped and the publishing client will be 133 | # disconnected. If an outgoing message is being sent, then the individual 134 | # message will be dropped and the receiving client will be disconnected. 135 | # Defaults to no limit. 136 | #memory_limit 0 137 | 138 | # This option sets the maximum publish payload size that the broker will allow. 139 | # Received messages that exceed this size will not be accepted by the broker. 140 | # The default value is 0, which means that all valid MQTT messages are 141 | # accepted. MQTT imposes a maximum payload size of 268435455 bytes. 142 | #message_size_limit 0 143 | 144 | # This option allows persistent clients (those with clean session set to false) 145 | # to be removed if they do not reconnect within a certain time frame. 146 | # 147 | # This is a non-standard option in MQTT V3.1 but allowed in MQTT v3.1.1. 148 | # 149 | # Badly designed clients may set clean session to false whilst using a randomly 150 | # generated client id. This leads to persistent clients that will never 151 | # reconnect. This option allows these clients to be removed. 152 | # 153 | # The expiration period should be an integer followed by one of h d w m y for 154 | # hour, day, week, month and year respectively. For example 155 | # 156 | # persistent_client_expiration 2m 157 | # persistent_client_expiration 14d 158 | # persistent_client_expiration 1y 159 | # 160 | # The default if not set is to never expire persistent clients. 161 | #persistent_client_expiration 162 | 163 | # Write process id to a file. Default is a blank string which means 164 | # a pid file shouldn't be written. 165 | # This should be set to /var/run/mosquitto/mosquitto.pid if mosquitto is 166 | # being run automatically on boot with an init script and 167 | # start-stop-daemon or similar. 168 | #pid_file 169 | 170 | # Set to true to queue messages with QoS 0 when a persistent client is 171 | # disconnected. These messages are included in the limit imposed by 172 | # max_queued_messages and max_queued_bytes 173 | # Defaults to false. 174 | # This is a non-standard option for the MQTT v3.1 spec but is allowed in 175 | # v3.1.1. 176 | #queue_qos0_messages false 177 | 178 | # Set to false to disable retained message support. If a client publishes a 179 | # message with the retain bit set, it will be disconnected if this is set to 180 | # false. 181 | #retain_available true 182 | 183 | # Disable Nagle's algorithm on client sockets. This has the effect of reducing 184 | # latency of individual messages at the potential cost of increasing the number 185 | # of packets being sent. 186 | #set_tcp_nodelay false 187 | 188 | # Time in seconds between updates of the $SYS tree. 189 | # Set to 0 to disable the publishing of the $SYS tree. 190 | #sys_interval 10 191 | 192 | # The MQTT specification requires that the QoS of a message delivered to a 193 | # subscriber is never upgraded to match the QoS of the subscription. Enabling 194 | # this option changes this behaviour. If upgrade_outgoing_qos is set true, 195 | # messages sent to a subscriber will always match the QoS of its subscription. 196 | # This is a non-standard option explicitly disallowed by the spec. 197 | #upgrade_outgoing_qos false 198 | 199 | # When run as root, drop privileges to this user and its primary 200 | # group. 201 | # Set to root to stay as root, but this is not recommended. 202 | # If set to "mosquitto", or left unset, and the "mosquitto" user does not exist 203 | # then it will drop privileges to the "nobody" user instead. 204 | # If run as a non-root user, this setting has no effect. 205 | # Note that on Windows this has no effect and so mosquitto should be started by 206 | # the user you wish it to run as. 207 | #user mosquitto 208 | 209 | # ================================================================= 210 | # Listeners 211 | # ================================================================= 212 | 213 | # Listen on a port/ip address combination. By using this variable 214 | # multiple times, mosquitto can listen on more than one port. If 215 | # this variable is used and neither bind_address nor port given, 216 | # then the default listener will not be started. 217 | # The port number to listen on must be given. Optionally, an ip 218 | # address or host name may be supplied as a second argument. In 219 | # this case, mosquitto will attempt to bind the listener to that 220 | # address and so restrict access to the associated network and 221 | # interface. By default, mosquitto will listen on all interfaces. 222 | # Note that for a websockets listener it is not possible to bind to a host 223 | # name. 224 | # 225 | # On systems that support Unix Domain Sockets, it is also possible 226 | # to create a # Unix socket rather than opening a TCP socket. In 227 | # this case, the port number should be set to 0 and a unix socket 228 | # path must be provided, e.g. 229 | # listener 0 /tmp/mosquitto.sock 230 | # 231 | # listener port-number [ip address/host name/unix socket path] 232 | listener 1883 233 | 234 | # By default, a listener will attempt to listen on all supported IP protocol 235 | # versions. If you do not have an IPv4 or IPv6 interface you may wish to 236 | # disable support for either of those protocol versions. In particular, note 237 | # that due to the limitations of the websockets library, it will only ever 238 | # attempt to open IPv6 sockets if IPv6 support is compiled in, and so will fail 239 | # if IPv6 is not available. 240 | # 241 | # Set to `ipv4` to force the listener to only use IPv4, or set to `ipv6` to 242 | # force the listener to only use IPv6. If you want support for both IPv4 and 243 | # IPv6, then do not use the socket_domain option. 244 | # 245 | #socket_domain 246 | 247 | # Bind the listener to a specific interface. This is similar to 248 | # the [ip address/host name] part of the listener definition, but is useful 249 | # when an interface has multiple addresses or the address may change. If used 250 | # with the [ip address/host name] part of the listener definition, then the 251 | # bind_interface option will take priority. 252 | # Not available on Windows. 253 | # 254 | # Example: bind_interface eth0 255 | #bind_interface 256 | 257 | # When a listener is using the websockets protocol, it is possible to serve 258 | # http data as well. Set http_dir to a directory which contains the files you 259 | # wish to serve. If this option is not specified, then no normal http 260 | # connections will be possible. 261 | #http_dir 262 | 263 | # The maximum number of client connections to allow. This is 264 | # a per listener setting. 265 | # Default is -1, which means unlimited connections. 266 | # Note that other process limits mean that unlimited connections 267 | # are not really possible. Typically the default maximum number of 268 | # connections possible is around 1024. 269 | #max_connections -1 270 | 271 | # The listener can be restricted to operating within a topic hierarchy using 272 | # the mount_point option. This is achieved be prefixing the mount_point string 273 | # to all topics for any clients connected to this listener. This prefixing only 274 | # happens internally to the broker; the client will not see the prefix. 275 | #mount_point 276 | 277 | # Choose the protocol to use when listening. 278 | # This can be either mqtt or websockets. 279 | # Certificate based TLS may be used with websockets, except that only the 280 | # cafile, certfile, keyfile, ciphers, and ciphers_tls13 options are supported. 281 | #protocol mqtt 282 | 283 | # Set use_username_as_clientid to true to replace the clientid that a client 284 | # connected with with its username. This allows authentication to be tied to 285 | # the clientid, which means that it is possible to prevent one client 286 | # disconnecting another by using the same clientid. 287 | # If a client connects with no username it will be disconnected as not 288 | # authorised when this option is set to true. 289 | # Do not use in conjunction with clientid_prefixes. 290 | # See also use_identity_as_username. 291 | #use_username_as_clientid 292 | 293 | # Change the websockets headers size. This is a global option, it is not 294 | # possible to set per listener. This option sets the size of the buffer used in 295 | # the libwebsockets library when reading HTTP headers. If you are passing large 296 | # header data such as cookies then you may need to increase this value. If left 297 | # unset, or set to 0, then the default of 1024 bytes will be used. 298 | #websockets_headers_size 299 | 300 | # ----------------------------------------------------------------- 301 | # Certificate based SSL/TLS support 302 | # ----------------------------------------------------------------- 303 | # The following options can be used to enable certificate based SSL/TLS support 304 | # for this listener. Note that the recommended port for MQTT over TLS is 8883, 305 | # but this must be set manually. 306 | # 307 | # See also the mosquitto-tls man page and the "Pre-shared-key based SSL/TLS 308 | # support" section. Only one of certificate or PSK encryption support can be 309 | # enabled for any listener. 310 | 311 | # Both of certfile and keyfile must be defined to enable certificate based 312 | # TLS encryption. 313 | 314 | # Path to the PEM encoded server certificate. 315 | #certfile 316 | 317 | # Path to the PEM encoded keyfile. 318 | #keyfile 319 | 320 | # If you wish to control which encryption ciphers are used, use the ciphers 321 | # option. The list of available ciphers can be optained using the "openssl 322 | # ciphers" command and should be provided in the same format as the output of 323 | # that command. This applies to TLS 1.2 and earlier versions only. Use 324 | # ciphers_tls1.3 for TLS v1.3. 325 | #ciphers 326 | 327 | # Choose which TLS v1.3 ciphersuites are used for this listener. 328 | # Defaults to "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256" 329 | #ciphers_tls1.3 330 | 331 | # If you have require_certificate set to true, you can create a certificate 332 | # revocation list file to revoke access to particular client certificates. If 333 | # you have done this, use crlfile to point to the PEM encoded revocation file. 334 | #crlfile 335 | 336 | # To allow the use of ephemeral DH key exchange, which provides forward 337 | # security, the listener must load DH parameters. This can be specified with 338 | # the dhparamfile option. The dhparamfile can be generated with the command 339 | # e.g. "openssl dhparam -out dhparam.pem 2048" 340 | #dhparamfile 341 | 342 | # By default an TLS enabled listener will operate in a similar fashion to a 343 | # https enabled web server, in that the server has a certificate signed by a CA 344 | # and the client will verify that it is a trusted certificate. The overall aim 345 | # is encryption of the network traffic. By setting require_certificate to true, 346 | # the client must provide a valid certificate in order for the network 347 | # connection to proceed. This allows access to the broker to be controlled 348 | # outside of the mechanisms provided by MQTT. 349 | #require_certificate false 350 | 351 | # cafile and capath define methods of accessing the PEM encoded 352 | # Certificate Authority certificates that will be considered trusted when 353 | # checking incoming client certificates. 354 | # cafile defines the path to a file containing the CA certificates. 355 | # capath defines a directory that will be searched for files 356 | # containing the CA certificates. For capath to work correctly, the 357 | # certificate files must have ".crt" as the file ending and you must run 358 | # "openssl rehash " each time you add/remove a certificate. 359 | #cafile 360 | #capath 361 | 362 | 363 | # If require_certificate is true, you may set use_identity_as_username to true 364 | # to use the CN value from the client certificate as a username. If this is 365 | # true, the password_file option will not be used for this listener. 366 | #use_identity_as_username false 367 | 368 | # ----------------------------------------------------------------- 369 | # Pre-shared-key based SSL/TLS support 370 | # ----------------------------------------------------------------- 371 | # The following options can be used to enable PSK based SSL/TLS support for 372 | # this listener. Note that the recommended port for MQTT over TLS is 8883, but 373 | # this must be set manually. 374 | # 375 | # See also the mosquitto-tls man page and the "Certificate based SSL/TLS 376 | # support" section. Only one of certificate or PSK encryption support can be 377 | # enabled for any listener. 378 | 379 | # The psk_hint option enables pre-shared-key support for this listener and also 380 | # acts as an identifier for this listener. The hint is sent to clients and may 381 | # be used locally to aid authentication. The hint is a free form string that 382 | # doesn't have much meaning in itself, so feel free to be creative. 383 | # If this option is provided, see psk_file to define the pre-shared keys to be 384 | # used or create a security plugin to handle them. 385 | #psk_hint 386 | 387 | # When using PSK, the encryption ciphers used will be chosen from the list of 388 | # available PSK ciphers. If you want to control which ciphers are available, 389 | # use the "ciphers" option. The list of available ciphers can be optained 390 | # using the "openssl ciphers" command and should be provided in the same format 391 | # as the output of that command. 392 | #ciphers 393 | 394 | # Set use_identity_as_username to have the psk identity sent by the client used 395 | # as its username. Authentication will be carried out using the PSK rather than 396 | # the MQTT username/password and so password_file will not be used for this 397 | # listener. 398 | #use_identity_as_username false 399 | 400 | 401 | # ================================================================= 402 | # Persistence 403 | # ================================================================= 404 | 405 | # If persistence is enabled, save the in-memory database to disk 406 | # every autosave_interval seconds. If set to 0, the persistence 407 | # database will only be written when mosquitto exits. See also 408 | # autosave_on_changes. 409 | # Note that writing of the persistence database can be forced by 410 | # sending mosquitto a SIGUSR1 signal. 411 | #autosave_interval 1800 412 | 413 | # If true, mosquitto will count the number of subscription changes, retained 414 | # messages received and queued messages and if the total exceeds 415 | # autosave_interval then the in-memory database will be saved to disk. 416 | # If false, mosquitto will save the in-memory database to disk by treating 417 | # autosave_interval as a time in seconds. 418 | #autosave_on_changes false 419 | 420 | # Save persistent message data to disk (true/false). 421 | # This saves information about all messages, including 422 | # subscriptions, currently in-flight messages and retained 423 | # messages. 424 | # retained_persistence is a synonym for this option. 425 | persistence true 426 | 427 | # The filename to use for the persistent database, not including 428 | # the path. 429 | #persistence_file mosquitto.db 430 | 431 | # Location for persistent database. 432 | # Default is an empty string (current directory). 433 | # Set to e.g. /var/lib/mosquitto if running as a proper service on Linux or 434 | # similar. 435 | persistence_location /mosquitto/data 436 | 437 | 438 | # ================================================================= 439 | # Logging 440 | # ================================================================= 441 | 442 | # Places to log to. Use multiple log_dest lines for multiple 443 | # logging destinations. 444 | # Possible destinations are: stdout stderr syslog topic file dlt 445 | # 446 | # stdout and stderr log to the console on the named output. 447 | # 448 | # syslog uses the userspace syslog facility which usually ends up 449 | # in /var/log/messages or similar. 450 | # 451 | # topic logs to the broker topic '$SYS/broker/log/', 452 | # where severity is one of D, E, W, N, I, M which are debug, error, 453 | # warning, notice, information and message. Message type severity is used by 454 | # the subscribe/unsubscribe log_types and publishes log messages to 455 | # $SYS/broker/log/M/susbcribe or $SYS/broker/log/M/unsubscribe. 456 | # 457 | # The file destination requires an additional parameter which is the file to be 458 | # logged to, e.g. "log_dest file /var/log/mosquitto.log". The file will be 459 | # closed and reopened when the broker receives a HUP signal. Only a single file 460 | # destination may be configured. 461 | # 462 | # The dlt destination is for the automotive `Diagnostic Log and Trace` tool. 463 | # This requires that Mosquitto has been compiled with DLT support. 464 | # 465 | # Note that if the broker is running as a Windows service it will default to 466 | # "log_dest none" and neither stdout nor stderr logging is available. 467 | # Use "log_dest none" if you wish to disable logging. 468 | log_dest file /mosquitto/log/mosquitto.log 469 | 470 | # Types of messages to log. Use multiple log_type lines for logging 471 | # multiple types of messages. 472 | # Possible types are: debug, error, warning, notice, information, 473 | # none, subscribe, unsubscribe, websockets, all. 474 | # Note that debug type messages are for decoding the incoming/outgoing 475 | # network packets. They are not logged in "topics". 476 | #log_type error 477 | #log_type warning 478 | #log_type notice 479 | #log_type information 480 | 481 | 482 | # If set to true, client connection and disconnection messages will be included 483 | # in the log. 484 | #connection_messages true 485 | 486 | # If using syslog logging (not on Windows), messages will be logged to the 487 | # "daemon" facility by default. Use the log_facility option to choose which of 488 | # local0 to local7 to log to instead. The option value should be an integer 489 | # value, e.g. "log_facility 5" to use local5. 490 | #log_facility 491 | 492 | # If set to true, add a timestamp value to each log message. 493 | #log_timestamp true 494 | 495 | # Set the format of the log timestamp. If left unset, this is the number of 496 | # seconds since the Unix epoch. 497 | # This is a free text string which will be passed to the strftime function. To 498 | # get an ISO 8601 datetime, for example: 499 | # log_timestamp_format %Y-%m-%dT%H:%M:%S 500 | #log_timestamp_format 501 | 502 | # Change the websockets logging level. This is a global option, it is not 503 | # possible to set per listener. This is an integer that is interpreted by 504 | # libwebsockets as a bit mask for its lws_log_levels enum. See the 505 | # libwebsockets documentation for more details. "log_type websockets" must also 506 | # be enabled. 507 | #websockets_log_level 0 508 | 509 | 510 | # ================================================================= 511 | # Security 512 | # ================================================================= 513 | 514 | # If set, only clients that have a matching prefix on their 515 | # clientid will be allowed to connect to the broker. By default, 516 | # all clients may connect. 517 | # For example, setting "secure-" here would mean a client "secure- 518 | # client" could connect but another with clientid "mqtt" couldn't. 519 | #clientid_prefixes 520 | 521 | # Boolean value that determines whether clients that connect 522 | # without providing a username are allowed to connect. If set to 523 | # false then a password file should be created (see the 524 | # password_file option) to control authenticated client access. 525 | # 526 | # Defaults to false, unless there are no listeners defined in the configuration 527 | # file, in which case it is set to true, but connections are only allowed from 528 | # the local machine. 529 | allow_anonymous true 530 | 531 | # ----------------------------------------------------------------- 532 | # Default authentication and topic access control 533 | # ----------------------------------------------------------------- 534 | 535 | # Control access to the broker using a password file. This file can be 536 | # generated using the mosquitto_passwd utility. If TLS support is not compiled 537 | # into mosquitto (it is recommended that TLS support should be included) then 538 | # plain text passwords are used, in which case the file should be a text file 539 | # with lines in the format: 540 | # username:password 541 | # The password (and colon) may be omitted if desired, although this 542 | # offers very little in the way of security. 543 | # 544 | # See the TLS client require_certificate and use_identity_as_username options 545 | # for alternative authentication options. If a plugin is used as well as 546 | # password_file, the plugin check will be made first. 547 | #password_file /mosquitto/config/pwfile 548 | 549 | # Access may also be controlled using a pre-shared-key file. This requires 550 | # TLS-PSK support and a listener configured to use it. The file should be text 551 | # lines in the format: 552 | # identity:key 553 | # The key should be in hexadecimal format without a leading "0x". 554 | # If an plugin is used as well, the plugin check will be made first. 555 | #psk_file 556 | 557 | # Control access to topics on the broker using an access control list 558 | # file. If this parameter is defined then only the topics listed will 559 | # have access. 560 | # If the first character of a line of the ACL file is a # it is treated as a 561 | # comment. 562 | # Topic access is added with lines of the format: 563 | # 564 | # topic [read|write|readwrite|deny] 565 | # 566 | # The access type is controlled using "read", "write", "readwrite" or "deny". 567 | # This parameter is optional (unless contains a space character) - if 568 | # not given then the access is read/write. can contain the + or # 569 | # wildcards as in subscriptions. 570 | # 571 | # The "deny" option can used to explicity deny access to a topic that would 572 | # otherwise be granted by a broader read/write/readwrite statement. Any "deny" 573 | # topics are handled before topics that grant read/write access. 574 | # 575 | # The first set of topics are applied to anonymous clients, assuming 576 | # allow_anonymous is true. User specific topic ACLs are added after a 577 | # user line as follows: 578 | # 579 | # user 580 | # 581 | # The username referred to here is the same as in password_file. It is 582 | # not the clientid. 583 | # 584 | # 585 | # If is also possible to define ACLs based on pattern substitution within the 586 | # topic. The patterns available for substition are: 587 | # 588 | # %c to match the client id of the client 589 | # %u to match the username of the client 590 | # 591 | # The substitution pattern must be the only text for that level of hierarchy. 592 | # 593 | # The form is the same as for the topic keyword, but using pattern as the 594 | # keyword. 595 | # Pattern ACLs apply to all users even if the "user" keyword has previously 596 | # been given. 597 | # 598 | # If using bridges with usernames and ACLs, connection messages can be allowed 599 | # with the following pattern: 600 | # pattern write $SYS/broker/connection/%c/state 601 | # 602 | # pattern [read|write|readwrite] 603 | # 604 | # Example: 605 | # 606 | # pattern write sensor/%u/data 607 | # 608 | # If an plugin is used as well as acl_file, the plugin check will be 609 | # made first. 610 | #acl_file 611 | 612 | # ----------------------------------------------------------------- 613 | # External authentication and topic access plugin options 614 | # ----------------------------------------------------------------- 615 | 616 | # External authentication and access control can be supported with the 617 | # plugin option. This is a path to a loadable plugin. See also the 618 | # plugin_opt_* options described below. 619 | # 620 | # The plugin option can be specified multiple times to load multiple 621 | # plugins. The plugins will be processed in the order that they are specified 622 | # here. If the plugin option is specified alongside either of 623 | # password_file or acl_file then the plugin checks will be made first. 624 | # 625 | # If the per_listener_settings option is false, the plugin will be apply to all 626 | # listeners. If per_listener_settings is true, then the plugin will apply to 627 | # the current listener being defined only. 628 | # 629 | # This option is also available as `auth_plugin`, but this use is deprecated 630 | # and will be removed in the future. 631 | # 632 | #plugin 633 | 634 | # If the plugin option above is used, define options to pass to the 635 | # plugin here as described by the plugin instructions. All options named 636 | # using the format plugin_opt_* will be passed to the plugin, for example: 637 | # 638 | # This option is also available as `auth_opt_*`, but this use is deprecated 639 | # and will be removed in the future. 640 | # 641 | # plugin_opt_db_host 642 | # plugin_opt_db_port 643 | # plugin_opt_db_username 644 | # plugin_opt_db_password 645 | 646 | 647 | # ================================================================= 648 | # Bridges 649 | # ================================================================= 650 | 651 | # A bridge is a way of connecting multiple MQTT brokers together. 652 | # Create a new bridge using the "connection" option as described below. Set 653 | # options for the bridges using the remaining parameters. You must specify the 654 | # address and at least one topic to subscribe to. 655 | # 656 | # Each connection must have a unique name. 657 | # 658 | # The address line may have multiple host address and ports specified. See 659 | # below in the round_robin description for more details on bridge behaviour if 660 | # multiple addresses are used. Note that if you use an IPv6 address, then you 661 | # are required to specify a port. 662 | # 663 | # The direction that the topic will be shared can be chosen by 664 | # specifying out, in or both, where the default value is out. 665 | # The QoS level of the bridged communication can be specified with the next 666 | # topic option. The default QoS level is 0, to change the QoS the topic 667 | # direction must also be given. 668 | # 669 | # The local and remote prefix options allow a topic to be remapped when it is 670 | # bridged to/from the remote broker. This provides the ability to place a topic 671 | # tree in an appropriate location. 672 | # 673 | # For more details see the mosquitto.conf man page. 674 | # 675 | # Multiple topics can be specified per connection, but be careful 676 | # not to create any loops. 677 | # 678 | # If you are using bridges with cleansession set to false (the default), then 679 | # you may get unexpected behaviour from incoming topics if you change what 680 | # topics you are subscribing to. This is because the remote broker keeps the 681 | # subscription for the old topic. If you have this problem, connect your bridge 682 | # with cleansession set to true, then reconnect with cleansession set to false 683 | # as normal. 684 | #connection 685 | #address [:] [[:]] 686 | #topic [[[out | in | both] qos-level] local-prefix remote-prefix] 687 | 688 | # If you need to have the bridge connect over a particular network interface, 689 | # use bridge_bind_address to tell the bridge which local IP address the socket 690 | # should bind to, e.g. `bridge_bind_address 192.168.1.10` 691 | #bridge_bind_address 692 | 693 | # If a bridge has topics that have "out" direction, the default behaviour is to 694 | # send an unsubscribe request to the remote broker on that topic. This means 695 | # that changing a topic direction from "in" to "out" will not keep receiving 696 | # incoming messages. Sending these unsubscribe requests is not always 697 | # desirable, setting bridge_attempt_unsubscribe to false will disable sending 698 | # the unsubscribe request. 699 | #bridge_attempt_unsubscribe true 700 | 701 | # Set the version of the MQTT protocol to use with for this bridge. Can be one 702 | # of mqttv50, mqttv311 or mqttv31. Defaults to mqttv311. 703 | #bridge_protocol_version mqttv311 704 | 705 | # Set the clean session variable for this bridge. 706 | # When set to true, when the bridge disconnects for any reason, all 707 | # messages and subscriptions will be cleaned up on the remote 708 | # broker. Note that with cleansession set to true, there may be a 709 | # significant amount of retained messages sent when the bridge 710 | # reconnects after losing its connection. 711 | # When set to false, the subscriptions and messages are kept on the 712 | # remote broker, and delivered when the bridge reconnects. 713 | #cleansession false 714 | 715 | # Set the amount of time a bridge using the lazy start type must be idle before 716 | # it will be stopped. Defaults to 60 seconds. 717 | #idle_timeout 60 718 | 719 | # Set the keepalive interval for this bridge connection, in 720 | # seconds. 721 | #keepalive_interval 60 722 | 723 | # Set the clientid to use on the local broker. If not defined, this defaults to 724 | # 'local.'. If you are bridging a broker to itself, it is important 725 | # that local_clientid and clientid do not match. 726 | #local_clientid 727 | 728 | # If set to true, publish notification messages to the local and remote brokers 729 | # giving information about the state of the bridge connection. Retained 730 | # messages are published to the topic $SYS/broker/connection//state 731 | # unless the notification_topic option is used. 732 | # If the message is 1 then the connection is active, or 0 if the connection has 733 | # failed. 734 | # This uses the last will and testament feature. 735 | #notifications true 736 | 737 | # Choose the topic on which notification messages for this bridge are 738 | # published. If not set, messages are published on the topic 739 | # $SYS/broker/connection//state 740 | #notification_topic 741 | 742 | # Set the client id to use on the remote end of this bridge connection. If not 743 | # defined, this defaults to 'name.hostname' where name is the connection name 744 | # and hostname is the hostname of this computer. 745 | # This replaces the old "clientid" option to avoid confusion. "clientid" 746 | # remains valid for the time being. 747 | #remote_clientid 748 | 749 | # Set the password to use when connecting to a broker that requires 750 | # authentication. This option is only used if remote_username is also set. 751 | # This replaces the old "password" option to avoid confusion. "password" 752 | # remains valid for the time being. 753 | #remote_password 754 | 755 | # Set the username to use when connecting to a broker that requires 756 | # authentication. 757 | # This replaces the old "username" option to avoid confusion. "username" 758 | # remains valid for the time being. 759 | #remote_username 760 | 761 | # Set the amount of time a bridge using the automatic start type will wait 762 | # until attempting to reconnect. 763 | # This option can be configured to use a constant delay time in seconds, or to 764 | # use a backoff mechanism based on "Decorrelated Jitter", which adds a degree 765 | # of randomness to when the restart occurs. 766 | # 767 | # Set a constant timeout of 20 seconds: 768 | # restart_timeout 20 769 | # 770 | # Set backoff with a base (start value) of 10 seconds and a cap (upper limit) of 771 | # 60 seconds: 772 | # restart_timeout 10 30 773 | # 774 | # Defaults to jitter with a base of 5 and cap of 30 775 | #restart_timeout 5 30 776 | 777 | # If the bridge has more than one address given in the address/addresses 778 | # configuration, the round_robin option defines the behaviour of the bridge on 779 | # a failure of the bridge connection. If round_robin is false, the default 780 | # value, then the first address is treated as the main bridge connection. If 781 | # the connection fails, the other secondary addresses will be attempted in 782 | # turn. Whilst connected to a secondary bridge, the bridge will periodically 783 | # attempt to reconnect to the main bridge until successful. 784 | # If round_robin is true, then all addresses are treated as equals. If a 785 | # connection fails, the next address will be tried and if successful will 786 | # remain connected until it fails 787 | #round_robin false 788 | 789 | # Set the start type of the bridge. This controls how the bridge starts and 790 | # can be one of three types: automatic, lazy and once. Note that RSMB provides 791 | # a fourth start type "manual" which isn't currently supported by mosquitto. 792 | # 793 | # "automatic" is the default start type and means that the bridge connection 794 | # will be started automatically when the broker starts and also restarted 795 | # after a short delay (30 seconds) if the connection fails. 796 | # 797 | # Bridges using the "lazy" start type will be started automatically when the 798 | # number of queued messages exceeds the number set with the "threshold" 799 | # parameter. It will be stopped automatically after the time set by the 800 | # "idle_timeout" parameter. Use this start type if you wish the connection to 801 | # only be active when it is needed. 802 | # 803 | # A bridge using the "once" start type will be started automatically when the 804 | # broker starts but will not be restarted if the connection fails. 805 | #start_type automatic 806 | 807 | # Set the number of messages that need to be queued for a bridge with lazy 808 | # start type to be restarted. Defaults to 10 messages. 809 | # Must be less than max_queued_messages. 810 | #threshold 10 811 | 812 | # If try_private is set to true, the bridge will attempt to indicate to the 813 | # remote broker that it is a bridge not an ordinary client. If successful, this 814 | # means that loop detection will be more effective and that retained messages 815 | # will be propagated correctly. Not all brokers support this feature so it may 816 | # be necessary to set try_private to false if your bridge does not connect 817 | # properly. 818 | #try_private true 819 | 820 | # Some MQTT brokers do not allow retained messages. MQTT v5 gives a mechanism 821 | # for brokers to tell clients that they do not support retained messages, but 822 | # this is not possible for MQTT v3.1.1 or v3.1. If you need to bridge to a 823 | # v3.1.1 or v3.1 broker that does not support retained messages, set the 824 | # bridge_outgoing_retain option to false. This will remove the retain bit on 825 | # all outgoing messages to that bridge, regardless of any other setting. 826 | #bridge_outgoing_retain true 827 | 828 | # If you wish to restrict the size of messages sent to a remote bridge, use the 829 | # bridge_max_packet_size option. This sets the maximum number of bytes for 830 | # the total message, including headers and payload. 831 | # Note that MQTT v5 brokers may provide their own maximum-packet-size property. 832 | # In this case, the smaller of the two limits will be used. 833 | # Set to 0 for "unlimited". 834 | #bridge_max_packet_size 0 835 | 836 | 837 | # ----------------------------------------------------------------- 838 | # Certificate based SSL/TLS support 839 | # ----------------------------------------------------------------- 840 | # Either bridge_cafile or bridge_capath must be defined to enable TLS support 841 | # for this bridge. 842 | # bridge_cafile defines the path to a file containing the 843 | # Certificate Authority certificates that have signed the remote broker 844 | # certificate. 845 | # bridge_capath defines a directory that will be searched for files containing 846 | # the CA certificates. For bridge_capath to work correctly, the certificate 847 | # files must have ".crt" as the file ending and you must run "openssl rehash 848 | # " each time you add/remove a certificate. 849 | #bridge_cafile 850 | #bridge_capath 851 | 852 | 853 | # If the remote broker has more than one protocol available on its port, e.g. 854 | # MQTT and WebSockets, then use bridge_alpn to configure which protocol is 855 | # requested. Note that WebSockets support for bridges is not yet available. 856 | #bridge_alpn 857 | 858 | # When using certificate based encryption, bridge_insecure disables 859 | # verification of the server hostname in the server certificate. This can be 860 | # useful when testing initial server configurations, but makes it possible for 861 | # a malicious third party to impersonate your server through DNS spoofing, for 862 | # example. Use this option in testing only. If you need to resort to using this 863 | # option in a production environment, your setup is at fault and there is no 864 | # point using encryption. 865 | #bridge_insecure false 866 | 867 | # Path to the PEM encoded client certificate, if required by the remote broker. 868 | #bridge_certfile 869 | 870 | # Path to the PEM encoded client private key, if required by the remote broker. 871 | #bridge_keyfile 872 | 873 | # ----------------------------------------------------------------- 874 | # PSK based SSL/TLS support 875 | # ----------------------------------------------------------------- 876 | # Pre-shared-key encryption provides an alternative to certificate based 877 | # encryption. A bridge can be configured to use PSK with the bridge_identity 878 | # and bridge_psk options. These are the client PSK identity, and pre-shared-key 879 | # in hexadecimal format with no "0x". Only one of certificate and PSK based 880 | # encryption can be used on one 881 | # bridge at once. 882 | #bridge_identity 883 | #bridge_psk 884 | 885 | 886 | # ================================================================= 887 | # External config files 888 | # ================================================================= 889 | 890 | # External configuration files may be included by using the 891 | # include_dir option. This defines a directory that will be searched 892 | # for config files. All files that end in '.conf' will be loaded as 893 | # a configuration file. It is best to have this as the last option 894 | # in the main file. This option will only be processed from the main 895 | # configuration file. The directory specified must not contain the 896 | # main configuration file. 897 | # Files within include_dir will be loaded sorted in case-sensitive 898 | # alphabetical order, with capital letters ordered first. If this option is 899 | # given multiple times, all of the files from the first instance will be 900 | # processed before the next instance. See the man page for examples. 901 | #include_dir 902 | --------------------------------------------------------------------------------