# Configure MAXMIND for reverse IP lookups | How to configure MAXMIND for reverse IP queries in Discourse

**URL:** https://meta.discourse.org/t/configure-maxmind-for-reverse-ip-lookups-discourse-maxmind-ip/265932
**Category:** Sysadmins
**Tags:** chinese-translation, maxmind
**Created:** [May 23, 2023, 2:59pm UTC](https://meta.discourse.org/t/configure-maxmind-for-reverse-ip-lookups-discourse-maxmind-ip/265932 "2023-05-23T14:59:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![honeymoose](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/honeymoose/32/198718_2.png) [@honeymoose](https://meta.discourse.org/u/honeymoose)
#### Post date: [May 23, 2023, 2:59pm UTC](https://meta.discourse.org/t/configure-maxmind-for-reverse-ip-lookups-discourse-maxmind-ip/265932/1 "2023-05-23T14:59:20Z")

</div>

> ⚠**[Configuration MAXMIND, Discourse requires a rebuild, which will cause service interruption.]**

* * *

## What is MAXMIND and why do we need to use this service?

Discourse uses [MAXMIND](https://www.maxmind.com/en/home) to reverse query the specific physical address through IP addresses.

 ![](https://global.discourse-cdn.com/meta/original/4X/6/d/b/6dbd9a4543ef593ac774983bd4a2307fc61f1101.png)  
If Discourse is not configured with Maxmind’s database, the configuration information we see is as follows:

 ![](https://global.discourse-cdn.com/meta/original/4X/a/c/e/ace055aa07e7f1fdd5e9f7c4602948535ed3fc05.png)  
Or when recompiling the Discourse container, you will see the following information:

```plaintext
MaxMind IP database updates require a license
Please set DISCOURSE_MAXMIND_LICENSE_KEY to one you generated at https://www.maxmind.com

```

## Why do we need to query IP addresses?

We usually use IP address queries to understand the addresses of users accessing the system, who these users are, and where they are accessing our website from. If there are problems, you can also find out that these users `Special-ISP`" frequently visit my website.

Starting with Discourse [2.2.0.beta4](https://meta.discourse.org/t/discourse-2-2-0-beta4-release-notes/101272), Discourse also uses this IP address information to notify administrators of new login addresses accessing your website.

If you do not configure the Maxmind database, Discourse cannot provide the above information to the administrator.

## What are the problems if I don’t have this Key?

If you are not very concerned about the issues mentioned above, then it doesn’t matter if you don’t configure the maxmind database.

The worst-case scenario is that you will not be able to receive notifications of new IP address user access and query specific user IP address information.

Of course, you can also copy the IP address to other open networks for querying.

### How to get the Key

Please refer to Maxmind’s [Generate a license key](https://support.maxmind.com/hc/en-us/articles/4407111582235-Generate-a-License-Key) website page for an article on how to create a Key.

- Visit the [GeoLite2 Sign Up](https://www.maxmind.com/en/geolite2/signup?utm_source=kb&utm_medium=kb-link&utm_campaign=kb-create-account) page.
- Create a Key on the “[My License Keys](https://www.maxmind.com/en/accounts/153456/license-key)” link page. You need to save the created Key. If the Key is lost, you will need to create a new Key.

Add the Key you obtained to the ENV environment variable in `app.yml`. The configuration file should look like this:

```
  DISCOURSE_MAXMIND_LICENSE_KEY: your-key-here

```

Or configure it through `discourse-setup`.

### IPv6 User Instructions

Discourse’s default installation method does not fully support IPv6.

If your server is configured with IPv6, you need to ensure that Discourse can obtain the user’s real IPv6 address.

This can usually be achieved by setting up a reverse proxy in Discourse, which usually requires more administrator configuration.
