# Hivemq-ce persistence config

**URL:** <https://community.hivemq.com/t/hivemq-ce-persistence-config/43>\
**Category:** HiveMQ Community Edition\
**Created:** [April 25, 2019, 9:07am UTC](https://community.hivemq.com/t/hivemq-ce-persistence-config/43 "2019-04-25T09:07:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![caevv](https://avatars.discourse-cdn.com/v4/letter/c/a88e4f/32.png) [@caevv](https://community.hivemq.com/u/caevv)\
**Post date:** [April 25, 2019, 9:07am UTC](https://community.hivemq.com/t/hivemq-ce-persistence-config/43/1 "2019-04-25T09:07:53Z")

</div>

What is the equivalent of mosquitto:

persistence true  
persistence\_location /mosquitto/data

Thanks

---

<div class="post-metadata">

**Author:** ![hivemq-support](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/hivemq-support/32/357_2.png) [@hivemq-support](https://community.hivemq.com/u/hivemq-support)\
**Post date:** [April 25, 2019, 9:30am UTC](https://community.hivemq.com/t/hivemq-ce-persistence-config/43/2 "2019-04-25T09:30:54Z")

</div>

Hi caevv,  
HiveMQ always persists its data.  
You can change the folder by following [the user guide](https://www.hivemq.com/docs/4.1/hivemq/configuration.html#folders).

Kind regards,  
Florian

---

<div class="post-metadata">

**Author:** ![caevv](https://avatars.discourse-cdn.com/v4/letter/c/a88e4f/32.png) [@caevv](https://community.hivemq.com/u/caevv)\
**Post date:** [April 25, 2019, 9:36am UTC](https://community.hivemq.com/t/hivemq-ce-persistence-config/43/3 "2019-04-25T09:36:05Z")

</div>

So basically for the persistence storage folder, would it be?

`hivemq.data.folder` `HIVEMQ_DATA_FOLDER` `HiveMQ data folder`

---

<div class="post-metadata">

**Author:** ![hivemq-support](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/hivemq-support/32/357_2.png) [@hivemq-support](https://community.hivemq.com/u/hivemq-support)\
**Post date:** [April 25, 2019, 11:59am UTC](https://community.hivemq.com/t/hivemq-ce-persistence-config/43/4 "2019-04-25T11:59:24Z")

</div>

In order to set your data folder you need to add the following:

As Java option:

`JAVA_OPTS="$JAVA_OPTS -Dhivemq.data.folder=/path/to/folder"`

as Environment variable:

`export HIVEMQ_DATA_FOLDER=/path/to/your/folder`

Please not that HiveMQ uses the HIVEMQ\_HOME/data folder by default, if you do not specifically set a folder.

---

<div class="post-metadata">

**Author:** ![hellomqtt](https://avatars.discourse-cdn.com/v4/letter/h/f4b2a3/32.png) [@hellomqtt](https://community.hivemq.com/u/hellomqtt)\
**Post date:** [August 19, 2020, 6:13am UTC](https://community.hivemq.com/t/hivemq-ce-persistence-config/43/5 "2020-08-19T06:13:53Z")

</div>

client publish meesage with qos1 and cleanSession=false option,  
consumer consume with with qos1 and cleanSession=false option too.  
but when the consumer offline and go back online,it can’t get offline message,so what the matter is?

---

<div class="post-metadata">

**Author:** ![hellomqtt](https://avatars.discourse-cdn.com/v4/letter/h/f4b2a3/32.png) [@hellomqtt](https://community.hivemq.com/u/hellomqtt)\
**Post date:** [August 19, 2020, 7:11am UTC](https://community.hivemq.com/t/hivemq-ce-persistence-config/43/6 "2020-08-19T07:11:55Z")

</div>

First i use mqtt.fx gui client,it can’t receive offline message,  
then i use eclipse paho client,it can receive message,so it’s probably the mqtt.fx problem

---

<div class="post-metadata">

**Author:** ![hivemq-support](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/hivemq-support/32/357_2.png) [@hivemq-support](https://community.hivemq.com/u/hivemq-support)\
**Post date:** [August 23, 2020, 5:22pm UTC](https://community.hivemq.com/t/hivemq-ce-persistence-config/43/7 "2020-08-23T17:22:40Z")

</div>

Hi @hellomqtt,

Welcome to the forum.  
It’s possible that MQTT.fx has an issue here. HiveMQ CE does certainly queue offline messages for persistent (cleanStart=false / cleanSession=false )  
Have you tried the [MQTT CLI](https://hivemq.github.io/mqtt-cli/docs/quick_start.html) for testing, yet?

Best,  
Florian from The HiveMQ Team.
