# Web Interface Config

![Preview of the web UI](https://331088021-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LybPEFK0kFRIsEAcpPg%2F-M2xujQjDt3qJWcODebO%2F-M2xvRktUENvrfgKmuwE%2F68747470733a2f2f692e696d6775722e636f6d2f4344386d6252682e706e67.png?alt=media\&token=63a6b9b8-e228-441f-93c4-09a569c0d511)

Configs are set in the settings/config.web.json file. If none exist, then you must create one that follows the example at settings/config.web.example.json.

Any configs with an asterisk `*` beside it indicates that it is *required* and the bot cannot function without them. There will be a automatic check on startup for any invalid/missing configs.

**Type Definitions:**

Number - A non-negative integer (no quotes).

Boolean - Either `true` or `false` (no quotes).

String - Text that must be enclosed with quotes. Example: `"my text"`

Array\[String] - Multiple strings enclosed by `[` and `]`, separated by commas. Example: `["mythinghere", "mysecondthinghere"]` or with a single item: `["myotherthing"]`

Object - A [JSON](https://www.w3schools.com/js/js_json_syntax.asp) object.

## log

| Config        | Type   | Description                                                                                                                                                                       |
| ------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `level`       | String | Verbosity of the logs desired. Must be `"silent"`, `"trace"`, `"debug"`, `"info"`, `"warn"`, `"error"`, or `"fatal"`. Default is `"info"`. The lower the level, the more verbose. |
| `destination` | String | Direct JSON logs to a file. Must be an absolute path. Default is `""` (no file output, only console).                                                                             |

## bot

| Config           | Type   | Description                                                                                                                                                                                         |
| ---------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `token`\*        | String | Bot token.                                                                                                                                                                                          |
| `redirectURI`\*  | String | Domain with `/authorize` appended after it. Make sure you add this exact URL to Redirects for your application at [Discord Developers](https://discordapp.com/developers/applications/), in OAuth2. |
| `clientID`\*     | String | Application ID retrieved from [Discord Developers](https://discordapp.com/developers/applications/).                                                                                                |
| `clientSecret`\* | String | Application secret retrieved from [Discord Developers](https://discordapp.com/developers/applications/).                                                                                            |

## database

| Config       | Type   | Description                                                                                                                                                                                                                                                  |
| ------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `uri`\*      | String | [MongoDB connection string](https://docs.mongodb.com/manual/reference/connection-string/). This **must** match the bot's database connection URI in order for the web control panel to have access to the same data. Default is `"mongodb://localhost/rss"`. |
| `connection` | Object | The [connection options object](http://mongoosejs.com/docs/connections.html#options) options passed through Mongoose. This can be used for other types of authentication.                                                                                    |
| `redis`\*    | String | Redis URI. Default is `""`. **All keys that match `drss*` will be deleted every time the web starts. Do not use a database or database index that contains keys used by oher applications that match the `drss*` pattern.**                                  |

## http

| Config          | Type    | Value                                       |
| --------------- | ------- | ------------------------------------------- |
| `trustProxy`    | Boolean | Enable reverse proxy support.               |
| `sessionSecret` | String  | Unique string to prevent session hijacking. |
| `port`          | Number  | HTTP port. Default is `8081`.               |

## https

| Config        | Type    | Value                                   |
| ------------- | ------- | --------------------------------------- |
| `enabled`     | Boolean | Enable Node.js's HTTPS server.          |
| `privateKey`  | String  | Absolute path to your private key file. |
| `certificate` | String  | Absolute path to your certificate file. |
| `chain`       | String  | Absolute path to your chain file.       |
| `port`        | Number  | HTTPS port. Default is `443`.           |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.monitorss.xyz/configuration/web-interface.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
