Skip to content

Commit 2aeeb13

Browse files
authored
Merge pull request #2819 from emqx/250212-add-base-hocon-config
docs: promote base.hocon for mutable configs
2 parents 424ae9e + 0ecdfba commit 2aeeb13

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+103
-99
lines changed

en_US/access-control/authn/authn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ You can also configure EMQX authenticators with our configuration file.
220220
For example, as shown in the `authentication` field below, we have created an authentication chain with multiple authenticators, these authenticators will run in the order as they are in the configuration file.
221221

222222
```
223-
# emqx.conf
223+
# base.hocon
224224
225225
# Specific global authentication chain for all MQTT listeners
226226
authentication = [

en_US/access-control/authn/x509.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ You can use fields from the peer certificate like CN, DN, or the entire certific
5757

5858
### Configure via Configuration File
5959

60-
1. Open the configuration file `emqx.conf`, which may be located in `./etc` or `/etc/emqx/etc` directory, depending on your installation.
61-
2. By default, MQTT configuration is not in `emqx.conf`. Add the following configuration to override the default values:
60+
1. Open the configuration file which may be located in `./etc` or `/etc/emqx/etc` directory, depending on your installation.
61+
2. MQTT configuration is not explicitly defined in any configuration file. Add the following to override the default values:
6262

6363
```bash
6464
mqtt {

en_US/access-control/authz/authz.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ EMQX Dashboard is an intuitive way to configure EMQX authorizer, where you can c
205205

206206
### Configure with Configuration File
207207

208-
You can also configure authorization in the `authorization` fields in the configuration file `emqx.conf`. The general config structure is the following:
208+
You can also configure authorization in the `authorization` fields in the configuration file. The general config structure is the following:
209209

210210
```bash
211211
authorization {

en_US/access-control/flapping-detect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Click **Save Changes** to finish the setting.
2626

2727
## Enable Flapping Detect in Configuration File
2828

29-
You can also enable the flapping detect feature by adding the following configuration to the `emqx.conf` file:
29+
You can also enable the flapping detect feature by adding the following configuration:
3030

3131
```bash
3232
flapping_detect {

en_US/admin/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ For security reasons, starting from EMQX 5.0.0, you cannot use Dashboard user cr
4848

4949
You can manually create API keys for authentication on the Dashboard by navigating to **System** -> **API Key**. For instructions, see [System - API Keys](../dashboard/system.md#api-keys).
5050

51-
You can also create API keys using the bootstrap file method. Add the following configuration to the `emqx.conf` file to specify the file location:
51+
You can also create API keys using the bootstrap file method. Add the following configuration file to specify the file location:
5252

5353
```bash
5454
api_key = {

en_US/changes/gateway-4.4-to-5.1-incompatibility.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ lwm2m.bind.dtls.1 = 0.0.0.0:5684
7878
In EMQX 5.x, all protocol gateways have the same format for the listener configuration. Take the Exproto gateway as an example:
7979

8080
```
81-
## etc/emqx.conf
81+
## etc/emqx.conf or base.hocon (since EMQX 5.9)
8282
gateway.exproto {
8383
listeners.tcp.default {
8484
bind = "0.0.0.0:7993"
@@ -200,4 +200,4 @@ gateway.lwm2m {
200200
update {qos = 0, topic = "up/update"}
201201
}
202202
}
203-
```
203+
```

en_US/configuration/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ The following configuration items can be overridden at the zone level:
290290

291291
In EMQX version 5, the default configuration file does not include any zones, which differs from version 4, where there are two default zones: `internal` and `external`.
292292

293-
To create a zone, you need to define it in `emqx.conf`, for example:
293+
To create a zone, you need to define it in the config file, for example:
294294

295295
```bash
296296
zones {

en_US/configuration/flapping.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ Where, <!--did not add the dashboard UI as it seems that most configurations lis
2121

2222
::: tip
2323

24-
You can also customize the settings via the Dashboard by clicking **Access Control** -> **Flapping Detect** on the left navigation menu. Once you have configured these items with Dashboard, your settings will override the same configuration items in `emqx.conf`.
24+
You can also customize the settings via the Dashboard by clicking **Access Control** -> **Flapping Detect** on the left navigation menu. Once you have configured these items with Dashboard, your settings will override the same configuration items in the config file.
2525

2626
:::
2727

2828
::: tip
2929

3030
EMQX offers more configuration items to better serve customized needs. For details, see the [EMQX Open Source Configuration Manual](https://docs.emqx.com/en/emqx/v@CE_VERSION@/hocon/) and [EMQX Enterprise Configuration Manual for Enterprise](https://docs.emqx.com/en/enterprise/v@EE_VERSION@/hocon/).
3131

32-
:::
32+
:::

en_US/configuration/license.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Where,
2626

2727
If the license is configured via `'file://<license_file_path>'` notation, EMQX will be automatically reloading it every 2 minutes.
2828

29-
Additionally, you can configure the settings for the license connection quota usage in the configuration file `emqx.conf`.
29+
Additionally, you can configure the settings for the license connection quota usage in the configuration file as follows:
3030

3131
```bash
3232
license {
@@ -46,7 +46,7 @@ After execution, you can run `emqx ctl license info` to confirm that the new lic
4646

4747
::: tip
4848

49-
You can also configure the license file through the EMQX Dashboard. For how to configure the license via Dashboard, see [Work with License](../deploy/license.md). Once you have configured these items with the Dashboard, your settings will override the same configuration items in `emqx.conf`.
49+
You can also configure the license file through the EMQX Dashboard. For how to configure the license via Dashboard, see [Work with License](../deploy/license.md). Once you have configured these items with the Dashboard, your settings will override the same configuration items in the config file.
5050

5151
:::
5252

en_US/configuration/listener.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ In EMQX, listener is configured to receive requests from MQTT clients. EMQX supp
1010
::: tip
1111

1212
You can also configure listeners via Dashboard by clicking **Management** -> **Listeners** on the left navigation menu of the Dashboard.
13-
However if the listeners are configured from `emqx.conf`, the changes made from the Dashboard will only take effect temporarily until EMQX restarts.
13+
If you want to configure listeners from config files, it is recommended to use `base.hocon` instead of `emqx.conf`.
14+
This is because if the configuration is set in emqx.conf, any changes made through the Dashboard will only be temporary and will be lost upon EMQX restart.
1415

1516
:::
1617

@@ -24,7 +25,7 @@ EMQX offers more configuration items to better serve customized needs. For detai
2425

2526
TCP listener is a network service that listens for incoming TCP connections on a specific network port. It plays an essential role in establishing and managing connections between clients and EMQX over TCP/IP networks.
2627

27-
To configure the TCP listener in EMQX, you can add the `listeners.tcp` configuration items in the `emqx.conf` file within the `etc` folder of the EMQX installation directory.
28+
To configure the TCP listener in EMQX, you can add the `listeners.tcp` configuration items in the `base.hocon` file within the `etc` folder of the EMQX installation directory.
2829

2930
For example, to enable the TCP listener on port `1883`, with a maximum 1,024,000 of concurrent connections allowed by the listener, you can work the code below:
3031

@@ -46,7 +47,7 @@ where,
4647

4748
SSL listener is a network service that listens for incoming SSL (Secure Sockets Layer) connections. In EMQX, it is used to secure network traffic between a client and EMQX by encrypting the data that is transmitted between them.
4849

49-
To configure the SSL listener in EMQX, you can add the `listeners.ssl` configuration items in the `emqx.conf` file within the `etc` folder of the EMQX installation directory.
50+
To configure the SSL listener in EMQX, you can add the `listeners.ssl` configuration items in the `base.hocon` file within the `etc` folder of the EMQX installation directory.
5051

5152
For example, to enable the SSL listener on port `8883`, with a maximum 1,024,000 of concurrent connections allowed by the listener:
5253

@@ -81,7 +82,7 @@ where:
8182

8283
WebSocket listener is a network service that receives and processes messages over WebSocket. WebSocket support in EMQX allows clients to use the WebSocket protocol to connect to EMQX and exchange data in real-time.
8384

84-
To configure the WebSocket listener in EMQX, you can add the `listeners.ws` configuration items in the `emqx.conf` file within the `etc` folder of the EMQX installation directory.
85+
To configure the WebSocket listener in EMQX, you can add the `listeners.ws` configuration items in the `base.hocon` file within the `etc` folder of the EMQX installation directory.
8586

8687
For example, to enable the WebSocket listener on port `8083`, with a maximum 1,024,000 of concurrent connections allowed by the listener:
8788

@@ -105,7 +106,7 @@ where:
105106

106107
A secure WebSocket listener is a WebSocket listener that uses the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocol to encrypt the data exchanged between a WebSocket client and the broker. In EMQX, the secure WebSocket listener is an important security measure to protect sensitive data exchanged between WebSocket clients and EMQX>
107108

108-
To configure the secure WebSocket listener in EMQX, you can add the `listeners.wss` configuration items in the `emqx.conf` file within the `etc` folder of the EMQX installation directory.
109+
To configure the secure WebSocket listener in EMQX, you can add the `listeners.wss` configuration items in the `base.hocon` file within the `etc` folder of the EMQX installation directory.
109110

110111
For example, to enable the Secure WebSocket listener on port `8084`, with a maximum 1,024,000 of concurrent connections allowed by the listener:
111112

0 commit comments

Comments
 (0)