# Mosquitto broker "starting in local only mode"

**URL:** <https://forum.arduino.cc/t/mosquitto-broker-starting-in-local-only-mode/1009013>\
**Category:** Networking, Protocols, and Devices\
**Created:** [July 3, 2022, 7:33pm UTC](https://forum.arduino.cc/t/mosquitto-broker-starting-in-local-only-mode/1009013 "2022-07-03T19:33:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaffemitmilf](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kaffemitmilf](https://forum.arduino.cc/u/kaffemitmilf)\
**Post date:** [July 3, 2022, 7:33pm UTC](https://forum.arduino.cc/t/mosquitto-broker-starting-in-local-only-mode/1009013/1 "2022-07-03T19:33:14Z")

</div>

Hey, I am currently trying to configure my Mosquitto broker running headless on a raspberry pi 4...  
When running `mosquitto -v` I always get as response, that its running on local mode only.

```cpp

1656875923: mosquitto version 2.0.11 starting
1656875923: Using default config.
1656875923: Starting in local only mode. Connections will only be possible from clients running on this machine.
1656875923: Create a configuration file which defines a listener to allow remote access.
1656875923: For more details see https://mosquitto.org/documentation/authentication-methods/
1656875923: Opening ipv4 listen socket on port 1883.
1656875923: Opening ipv6 listen socket on port 1883.
1656875923: mosquitto version 2.0.11 running

```

The linked docs doesnt help, I already tried `bind_address 0.0.0.0` in the mosquitto.conf file, even when allow\_anonymous is true it doesnt work.

This is my config file:

```cpp
  GNU nano 5.4 /etc/mosquitto/mosquitto.conf
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
per_listener_settings true

pid_file /run/mosquitto/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d

allow_anonymous false

listener 1883
password_file /etc/mosquitto/passwd

```

It works communicating on the machine, but I cant connect with my mqtt dashboard or else.  
Could you please help me? Idk what to do anymore ☹

Thanks!

---

<div class="post-metadata">

**Author:** ![UKHeliBob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ukhelibob/32/215663_2.png) [@UKHeliBob](https://forum.arduino.cc/u/UKHeliBob)\
**Post date:** [July 3, 2022, 9:27pm UTC](https://forum.arduino.cc/t/mosquitto-broker-starting-in-local-only-mode/1009013/2 "2022-07-03T21:27:22Z")

</div>

Do you think that it might be better to seek help on a Raspberry Pi forum as your problem has nothing to do with the Arduino ?

---

<div class="post-metadata">

**Author:** ![pylon](https://avatars.discourse-cdn.com/v4/letter/p/59ef9b/32.png) [@pylon](https://forum.arduino.cc/u/pylon)\
**Post date:** [July 4, 2022, 2:36pm UTC](https://forum.arduino.cc/t/mosquitto-broker-starting-in-local-only-mode/1009013/3 "2022-07-04T14:36:55Z")

</div>

> [@kaffemitmilf](#):
>
> When running `mosquitto -v` I always get as response, that its running on local mode only.

If you start mosquitto that way it won't use the config file you made.

Given you installed mosquitto using the Raspberry's Debian package system you should start mosquitto as a service:

`service mosquitto start`

In most cases this isn't necessary as the service probably should start at power up by default.

`service mosquitto status`

should show you if the service is active.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [December 31, 2022, 2:37pm UTC](https://forum.arduino.cc/t/mosquitto-broker-starting-in-local-only-mode/1009013/4 "2022-12-31T14:37:42Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
