# Configuring MaxScale's REST API

## Overview

MaxScale's MaxScale's REST API is used by both [MaxCtrl](/docs/maxscale/maxscale-management/administrative-tools-for-mariadb-maxscale-maxctrl.md) and [MaxGUI](/docs/maxscale/maxscale-management/maxgui.md).

The REST API is enabled by default. However, the default configuration is not optimal for production systems, because:

* It only allows requests from the local host address by default.
* It does not use TLS by default.
* It used a hard-coded user (admin) and password (mariadb) by default.

## Configuring MaxScale's REST API for Remote Connections

1. [Configure MaxScale's REST API](/docs/maxscale/maxscale-management/maxgui/configuring-maxscale-for-maxgui.md) for remote connections by configuring several global parameters in maxscale.cnf.

| Parameter                                                                                                                              | Description                                                                                                 |
| -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| [admin\_host](/docs/maxscale/maxscale-management/deployment/installation-and-configuration/maxscale-configuration-guide.md#admin_host) | • This parameter defines the network address that the REST API listens on.• The default value is 127.0.0.1. |
| [admin\_port](/docs/maxscale/maxscale-management/deployment/installation-and-configuration/maxscale-configuration-guide.md#admin_port) | • This parameter defines the network port that the REST API listens on.• The default value is 8989.         |

For example:

```
[maxscale]
...
admin_host            = 0.0.0.0
admin_port            = 8443
```

2. Restart the MaxScale instance.

```
$ sudo systemctl restart maxscale
```

<sub>*This page is: Copyright © 2025 MariaDB. All rights reserved.*</sub>

{% @marketo/form formId="4316" %}


---

# 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://mariadb.com/docs/maxscale/maxscale-management/configuring-maxscales-rest-api.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.
