> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/tools/mariadb-enterprise-manager/administration/change-hostname-or-ip-address.md).

# Change Hostname or IP Address

To set the hostname or IP address for an existing MariaDB Enterprise Management instance, follow these instructions. Changing the hostname or IP address is useful if your server's IP changed or if you need to switch from an IP address to a public DNS name.

{% stepper %}
{% step %}
**Connect to your server**

SSH into the server where your Enterprise Manager is running:

```bash
ssh user@your-server-ip
```

{% endstep %}

{% step %}
**Navigate to the directory**

Change into the `enterprise-manager` directory, where your Docker Compose files are located:

```bash
cd enterprise-manager
```

{% endstep %}

{% step %}
**Edit the `.env` file**

Open the environment file with a text editor (for example `nano`):

```bash
nano .env
```

Find the line that begins with `MEMA_HOSTNAME=` and update it with the new hostname or IP address. Example:

```env
MEMA_HOSTNAME=your.new.hostname.or.ip
```

{% endstep %}

{% step %}
**Save the file**

Save the file and exit the editor.
{% endstep %}

{% step %}
**Restart the services**

Restart the MEM services so the new environment variable takes effect. The `--force-recreate` flag ensures the containers are rebuilt using the updated environment variables:

```bash
docker compose up -d --force-recreate
```

After the restart, your Enterprise Manager will be accessible at the new hostname or IP address.
{% endstep %}
{% endstepper %}

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

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://mariadb.com/docs/tools/mariadb-enterprise-manager/administration/change-hostname-or-ip-address.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
